Difference between mean, median and expected value

Yes this is correct. The expected value of a distribution is the mean of the distribution.

In probability theory, the expected value (also called expectation , expectancy , expectation operator , mathematical expectation , mean , average , or first moment ) is a generalization of the weighted average.


In general when you have asymmetric distributions resp. outlier problems, the Median is more robust to outliers and not so sensitive as the mean that is influenced stronger by outliers. This is important to bear in mind when designing features considering robustness of them and the impact to the model sensitivity.

Assuming your data you use comes from a sufficiently high number of samples (law of large numbers) from a distribution, the mode is even less affected by outliers since it is just the most common value, but bear in mind that in multi modal distributions it does lot really help a lot; and my experience is that the mode usually does not carry sufficient information (or let’s say information sensitivity) to qualify for a killer feature in my ML pipeline.

Here is also a nice illustration:

Also in symmetric distributions: median and mean are identical, see also this thread: Why do we need to normalize data in gradient descent algorithm? - #4 by Christian_Simonis

Please let me know if this helps, @Luong_Nguyen_Dinh !

Best regards

1 Like