# Expected value and Variance of a Random Variable

I understand Mean (Expected Value) and Variance of Random variables as outlined on this page. I can't seem to apply those concepts to this problem, however.

Say there's a class of 50 people answering a question. There is a 60% chance that any given student knows the answer. Let $X$ be the number of students who get the correct answer.

My general sense for Expected Value in this case is just $0.6 \cdot 50=30$. But I don't think that's correct.

I don't even know how to approach Variance in this case. Each student is equally likely to get the correct answer and I keep getting large numbers which make no sense:

$$\sum_{i=0}^{50}\left(\left(i-30\right)^2\cdot0.6\right)\approx7395$$

That is obviously incorrect... can anybody offer any pointers?

• Let $X_i = 1$ if the $i$-th student gets the correct answer and $X_i = 0$ otherwise. What is the mean of $X_i$? What is the variance of $X_i$? Do these answers depend on $i$? Have you been taught that the mean of $X_1 + X_2 + \cdots + X_{50}$ is just the sum of the means? What about the variance of $X_1 + X_2 + \cdots + X_{50}$? – Dilip Sarwate Dec 6 '11 at 0:49

The expected value is $.6$ for each student, so, as you computed, the expected value for a class of $50$ would be $30$. That is, the expected value of a sum of random variables is the sum of the expected values of those random variables.
Let's compute the variance of each student's score. There is a $.6$ chance that they will get the problem right, and a $.4$ chance that they won't. Since the expected value is $.6$, the expected value of the square of the difference of the score and the expected score would be $.6(1-.6)^2+.4(0-.6)^2=.24$ ($.6$ chance of getting a score of $1$ and $.4$ chance of getting a score of $0$). Thus, the variance of each student's score is $.24$.
Now the variance of the sum of independent random variables is the sum of the variances of those random variables. Thus, the variance of the sum of the scores would be $.24\cdot50=12$
So the mean would be $30$ with a variance of $12$.