Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Does a median always exist for a random variable?

Note that a median of a random variable $X$ is defined as a number $m \in \mathbb{R}$ such that $P(X \leq m) \geq \frac{1}{2}$ and $P(X \geq m) \geq \frac{1}{2}$.

Thanks and regards!

share|improve this question
What would need to hold for a median not to exist? –  Henning Makholm Nov 26 '11 at 3:14
It always exists but sometimes it might have more than one value. –  geraldgreen Nov 26 '11 at 3:23
@HenningMakholm: by its definition, that is the best I can say now. –  Tim Nov 26 '11 at 3:25
@John.Mathew: Why does it always exist? –  Tim Nov 26 '11 at 3:26

1 Answer 1

up vote 3 down vote accepted

I will assume that $X$ is finite w.p. $1$. Then we claim that $m := \sup \ \{ a \mid P(X \geqslant a) \geqslant \frac12 \}$ is always a median. We just need to verify the two defining properties:

  • For $a > m$, from the definition of $m$, the tail probability $P(X \geqslant a)$ is strictly less than $\frac12$. Now since $\lim \limits_{a \to m+} P(X \geqslant a)$ exists and equals $P(X \gt m)$, it follows that $P(X \gt m) \leqslant \frac12$. That is, $P(X \leqslant m) \geqslant \frac12$.

  • For the other direction, we reverse the above argument. For any $a \lt m$, we have $P(X \geqslant a) \geqslant \frac12$. Now since $\lim \limits_{a \to m-} P(X \geqslant a) = P(X \geqslant m)$, it follows that $P(X \geqslant m) \geqslant \frac12$.


  • The median that we defined above is the largest median of $X$. Correspondingly, the smallest median is given by $\inf \ \{ a \mid P(X \leqslant a) \geqslant \frac12 \}$.

  • The set of medians of $X$ is a convex set, i.e., interval in $\mathbb R$. Moreover it is also compact (i.e., closed and bounded), because its infimum and supremum are finite and are contained in the set.

share|improve this answer
Thanks! Yes, I think I need more information. Also is the set of medians closed? The one you gave looks like the max median, does it? –  Tim Nov 26 '11 at 3:50
Thanks! So in $\mathbb{R}$, is interval defined as a convex subset? –  Tim Nov 26 '11 at 4:07
No, it's not defined that way, but in $\mathbb R$, these two notions coincide. An interval is defined on a universe with total or partial order; a set $I$ is an interval if whenever $x, z \in I$, $\{ y \mid x < y < z \} \subseteq I$. OTOH a convex set is defined in a (say) vector space. A set $C$ is convex if whenever $x,y \in C$, we have $\{ t x + (1-t)y \mid 0 \leqslant t \leqslant 1 \} \subseteq C$. –  Srivatsan Nov 26 '11 at 4:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.