The variance of a random variable
Summary
Discrete random variable
- If \(X\) is a discrete random variable with range \({x_1,x_2,…,x_n}\) , probability mass function \(f(x)\) and expected value \(μ\) then the variance of \(X\) is defined as
\[Var\left( X \right)=\sum_{i=1}^{n}{ {\left( x_i-μ \right)}^2f(x_i) }\]
Continuous random variable
- If \(X\) is a continuous random variable with range \(\left[ a,b \right]\) , probability density function \(f(x)\) and expected value \(μ\) then the variance of \(X\) is defined as
\[Var\left( X \right)=\int_{a}^{b}{ {\left( x-μ \right)}^2f\left( x \right)dx }\]
About the variance
- \(Var(X)\) is always greater than or equal to zero.
- Do not confuse the variance (which is a property of a random variable) with the sample variance (which is computed from a sample of \(n\) observations).
- The standard deviation of a random variable is defined as
\[SD\left( X \right)=\sqrt{Var(X)}\]
- A common symbol for \(Var(X)\) is \(σ^2\) and a common symbol for \(SD(X)\) is \(σ\) .