logo

Mean and Variance of the Bernoulli Distribution 📂Probability Distribution

Mean and Variance of the Bernoulli Distribution

Formulas

$X \sim U[a,b]$ Surface $$ E(X) = {{ a+b } \over { 2 }} \\ \operatorname{Var}(X) = {{ (b-a)^{2} } \over { 12 }} $$

Derivation

Strategy: Directly deduce from the definition of the uniform distribution.

Definition of Uniform Distribution: For $[a,b] \subset \mathbb{R}$, a continuous probability distribution with the following probability density function]] $U[a,b]$ is called a uniform distribution. $$ f(x) = {{ 1 } \over { b - a }} \qquad , x \in [a,b] $$

Mean

$$ \begin{align*} E(X) =& \int_{a}^{b} x {{ 1 } \over { b-a }} dx \\ =& {{ 1 } \over { b-a }} \left[ {{ x^{2} } \over { 2 }} \right]_{a}^{b} \\ =& {{ 1 } \over { b-a }} {{ b^{2} - a^{2} } \over { 2 }} \\ =& {{ 1 } \over { b-a }}{{ (b-a)(b+a) } \over { 2 }} \\ =& {{ a+b } \over { 2 }} \end{align*} $$

Variance

$$ \begin{align*} E\left( X^{2} \right) =& \int_{a}^{b} x^{2} {{ 1 } \over { b-a }} dx \\ =& {{ 1 } \over { b-a }} \left[ {{ x^{3} } \over { 3 }} \right]_{a}^{b} \\ =& {{ 1 } \over { b-a }} {{ b^{3} - a^{3} } \over { 3 }} \\ =& {{ 1 } \over { b-a }}{{ (b-a)\left( b^{2} + ab + a^{2} \right) } \over { 3 }} \\ =& {{ b^{2} + ab + a^{2} } \over { 3 }} \end{align*} $$

Therefore $$ \begin{align*} \operatorname{Var}(X) =& {{ b^{2} + ab + a^{2} } \over { 3 }} - \left( {{ a+b } \over { 2 }} \right)^{2} \\ =& {{ 4b^{2} + 4ab + 4a^{2} - 3a^{2} - 6ab - 3b^{2} } \over { 12 }} \\ =& {{ a^{2} - 2ab + b^{2} } \over { 12 }} \\ =& {{ (b-a)^{2} } \over { 12 }} \end{align*} $$