Median $\neq$ expectation Do you have an example of real random variable such that its median is remarkably different from its expectation? I'd like an example where it is obvious that they are different.
 A: Consider a random variable which takes values $1,2$ and $27$ with equal probability. Then, median is $2$ and mean is $10$.
A: The median is not affected by extreme values, whereas the mean values is. Consider the following cases 


*

*$X$ takes with equal probability any of the values $\{1,2,3,4,5\}$ and 

*$X$ takes with equal probability any of the values $\{1,2,3,4,100000\}$. 


In both cases the median is equal to 3, in symbols $$M=3$$ but the expected values are very different, that is in the first case $$E[X]=3$$ but in the second case $$E[X]=20002$$
A: To find an example for a random variable with density, you need to consider a heavily skewed distribution. For example, the log-normal distribution has a mean that is equal to $$e^{μ+σ^2/2}$$ and median equal to $$e^{μ}$$ For large values of $σ^2$ (or values that are large relative to $μ$) the lognormal distribution becomes (heavily) positively skewed, and with the appropriate choise of $σ$ you can get significant differences between the mean and the median. In that case the mean is $$\frac{e^{μ+σ^2/2}}{e^μ}=e^{σ^2/2}$$ times the median. 
A: The Cauchy distribution, with pdf $\frac 1 \pi \frac{1}{1+x^2}$, has no expectation but its median is $0$.
