Proof: Variance of the continuous uniform distribution
Index:
The Book of Statistical Proofs ▷
Probability Distributions ▷
Univariate continuous distributions ▷
Continuous uniform distribution ▷
Variance
Metadata: ID: P396 | shortcut: cuni-var | author: JoramSoch | date: 2022-12-20, 18:04.
Theorem: Let $X$ be a random variable following a continuous uniform distribution:
\[\label{eq:cuni} X \sim \mathcal{U}(a, b) \; .\]Then, the variance of $X$ is
\[\label{eq:cuni-var} \mathrm{Var}(X) = \frac{1}{12} (b-a)^2 \; .\]Proof: The variance is the probability-weighted average of the squared deviation from the mean:
\[\label{eq:var} \mathrm{Var}(X) = \int_{\mathbb{R}} (x - \mathrm{E}(X))^2 \cdot f_\mathrm{X}(x) \, \mathrm{d}x \; .\]With the expected value and probability density function of the continuous uniform distribution, this reads:
\[\label{eq:cuni-var-qed} \begin{split} \mathrm{Var}(X) &= \int_a^b \left( x - \frac{1}{2} (a+b) \right)^2 \cdot \frac{1}{b-a} \, \mathrm{d}x \\ &= \frac{1}{b-a} \cdot \int_a^b \left( x - \frac{a+b}{2} \right)^2 \, \mathrm{d}x \\ &= \frac{1}{b-a} \cdot \left[ \frac{1}{3} \left( x - \frac{a+b}{2} \right)^3 \right]_a^b \\ &= \frac{1}{3(b-a)} \cdot \left[ \left( \frac{2x-(a+b)}{2} \right)^3 \right]_a^b \\ &= \frac{1}{3(b-a)} \cdot \left[ \frac{1}{8} ( 2x-a-b )^3 \right]_a^b \\ &= \frac{1}{24(b-a)} \cdot \left[ ( 2x-a-b )^3 \right]_a^b \\ &= \frac{1}{24(b-a)} \cdot \left[ ( 2b-a-b )^3 - ( 2a-a-b )^3 \right] \\ &= \frac{1}{24(b-a)} \cdot \left[ ( b-a )^3 - ( a-b )^3 \right] \\ &= \frac{1}{24(b-a)} \cdot \left[ ( b-a )^3 + (-1)^3 ( a-b )^3 \right] \\ &= \frac{1}{24(b-a)} \cdot \left[ ( b-a )^3 + ( b-a )^3 \right] \\ &= \frac{2(b-a)^3}{24(b-a)} \\ &= \frac{1}{12} (b-a)^2 \; . \end{split}\]∎
Sources: Metadata: ID: P396 | shortcut: cuni-var | author: JoramSoch | date: 2022-12-20, 18:04.