# Median of Continuous Uniform Distribution

## Theorem

Let $X$ be a continuous random variable which is uniformly distributed on a closed real interval $\closedint a b$.

Then the median $M$ of $X$ is given by:

$M = \dfrac {a + b} 2$

## Proof

From the definition of the continuous uniform distribution, $X$ has probability density function:

$\map {f_X} x = \dfrac 1 {b - a}$

Note that $f_X$ is non-zero, so the median is unique.

We have by the definition of a median:

$\displaystyle \map \Pr {X < M} = \frac 1 {b - a} \int_a^M \rd x = \frac 1 2$

We have, by Primitive of Constant:

$\dfrac {M - a} {b - a} = \dfrac 1 2$

So:

 $\displaystyle M$ $=$ $\displaystyle a + \frac {b - a} 2$ $\displaystyle$ $=$ $\displaystyle \frac {b - a + 2 a} 2$ $\displaystyle$ $=$ $\displaystyle \frac {b + a} 2$

$\blacksquare$