i am having a problem solving this one:
we toss a fair coin twice, and then we toss a coin one more for each time we got a H. let X denote the number of total H obtained.
what is the mean?
from what i understand, $E[X] = \sum_i P(X=x_i)$, so it should be equal to $0*P{x=0} + ... +4*P{x=4}$. the result should be, according to the written answer, 1.5, but i don't get that. what i wrote is right?
If 0 heads come up (w.p 0.25), $X = 0$ w.p. 0.25 (because no more coins are tossed)
If 1 head comes up (w.p. 0.5), $X=2$ w.p. 0.25 and $X=1$ w.p. 0.25 (because the extra toss is equally likely to come up head or tail)
If 2 heads come up (w.p. 0.25), $X=2$ w.p. 0.0625, $X=3$ w.p. 0.125, and $X=4$ w.p. 0.0625 (the two extra tosses can result in TT, HT, TH, or HH)
Combining it all, $P(X=0) = 0.25$, $P(X=1) = 0.25$, $P(X=2) = 0.3125$, $P(X=3) = 0.125$, and $P(X=4) = 0.0625$.
Probabilities add up to 1, so that's a good sign!
$\mathbb{E}[X] = 1 \times 0.25 + 2 \times 0.3125 + 3 \times 0.125 + 4 \times 0.0625 = 1.5$