# Find Variance and Standard Deviation

Five balls numbered $0,2,4,6,8$ are placed in a bag. After the balls are mixed, one of them is selected, its number is noted, and then it is replaced. If this experiment is repeated many times, find the variance and standard deviation of the numbers on the balls.

I choose $X=0,2,4,6,8$, and hence $f(0)= f(2)=f(4)=f(6)=f(8)= \frac15$. So I think to use the formula $\sigma^2=\mu_2-\mu^2$ to find variance where $\mu=\sum{xf(x)}$ and $\mu_2=\sum{x^2f(x)}$. This is what i think for this question!

-
Yes, this is the way to do it; but it seems your typesetting is off. Do you mean to write $\sigma^2= \sum x^2f(x)-(\sum xf(x))^2$? – David Mitra Dec 27 '11 at 12:20
@DavidMitra I and Srivatsan fixed the typesetting. Hope that's what OP intended. – user21436 Dec 27 '11 at 12:43
I find this question a bit puzzling (which presumably is the question-setter's fault, not neemy's). Would the mean and variance be any different if the experiment is not repeated many times? The question does ask for the variance and standard deviation of the numbers which could well mean: In $n$ experiments, the numbers $0,2,4,6,8$ were found to have occurred $n_0, n_2, n_4, n_6,$ and $n_8$ times where $n_0+n_2+n_4+n_6+n_8=n$. What is the variance and standard deviation? etc. – Dilip Sarwate Dec 27 '11 at 14:16

Yes, this is the way to do it.

But the problem is stated a little imprecisely. You should write something like: "Let the random variable $X$ be the number that appears on the selected ball. Find the variance and standard deviation of $X$".

The variance of a random variable $X$, denoted by $\sigma^2_{ X}$, can be calculated using the formula $$\sigma^2_X=\Bbb E(X^2)-[\Bbb E(X)]^2;$$

which, in the discrete case, gives $$\sigma^2_X=\sum_i x_i^2 p_X(x_i) -\bigl[\,\sum_i x_i p_X(x_i) \,\bigr]^2$$ where $p_X$ is the probability mass function of $X$ and the $x_i$ are the distinct values that $X$ takes.

In your problem, as you state, $X$ takes the values $0, 2, 4, 6, 8$ with equal probabilities $1/5$. So, $p_X(i)=1/5$ for $i=0,2,4,6, 8$, and: $$\sigma_X^2= \sum_{i\in\{0,2,4,6,8\}} i^2\cdot{\textstyle{1\over 5}} - \Bigl[ \sum_{i\in\{0,2,4,6,8\}} i \cdot{\textstyle{1\over 5}}\Bigr]^2.$$

I'll leave the actual computation to you.

Of course, the standard deviation of $X$ is just the square root of the variance.

-
@Kannappan Sampath adds: The $p_X$ is the function $f$ in your question, and the notation here is suggestive. – David Mitra Dec 27 '11 at 13:00
@Mitra Sorry for fixing up the answer myself, instead of leaving it as a comment and your fixing it later. I thought it was too minor to do this. – user21436 Dec 27 '11 at 13:07
@Kannappan Sampath Thanks for adding it; I just felt it was better to do it in a comment. – David Mitra Dec 27 '11 at 13:11
David, @Kannappan 's edit left some more undesirable traces: for instance, the variances are now denoted both by $\sigma_{X}^2$ and $\sigma^2$. – t.b. Dec 27 '11 at 13:17