Probability
13.0 Mean and variance of a discrete random variable
13.0 Mean and variance of a discrete random variable
Mean:
If a random variable $X$ takes the values ${x_1},{x_2},...,{x_n}$ with respective probabilities ${p_1},{p_2},...,{p_n}$ , then, the mean $\overline X $ of $X$ is defined as $$\overline X = {p_1}{x_1} + {p_2}{x_2} + {p_3}{x_3} + ..... + {p_n}{x_n} = \sum\limits_{i = 1}^n {{p_i}{x_i}} $$
The mean of a random variable $X$ is also known as its mathematical expectation and is denoted by $E(X)$.
Variance of a discrete random variable:
If a random variable $X$ takes the values ${x_1},{x_2},...,{x_n}$ with respective probabilities ${p_1},{p_2},...,{p_n}$ , then, the variance of $X$ is defined as
$$\begin{equation} \begin{aligned} Var(X) = {p_1}{({x_1} - \bar X)^2} + {p_2}{({x_2} - \bar X)^2} + .... + {p_n}{({x_n} - \bar X)^2} \\ Var(X) = \sum\limits_{i = 1}^n {{p_i}{{({x_i} - \bar X)}^2}} \\ Var(X) = \sum\limits_{i = 1}^n {{p_i}({x_i}^2 + {{\bar X}^2} - 2{x_i}\bar X)} \\ Var(X) = \sum\limits_{i = 1}^n {{p_i}{x_i}^2 + {{\bar X}^2}\sum\limits_{i = 1}^n {{p_i}} - 2\bar X\sum\limits_{i = 1}^n {{p_i}{x_i}} } \\ We\;know\;\;that, \\ \sum\limits_{i = 1}^n {{p_i}{x_i}} = \bar X\;\;\;and\;\;\sum\limits_{i = 1}^n {{p_i}} = 1 \\ Thus, \\ Var(X) = \sum\limits_{i = 1}^n {{p_i}{x_i}^2 + {{\bar X}^2}\sum\limits_{i = 1}^n {{p_i}} - 2\bar X\sum\limits_{i = 1}^n {{p_i}{x_i}} } \\ Var(X) = \sum\limits_{i = 1}^n {{p_i}{x_i}^2 + {{\bar X}^2}\sum\limits_{i = 1}^n {{p_i}} - 2\bar X.\bar X} \\ Var(X) = \sum\limits_{i = 1}^n {{p_i}{x_i}^2 + {{\bar X}^2}(1) - 2\bar X.\bar X} \\ Var(X) = \sum\limits_{i = 1}^n {{p_i}{x_i}^2 + {{\bar X}^2} - 2\bar X.\bar X} \\ Var(X) = \sum\limits_{i = 1}^n {{p_i}{x_i}^2 + {{\bar X}^2} - 2{{\bar X}^2}} \\ Var(X) = \sum\limits_{i = 1}^n {{p_i}{x_i}^2 - {{\bar X}^2}} \\ Var(X) = {\sum\limits_{i = 1}^n {{p_i}{x_i}^2 - \left( {\sum\limits_{i = 1}^n {{p_i}{x_i}} } \right)} ^2} \\ Var(X) = E({X^2}) - {[E(X)]^2} \\\end{aligned} \end{equation} $$
Standard deviation:
$$\sigma = \sqrt {Var(X)} $$
Illustration 45. A salesman wants to know the average number of units he sells per sales call. He checks his past sales records and comes up with the following probabilities:
Sales (in units): | $0$ | $1$ | $2$ | $3$ | $4$ | $5$ |
Probability: | $0.15$ | $0.20$ | $0.10$ | $0.05$ | $0.30$ | $0.20$ |
What is the average number of units he sells per sales call?
Solution: The average number of unit he sell per sales call is,
$$\begin{equation} \begin{aligned} E(X) = \sum\limits_{i = 1}^7 {{p_i}{x_i}} \\ = 0.15 \times 0 + 0.20 \times 1 + 0.10 \times 2 + 0.05 \times 3 + 0.30 \times 4 + 0.20 \times 5 \\ = 0 + 0.20 + 0.20 + 0.15 + 1.20 + 1.00 \\ = 2.75 \\\end{aligned} \end{equation} $$
The average number of units he sells per sales call is $2.75$.
Illustration 46. Find the mean, variance and standard deviation of the number of heads in a simultaneous toss of three coins.
Solution: Let $X$ denote the number of heads in a simultaneous toss of three coins.
The possibilities are:
i. No heads
$$\{ (TTT)\} $$
ii. Exactly one head
$$\{ (TTH),(HTT),(THT)\} $$
iii. Exactly two heads
$$\{ (HTH),(HHT),(THH)\} $$
iv. All heads
$$\{ (HHH)\} $$
Then, $X$ can take the values $ 0, 1, 2, 3$.
$$P(X = 0) = Getting\;no\;head = {1 \over 8}$$
$$P(X = 1) = Getting\;one\;head = {3 \over 8}$$
$$P(X = 2) = Getting\;two\;head = {3 \over 8}$$
$$P(X = 3) = Getting\;all\;three\;heads = {1 \over 8}$$
Thus, the probability distribution is,
$X$ | $0$ | $1$ | $2$ | $3$ |
$P(X)$ | ${1 \over 8}$ | ${3 \over 8}$ | ${3 \over 8}$ | ${1 \over 8}$ |
Mean and variance:
${x_i}$ | ${p_i} = P(X = {x_i})$ | ${p_i}{x_i}$ | ${p_i}{x_i}^2$ |
$0$ | ${1 \over 8}$ | $0$ | $0$ |
$1$ | ${3 \over 8}$ | ${3 \over 8}$ | ${3 \over 8}$ |
$2$ | ${3 \over 8}$ | ${6 \over 8}$ | ${{12} \over 8}$ |
$3$ | ${1 \over 8}$ | ${3 \over 8}$ | ${9 \over 8}$ |
$\sum\limits_{}^{} {{p_i}{x_i}} = {3 \over 2}$ | $\sum\limits_{}^{} {{p_i}{x_i}^2} = 3$ |
Thus we have,
$\sum\limits_{}^{} {{p_i}{x_i}} = {3 \over 2}$ and $\sum\limits_{}^{} {{p_i}{x_i}^2} = 3$
$$E(X) = \sum\limits_{}^{} {{p_i}{x_i}} = {3 \over 2}$$
Variance:
$$Var(X) = \sum\limits_{}^{} {{p_i}{x_i}^2} - {\left( {\sum\limits_{}^{} {{p_i}{x_i}} } \right)^2} = 3 - {\left( {{3 \over 2}} \right)^2} = {3 \over 4}$$
Standard deviation $$\sigma = \sqrt {Var(X)} = \sqrt {{3 \over 4}} = {{\sqrt 3 } \over 2} = 0.87$$