328 CHAPTER 6 Inferential Statistics
E(X) =
∑∞
n=1nP(X=n) =∑∞
n=1np(1−p)n−^1 = p∑∞
n=1n(1−p)n−^1.Note that
∑∞
n=1n(1−p)n−^1 =
d
dx(1 +x+x^2 +···)∣∣
∣∣
∣x=1−p=
d
dx(
1
1 −x)∣∣
∣∣
∣x=1−p=1
(1−x)^2∣∣
∣∣
∣x=1−p=1
p^2,
which implies that the mean of the geometric random variable X is
given by
E(X) = p∑∞
n=1n(p−1)n−^1 =1
p.
Notice that the smallerpbecomes, the longer the game is expected to
last.
Next, we turn to the variance ofX. By Equation 6.4 we haveVar(X) = E(X^2 )−1
p^2
=∑∞
n=1n^2 P(X=n)−1
p^2
= p∑∞
n=1n^2 (1−p)n−^1 −1
p^2