334 CHAPTER 6 Inferential Statistics
• HH
HH
HHT
(B 1 = 0 and we start the experiment over again
with one trial already having been performed.)
HH
HHH
T
(B 1 = 1, B 2 = 0 and we start the experiment
over again with two trials already having been
performed.)
H
H (B 1 =B 2 = 1 and the game is over)
1 −p
p
1 −p
p
Computing the expectation of both sides of (6.6) quickly yields
E(X) = 2p^2 +p(1−p)(2 +E(X)) + (1−p)(1 +E(X)),
from which it follows that
E(X) =
1 +p
p^2
.
Note that if the coin is fair, then the expected waiting time before
seeing two heads in a row is 6.
Similar analyses can be applied to computing the expected wait-
ing time before seeing the sequence HT (and similar) sequences, see
Exercises 8, 9, and 10 on page 341.
6.1.7 The hypergeometric distribution
This distribution is modeled by a box containingN marbles, of which
nof these are of a particular type (“successful” marbles) and so there
areN −n “unsuccessful” marbles. If we draw k marbles without re-
placement, and ifXis the random variable which measures the number
of successful marbles drawn, thenX has distribution given by
P(X=m) =
Än
m
äÄN−n
k−m
ä
ÄN
k
ä , m= 0, 1 , 2 ,...,max{n,k}.
From the above it follows that the mean ofXis given by the sum