Example
Find the expected value and variance of $X$ for the following probability distribution.
$x$ | 1 | 2 | 3 | 4 |
---|---|---|---|---|
$P(X=x)$ | 0.0625 | 0.1875 | 0.3125 | 0.4375 |
Solution
The Expected value of $X$ is
$$ \begin{aligned} E(X) &= \sum_x x*P(X=x) \end{aligned} $$
The expected value of $X^2$ is
$$ \begin{aligned} E(X^2) &= \sum_x x^2*P(X=x) \end{aligned} $$
The variance of $X$ is
$$ \begin{aligned} V(X) &= E[X-E(X)]^2 \\ &= E(X^2) - [E(X)]^2 \end{aligned} $$
$x$ | $P(X=x)$ | $x*P(X=x)$ | $x^2*P(X=x)$ |
---|---|---|---|
1 | 0.0625 | 0.0625 | 0.0625 |
2 | 0.1875 | 0.375 | 0.75 |
3 | 0.3125 | 0.9375 | 2.8125 |
4 | 0.4375 | 1.75 | 7 |
$$ \begin{aligned} \text{Mean } & =E(X)\\ & =\sum x*P(X=x) \\ & =(1*0.0625)+(2*0.1875)+(3*0.3125)+(4*0.4375) \\ & = 3.125 \end{aligned} $$
$$ \begin{aligned} E(X^2) & =\sum x^2*P(X=x) \\ & =(1*0.0625)+(4*0.1875)+(9*0.3125)+(16*0.4375)\\ & = 10.625 \end{aligned} $$
$$ \begin{aligned} V(X) &= E(X^2)-[E(X)]^2\\ &= 10.625 - [3.125]^2\\ &= 0.859375 \end{aligned} $$
$$sd = \sqrt{V(X)} =\sqrt{0.859375} = 0.9270248$$