1

Got asked this question in an interview. More generally, I would like to understand for which distributions is the mean greater than the median and vice versa. For example, it is known that for negative skew distributions median is always greater than the mean, but I am unable to provide a more general argument why this should be the case.

  • 4
    If $X$ is Cauchy, then $|X|$ has infinite mean, its density is decreasing strictly and therefore the median is smaller than the mean (because the median is always finite. (In other words, what they asked you to prove is false). – William M. Oct 15 '22 at 21:15
  • Thanks for the reply! I just edited the question so that is correctly phrased. – Filip Batur Stipic Oct 16 '22 at 12:03

3 Answers3

4

Here is a proof in the case that the pdf $f(x)$ is differentiable.

By shifting the distribution of $X$ we may assume the pdf $f(x)$ of $X$ starts at $x=0$. Consider the survival function $$S(x):=P(X> x)=1-F(x),\tag1$$ where $F(x)$ is the CDF of $X$. The median $m$ of $X$ satisfies $$\frac12 = P(X>m)=S(m),\tag2$$ while the mean $\mu$ of $X$ is the area under the survival curve: $$\mu:=E(X)=\int_0^\infty P(X>x)\,dx=\int_0^\infty S(x)\,dx.\tag3$$ From (1) calculate $S'(x)=-f(x)$ and $S''(x) = -f'(x)$ which by assumption is strictly positive for every $x$. One consequence of $S''(x)>0$ is that the graph of $S$ lies above all of its tangent lines. Consequently the area under the survival curve exceeds the area under any tangent line.

This is true in particular for the tangent at $(x,S(x))=(m,\frac12)$. If this tangent line intersects the $y$-axis at $\frac12+h$ (where $0<h<\frac12)$, then the area of the triangle formed by the tangent line and the coordinate axes is $$A(h) = \frac12 \left(h+\frac12\right)^2\frac mh=\frac m2 \left(h+1+\frac1{4h}\right).$$ (This can be verified using similar triangles, or by finding the equation of the tangent line and performing an integration.) Check that $A$ is a strictly decreasing function for $h\in(0,\frac12)$, hence $$\mu=\int_0^\infty S(x)\,dx\ge A(h)> A(1/2) =m.$$

grand_chat
  • 38,951
4

Here is another proof that I have come up with inspired by the answer by @grand_chat, although it uses some assumptions that might be unjustifiable:

Assuming that F is an invertible cdf of X with pdf f(x), we know that $X = F^{-1}(U)$ where $U \sim \text{Uniform}(0,1)$.

Now we compute the second derivative of $F^{-1}(u)$:

$$ \frac{\partial^2 }{\partial u^2} F^{-1} (u) = -\frac{1}{f(F^{-1}(u))^3} * f'(F^{-1}(u)) > 0 $$

Since $f'(u)$ is negative by the assumption of the exercise, and assuming that the pdf is nowhere exactly zero this would imply that $F^{-1}(u)$ is strictly convex. Now we can apply Jensen's inequality:

$$ E[X] = E[F^{-1}(U)] > F^{-1}(E[U]) = F^{-1}(\frac{1}{2}) = \text{median} $$

Thereby concluding the proof.

  • 1
    This is the cleanest approach! You can remove all assumptions, as follows: $F$ is continuous and strictly increasing over the support of $f$, hence $F$ has a well-defined inverse. Prove $F$ is strictly concave by adapting this argument. Then the inverse $F^{-1}$ is strictly convex by adapting this argument. – grand_chat Oct 21 '22 at 19:45
0

The question implies that the random variable, $X$, is bounded below. By shifting, we may assume that $X \ge 0$. Let $m$ be its median and $\mu$ its mean. Let $F$ be its c.d.f. and $F_-(x) := P[X < x]$. Suppose that $F_-(m+h) + F_-(m-h) \le 1$ for all $h \in (0, m)$. Then $m \le \mu$ with equality iff the distribution of $X$ is symmetric about $m$.

Note that $F$ satisfies this sufficient condition if $F$ has a decreasing derivative on $(0, 2m)$, because that implies $F$ is concave on $(0, 2m)$ and $F(m) = 1/2$. Note as well that $X$ need not have a density and may even be discrete. Also, the values of $F$ on $[2m, \infty)$ are irrelevant.

To prove my claim, let $\bar F_+(x) := P[X \ge x]$. Rewrite the hypothesis as $1 \le \bar F_+(m-h) + \bar F_+(m+h)$. Integrate this inequality on $h \in (0, m)$ to get $$ m \le \int_0^{2m} \bar F_+(h) \,dh \le \int_0^\infty \bar F_+(h) \,dh = \mu. $$ The equality condition is easily checked.

The intuition behind this is the following. The basic idea is that $\mu$ is a balancing point for the probability mass, so that the claim is that the balancing point is at or to the right of $m$. Taking the limit from the left on $h$ shows that the assumption is equivalent to $F_-(m+h) + F(m-h) \le 1$ for all $h \in (0, m)$. Rewrite this as $F_-(m) - F(m-h) \ge F_-(m+h) - F(m)$. Then this inequality says that the probability mass to the left of $m$ is closer to $m$ than is the mass to the right of $m$. Hence, the balancing point is as claimed.

More technically, the assumption is that if we renormalize the mass $< m$ and the equal mass $> m$ and consider both as representing distances to $m$, then the former is stochastically dominated by the latter. In particular, the mean of the former is at most the mean of the latter.

A similar result holds without the assumption that $X$ is bounded below. Namely, $F_-(m+h) + F_-(m-h) \le 1$ for all $h > 0$ implies that $m \le \mu$ if $\mu$ exists. Furthermore, equality holds iff the distribution of $X$ is symmetric about $m$. To see this, we may suppose for simplicity that $m =0$. Then $\bar F_+(h) - F_-(-h) \ge 0$ for all $h > 0$. Integrating this inequality over all $h >0$ yields the claim, because $E[X] = E[X^+ - X^-] = \int_0^\infty [\bar F_+(h) - F_-(-h)] \,dh$. Even if $\mu$ does not exist, the inequality holds with the interpretation that $\mu := \lim_{y \to\infty} \int_0^y [\bar F_+(h) - F_-(-h)] \,dh$.

Russ Lyons
  • 196
  • 7