Chapter 4. Probability Distributions: Random Variables
Variance of a Random Variable
Definition
The variance of a random variable #X# is the average squared deviation from its expected value.
The standard deviation of #X# is the positive square root of the variance.
Notation
\[\begin{array}{c}\mathbb{V}[X]\,\,\,\,\text{or}\,\,\,\,\sigma^2 \\\\
\mathbb{SD}[X]\,\,\,\,\text{or}\,\,\,\,\sigma
\end{array}\]
Variance and Standard Deviation of a Discrete Random Variable
Let #X# be a discrete random variable with expected value #\mathbb{E}[X]#, where:
\[\mathbb{E}[X] = \displaystyle\sum_{\text{all }x\text{ in }R(X)}x\cdot \mathbb{P}(X=x)\]
Then the variance of #X# is calculated as follows:
\[\mathbb{V}[X] = \mathbb{E}[(X - \mathbb{E}[X])^2] \]
Which can be rewritten in a way that is easier to compute:
\[\begin{array}{rcl}
\mathbb{V}[X] &=& \mathbb{E}[X^2] - (\mathbb{E}[X])^2 \\\\
&&\text{where} \\\\
\mathbb{E}[X^2] &=& \displaystyle\sum_{\text{all }x\text{ in }R(X)}x^2\cdot \mathbb{P}(X=x)
\end{array}\]
To calculate the standard deviation, simply take the positive square root of the variance:
\[\mathbb{SD}[X]=\sqrt{\mathbb{V}[X]}\]
Consider the following probability distribution of a discrete variable #X#:
#x# | #0# | #1# | #2# | #3# |
#\mathbb{P}(X=x)# | #0.4# | #0.2# | #0.1# | #0.3# |
Calculate the variance and standard deviation of #X#.
To calculate the variance of #X#, we use the following formula:
\[\mathbb{V}[X]=\mathbb{E}[X^2] - (\mathbb{E}[X])^2\]
Calculate #\mathbb{E}[X]#:
\[\begin{array}{rcl}
\mathbb{E}[X]&=&\sum\limits_{\text{all }x\text{ in }R(X)}x\cdot \mathbb{P}(X=x)\\\\
&=&0 \cdot \mathbb{P}(X=0) + 1 \cdot \mathbb{P}(X=1) +2 \cdot \mathbb{P}(X=2) +3 \cdot \mathbb{P}(X=3) \\\\
&=&0 \cdot 0.4 + 1 \cdot 0.2 + 2 \cdot 0.1 + 3 \cdot 0.3\\\\
&=& 1.3\\
\end{array}\]
Calculate #\mathbb{E}[X^2]#:
\[\begin{array}{rcl}
\mathbb{E}[X^2]&=&\sum\limits_{\text{all }x\text{ in }R(X)}x^2\cdot \mathbb{P}(X=x)\\\\
&=&0^2 \cdot \mathbb{P}(X=0) + 1^2 \cdot \mathbb{P}(X=1) +2^2 \cdot \mathbb{P}(X=2) +3^2 \cdot \mathbb{P}(X=3) \\\\
&=&0^2 \cdot 0.4 + 1^2 \cdot 0.2 + 2^2 \cdot 0.1 + 3^2 \cdot 0.3\\\\
&=& 3.3\\
\end{array}\]
Calculate #\mathbb{V}[X]#:
\[\begin{array}{rcl}
\mathbb{V}[X] &=& \mathbb{E}[X^2] - (\mathbb{E}[X])^2\\\\
&=& 3.3 - 1.3^2\\\\
&=& 1.61
\end{array}\]
To calculate the standard deviation, take the positive square root of the variance:
\[\begin{array}{rcl}
\mathbb{SD}[X] &=& \sqrt{\mathbb{V}[X]} \\\\
&=& \sqrt{1.61} \\\\
&=& 1.269
\end{array}\]
#\phantom{0}#
Variance and Standard Deviation of a Continuous Random Variable
The computation of the variance of a continuous random variable is done using integral calculus and is beyond the scope of this course.
Or visit omptest.org if jou are taking an OMPT exam.