Heads minus tails for three coin tosses
Unit 3 Topic 5: Discrete random variables
The question
A fair coin is tossed 3 times. Let \(X\) be the number of heads minus the number of tails.
- (a) Determine the probability distribution of \(X\). [2 marks]
- (b) Determine \(E(X)\) and \(Var(X)\). [2 marks]
- (c) Let \(Y=1\) if \(X>0\) and \(Y=0\) otherwise. Determine \(Var(Y)\). [1 mark]
The idea. List the number of heads first, then turn each count into heads minus tails. The probabilities come from the number of heads, and they are symmetric about 0.
The answer, one mark at a time
-
Part (a)
With 3 tosses you get 0, 1, 2 or 3 heads. If there are \(h\) heads there are \(3 - h\) tails, so heads minus tails is \(2h - 3\).
\[X = h - (3 - h) = 2h - 3\]\[h = 0, 1, 2, 3 \Rightarrow X = -3, -1, 1, 3\]states the possible values [1 mark]
-
There are \(2^{3} = 8\) equally likely sequences. Count the sequences with each number of heads: 1, 3, 3 and 1.
\[P(X = -3) = P(h = 0) = \frac{1}{8}\]\[P(X = -1) = P(h = 1) = \frac{3}{8}\]\[P(X = 1) = P(h = 2) = \frac{3}{8}\]\[P(X = 3) = P(h = 3) = \frac{1}{8}\]determines the probabilities [1 mark]
-
Part (b)
Multiply each value by its probability and add. The distribution is symmetric about 0, so the mean is 0.
\[E(X) = -3\left(\frac{1}{8}\right) - 1\left(\frac{3}{8}\right)\]\[+ 1\left(\frac{3}{8}\right) + 3\left(\frac{1}{8}\right)\]\[E(X) = 0\]determines the mean [1 mark]
-
Find \(E(X^{2})\) by squaring each value, then subtract the square of the mean.
\[E(X^{2}) = \frac{9(1) + 1(3) + 1(3) + 9(1)}{8}\]\[= \frac{24}{8} = 3\]\[\mathrm{Var}(X) = E(X^{2}) - \left(E(X)\right)^{2} = 3 - 0^{2} = 3\]determines the variance [1 mark]
-
Part (c)
\(Y\) is 1 or 0, so it is a Bernoulli variable with \(p = P(X > 0)\). Its variance is \(p(1 - p)\).
\[p = P(X = 1) + P(X = 3) = \frac{3}{8} + \frac{1}{8} = \frac{1}{2}\]\[\mathrm{Var}(Y) = p(1 - p) = \frac{1}{2} \times \frac{1}{2} = \frac{1}{4}\]determines the variance [1 mark]
Answer
Watch for. \(X\) is heads minus tails, not the number of heads. Its values are \(-3, -1, 1, 3\), not \(0, 1, 2, 3\).