the following is the output of the preceding code vu we don' expect to see lot of outliers because this is nice normal distribution median and mean will be comparable when you don' have lot of weird outliers analyzing the effect of outliers just to prove pointlet' add in an outlier we'll take donald trumpi think he qualifies as an outlier let' go ahead and add his income in so ' going to manually add this to the data using oqbqqfoeand let' say add billion dollars (which is obviously not the actual income of donald trumpinto the incomes data jodpnft oqbqqfoe jodpnftwhat we're going to see is that this outlier doesn' really change the median whole lotyou knowthat' still going to be around the same value $ , because we didn' actually change where the middle point iswith that one valueas shown in the following exampleoqnfejbo jodpnft this will output the following vu this gives new output ofoqnfbo jodpnft the following is the output of the preceding code vu ahaso there you have itit is great example of how median and meanalthough people tend to equate them in commonplace languagecan be very differentand tell very different story so that one outlier caused the average income in this dataset to be over $ yearbut the more accurate picture is closer to , dollars year for the typical person in this dataset we just had the mean skewed by one big outlier the moral of the story istake anyone who talks about means or averages with grain of salt if you suspect there might be outliers involvedand income distribution is definitely case of that