Mean and Variance of the Continuous Uniform Distribution

Derives and applies the formulas E[X]=a+b2E[X]=\dfrac{a+b}{2} and Var(X)=(ba)212\mathrm{Var}(X)=\dfrac{(b-a)^2}{12} for XU(a,b)X\sim U(a,b), including inverse problems where the endpoints must be recovered from the mean and variance.

Step 1 of 119%

Tutorial

Mean of the Continuous Uniform Distribution

If XU(a,b)X \sim U(a,b), then XX has constant density f(x)=1baf(x) = \dfrac{1}{b-a} on the interval [a,b][a,b]. The mean of XX is

E[X]=abx1badx=1ba[x22]ab=b2a22(ba)=(ba)(b+a)2(ba)=a+b2.E[X] = \int_a^b x \cdot \dfrac{1}{b-a} \, dx = \dfrac{1}{b-a} \cdot \left[ \dfrac{x^2}{2} \right]_a^b = \dfrac{b^2 - a^2}{2(b-a)} = \dfrac{(b-a)(b+a)}{2(b-a)} = \dfrac{a+b}{2}.

So the mean of any continuous uniform random variable on [a,b][a,b] is just the midpoint of the interval:

E[X]=a+b2.E[X] = \dfrac{a+b}{2}.

For example, if XU(1,9)X \sim U(1, 9), then

E[X]=1+92=5.E[X] = \dfrac{1+9}{2} = 5.
navigate · Enter open · Esc close · ⌘K/Ctrl K toggle