Difference between mean, median and expected value

Hi everyone, I have some questions about the concept of mean, median and expected value and their advantages. I do not know if I am right but I have known that when having a lot of experiments, expected value is equal to mean. I want to know exactly when mean, median, mode and expected value are used and their advantages. Thank you!

I’m not sure what context you have for “expected value”.

  • Mean is the mathematical average value.
  • Median is the value at the 50th percentile of the distribution of a data set.
  • Mode is the value that occurs the most often in a data set.
1 Like

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.

(source)

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
Christian

1 Like

Thank you. But if expected value is the same as mean when having a lot of experiment, is it more sensitive to outlier than median. And,we still have mean, median and mode, why do we have expected value

Expected value and mean are just synonyms. Please see the definition, provided in the post before:

In probability theory, the expected value (also called […] mean […] ), is a generalization of the weighted average.

Therefore:

Yes, expected value (= mean) of a distribution is more sensitive to outliers than the median. Or put differently: the median is more robust.

Hope that answers your question, @Luong_Nguyen_Dinh!

Best regards
Christian