158 Chapter 5: Special Random Variables
Also, fori<j,
Cov(Xi,Xj)=E[XiXj]−E[Xi]E[Xj]
Now, because bothXiandXjare Bernoulli (that is, 0−1) random variables, it follows
thatXiXjis a Bernoulli random variable, and so
E[XiXj]=P{XiXj= 1 }
=P{Xi=1,Xj= 1 }
=
N(N−1)
(N+M)(N+M−1)
from Equation 5.3.3 (5.3.7)
So from Equation 5.3.2 and the foregoing we see that fori=j,
Cov(Xi,Xj)=
N(N−1)
(N+M)(N+M−1)
−
(
N
N+M
) 2
=
−NM
(N+M)^2 (N+M−1)
Hence, since there are
(n
2
)
terms in the second sum on the right side of Equation 5.3.5,
we obtain from Equation 5.3.6
Var(X)=
nNM
(N+M)^2
−
n(n−1)NM
(N+M)^2 (N+M−1)
=
nNM
(N+M)^2
(
1 −
n− 1
N+M− 1
)
(5.3.8)
If we letp=N/(N+M) denote the proportion of batteries in the bin that are acceptable,
we can rewrite Equations 5.3.4 and 5.3.8 as follows.
E(X)=np
Var(X)=np(1−p)
[
1 −
n− 1
N+M− 1
]
It should be noted that, for fixedp,asN+M increases to∞, Var(X) converges to
np(1−p), which is the variance of a binomial random variable with parameters (n,p).
(Why was this to be expected?)
EXAMPLE 5.3b An unknown number, say N, of animals inhabit a certain region.
To obtain some information about the population size, ecologists often perform the
following experiment: They first catch a number, sayr, of these animals, mark them
in some manner, and release them. After allowing the marked animals time to disperse