Expectation of Continuous Uniform Distribution

Theorem
Let $X \sim \ContinuousUniform a b$ for some $a, b \in \R$, $a \ne b$, where $\operatorname U$ is the continuous uniform distribution.

Then:


 * $\expect X = \dfrac {a + b} 2$

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


 * $\map {f_X} x = \begin {cases} \dfrac 1 {b - a} & : a \le x \le b \\ 0 & : \text {otherwise} \end {cases}$

From the definition of the expected value of a continuous random variable:


 * $\ds \expect X = \int_{-\infty}^\infty x \map {f_X} x \rd x$

So:

Also see

 * Expectation of Discrete Uniform Distribution