# Expected number of correct answers to exam if I guess at each question

I do an exam with $$12$$ questions. There are $$5$$ possible answers to each of the $$12$$ questions.

Is this the expected number of correct answers if I guess answer for each question? $$\frac15 \times 12 = 2.4$$

p.s. I am not actually doing an exam and this isn't homework. This is check I understand how expected values work.

• Assuming only one answer out of the five is correct and you guess completely at random, the number of correct questions follows a Binomial(12, 1/5) distribution with mean 12*1/5. Commented Jun 11, 2023 at 18:19
• @usεr11852 in the code you probably meant , sum(sample(c( ... instead of mean.
– Tim
Commented Jun 12, 2023 at 13:54
• And we can simulate this too: replicate(1e5, sum(sample(c(TRUE, FALSE), prob=c(1/5, 4/5), replace=TRUE, size=12))) |> mean() by taking the average of the proportion of the correctly answer questions in say 1e5 exams of 12 multiple questions with 5 options per question. Commented Jun 12, 2023 at 14:42

Correct. Single guess follows Bernoulli distribution with probability $$p = 1/5$$ so $$n$$ guesses follow binomial distribution with probability $$p$$ and number of samples $$n = 12$$, which has an expected value equal to $$np$$.

For a different approach to the solution, by the linearity of expectation, if the expected value of a single guess is $$E[X] = p$$ then for $$n$$ guesses $$E[nX] = n \, E[X] = np$$.

• I upvoted, although in my opinion, your second approach is much better than your first approach. "n guesses follow binomial distribution" is only true under an extra assumption of independence (which you didn't state); whereas your second approach, linearity of expectation, doesn't require that assumption and proves that the result is always $np$, even when the guesses are not independent. So, second approach is not only more simple, but it is also a better result.
– Stef
Commented Jun 12, 2023 at 15:46
• @Stef the question stated the assumption by saying that those are "random" guesses. But you are correct, the first approaches needs the assumption, the second doesn't.
– Tim
Commented Jun 12, 2023 at 15:53
• Okay, May I ask another, more detailed, question? Expected value (np) is intuitive for most of us, but the range of likely values is not so intuitive. Is there a straightforward way of working out, say, the 95% confidence interval? Commented Jun 14, 2023 at 14:52
• Confidence intervals are not relevant because no data or inferences are involved: this is a pure probability calculation using the Binomial probability formula.
– whuber
Commented Jun 14, 2023 at 15:11