Index: The Book of Statistical ProofsProbability Distributions ▷ Univariate continuous distributions ▷ Continuous uniform distribution ▷ Median

Theorem: Let $X$ be a random variable following a continuous uniform distribution:

\[\label{eq:cuni} X \sim \mathcal{U}(a, b) \; .\]

Then, the median of $X$ is

\[\label{eq:cuni-med} \mathrm{median}(X) = \frac{1}{2} (a+b) \; .\]

Proof: The median is the value at which the cumulative distribution function is $1/2$:

\[\label{eq:median} F_X(\mathrm{median}(X)) = \frac{1}{2} \; .\]

The cumulative distribution function of the continuous uniform distribution is

\[\label{eq:cuni-cdf} F_X(x) = \left\{ \begin{array}{rl} 0 \; , & \text{if} \; x < a \\ \frac{x-a}{b-a} \; , & \text{if} \; a \leq x \leq b \\ 1 \; , & \text{if} \; x > b \; . \end{array} \right.\]

Thus, the inverse CDF is

\[\label{eq:cuni-cdf-inv} x = bp + a(1-p) \; .\]

Setting $p = 1/2$, we obtain:

\[\label{eq:cuni-med-qed} \mathrm{median}(X) = b \cdot \frac{1}{2} + a \cdot \left( 1-\frac{1}{2} \right) = \frac{1}{2} (a+b) \; .\]
Sources:

Metadata: ID: P83 | shortcut: cuni-med | author: JoramSoch | date: 2020-03-16, 16:19.