# Getting wrong SD for X = number of days in a month picked at random from 12 months

From Pitman, Let X be the number of days in a month picked at random from the 12 months in a year (non-leap).

I calculated $E(X) = 30.42$ which is correct, and I calculate

$SD(X) = E(X^2)-(E(X))^2 = \dfrac{28^2}{12}+\dfrac{30^2 \times 4}{12}+\dfrac{31^2 \times 7}{12} - (30.42)^2$ = 0.5436

However, the answer in the book states $0.86$.

Where am I going wrong?

• The formula $E(X^{2}) - (E(X))^{2}$ gives the variance. – Nash J. Nov 26 '17 at 19:15

## 1 Answer

I get $$\Bbb E[X^2]=925.9166666...\\\Bbb E[X]=30.4166666...\\\therefore Var(X)=\Bbb E[X^2]-\Bbb E[X]^2=0.743055555...\\\therefore SD(X)=\sqrt{Var(X)}=0.86201...$$

You probably mistyped into your calculator when working out $\Bbb E[X^2]$. Also you worked out the variance, not the sd. For this you need to square root.