330 CHAPTER 6 Inferential Statistics
Next, ifX is the binomial random variable with success probabilityp,
then we may write
X = B 1 +B 2 +···+Bn,where eachBi is a Bernoulli random variable. It follows easily from
what we already proved above that
E(X) = E(B 1 ) +E(B 2 ) +···E(Bn) = np,and
Var(X) = Var(B 1 ) + Var(B 2 ) +···+ Var(Bn) = np(1−p).6.1.6 Generalizations of the geometric distribution
Generalization 1: The negative binomial distribution
Suppose that we are going to perform a numberX of Bernoulli trials,
each with success probabilityp, stopping after exactlyrsuccesses have
occurred. Then it is clear that
P(X=x) =Ñ
x− 1
r− 1é
pr(1−p)x−r.In order to compute the mean and variance ofXnote thatXis easily
seen to be the sum of geometric random variablesG 1 , G 2 , ...,Gr, where
the success probability of each isp:
X = G 1 +G 2 +···+Gr.Using the results of (6.1.4) we have, for eachi= 1, 2 , ...,r, that
E(Gi) =1
p, Var(Gi) =1 −p
p^2.
It follows, therefore, that the mean and variance of the negative bino-
mial random variableX are given by