If a coin is tossed 4 times, then the possible outcomes are:
HHHH, HHHT, HHTT, HTTT, THHH, ...
For the longest string of heads, X can take the values 0, 1, 2, 3 and 4.
(As when a coin is tossed 4 times, we can get minimum 0 and maximum 4 strings.)
Now,
Thus, the probability distribution of X is given by
X |
P(X) |
0 |
|
1 |
|
2 |
|
3 |
|
4 |
|
Computation of mean and variance
xi |
pi |
pixi |
pixi2 |
0 |
|
0 |
0 |
1 |
|
|
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
1 |
|
|
pixi = 2 |
pixi2 = 5 |