Median vs Mean averages using skewness

21 views (last 30 days)
Hi,
I would like to take the average of some data, but I'm unsure whether to use median or mean.
I know of the skewness function, but I'm not sure how to use what this outputs. I know negative and positive skewness refers to the side it is skewed, but besides that I don't know what is considered a large or small skewness. I'm looking for a ballpark value at which if the skewness exceeds this value, the median is the better option, and below this value the mean would be the better option. Has anyone worked with this before or has a better way to choose which average to use?
Thanks!

Accepted Answer

Star Strider
Star Strider on 6 Jun 2016
It depends on what you want to do. In a symmetric distribution, the mean and median will be close if not equal. The mean is affected by extreme values, while the median is not. If you have any doubts as to the ‘best’ parameter, I would simply choose the median.
To illustrate:
x1 = [1 2 3 10];
x2 = [1 2 3 99];
x1_stats = [mean(x1) median(x1)]
x2_stats = [mean(x2) median(x2)]
x1_stats =
4 2.5
x2_stats =
26.25 2.5

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!