# What is the mathematical formula for the variance of a continuous random variable?

Nov 3, 2015

The formula is the same whether it is a discrete random variable or a continuous random variable.

#### Explanation:

irrespective of the type of random variable, the formula for variance is ${\sigma}^{2}$ = E(${X}^{2}$) - ${\left[E \left(X\right)\right]}^{2}$.
However, if the random variable is discrete, we use the process of summation.

In the case of a continuous random variable, we use the integral.
E(${X}^{2}$) = ${\int}_{-} {\infty}^{\infty} {x}^{2} f \left(x\right) \mathrm{dx}$.
E(X) = ${\int}_{-} {\infty}^{\infty} x f \left(x\right) \mathrm{dx}$.
From this, we get ${\sigma}^{2}$ by substitution.