Homework 6 answers in pdf format

STAT/MA 416 Answers
Homework 6
November 15, 2007
Solutions by Mark Daniel Ward
PROBLEMS
Chapter 6 Problems
2a. The mass p(0, 0) corresponds to neither of the first two balls being white, so p(0, 0) =
8 7
= 14/39. The mass p(0, 1) corresponds to the first ball being red and the second ball
13 12
8 5
being white, so p(0, 1) = 13
= 10/39. The mass p(1, 0) corresponds to the first ball being
12
5 8
white and the second ball being red, so p(1, 0) = 13
= 10/39. The mass p(1, 1) corresponds
12
5 4
= 5/39.
to both of the first two balls being white, so p(1, 1) = 13
12
3a. The mass p(0, 0) corresponds to the white balls numbered “1” and “2” not appearing
(11)
within the three choices, so p(0, 0) = 133 = 15/26. The mass p(0, 1) corresponds to the white
(3)
balls numbered “1” not being chosen, and the white ball numbered “2” getting chosen, within
(1)(11)
the three choices, so p(0, 1) = 1 13 2 = 5/26. The mass p(1, 0) corresponds to the white balls
(3)
numbered “2” not being chosen, and the white ball numbered “1” getting chosen, within the
(1)(11)
three choices, so p(1, 0) = 1 13 2 = 5/26. The mass p(1, 1) corresponds to both of the white
(3)
(2)(11)
balls numbered “1” and “2” appearing within the three choices, so p(1, 1) = 2 13 1 = 1/26.
(3)
5. The only modification
the
from problem 3a above is that 11
2 balls
are replaced
1 2 after1 each
3
11 3
1
11
draw. Thus p(0, 0) = 13 = 1331/2197; also, p(0, 1) = 3 13
+ 3 13 13 + 13 =
13
1
1 2
1
1
11
+3
+
397/2197; similarly, p(1, 0) = 397/2197; and finally, p(1, 1) = 6 13
13
13
13
13
1 2 1
3 13
= 72/2197.
13
7. We first note that X1 and X2 are independent, so the joint mass is the product of the
masses of X1 and X2 , i.e., p(x1 , x2 ) = pX1 (x1 )pX2 (x2 ). For k ≥ 0, the probability that
exactly k failures precede the first success is pX1 (k) = P (X1 = k) = (1 − p)k p, and similarly,
pX2 (k) = P (X2 = k) = (1 − p)k p. Therefore the joint mass is p(x1 , x2 ) = (1 − p)x1 +x2 p2 .
8a. To find c, we write
Z
∞
Z
∞
1=
Z
∞
Z
y
f (x, y) dx dy =
−∞
−∞
0
c(y 2 − x2 )e−y dx dy = 8c
−y
and thus c = 1/8.
8b. For all x, the marginal density of X is
Z
∞
fX (x) =
Z
∞
f (x, y) dy =
−∞
|x|
1
1 2
(y − x2 )e−y dy = (2 + 2|x|)e−|x|
8
8
1
2
For y ≥ 0, the marginal density of Y is
Z
Z ∞
f (x, y) dx =
fY (y) =
−∞
y
1 2
1
(y − x2 )e−y dx = e−y y 3
8
6
−y
For y < 0, the marginal density of Y is fY (y) = 0.
8c. The expected value of X is
Z ∞
Z ∞
1
x (2 + 2|x|)e−|x| dx = 0
xfX (x) dx =
E[X] =
−∞ 8
−∞
9a. We verify that this is a joint density by noting that f (x, y) ≥ 0 for all (x, y), and also
by computing
Z ∞Z ∞
Z 2Z 1 6 2 xy f (x, y) dx dy =
x +
dx dy = 1
2
−∞ −∞
0
0 7
9b. For 0 ≤ x ≤ 1, the marginal density of X is
Z 2 Z ∞
6 2 xy 6
f (x, y) dy =
fX (x) =
x +
dy = (2x2 + x)
2
7
0 7
−∞
For x < 0 and for x > 1, the marginal density of X is fX (x) = 0.
9c. The desired probability is
Z 1Z 1 6 2 xy P (X > Y ) =
x +
dx dy = 15/56
2
0
y 7
We could also have computed this by writing
Z 1Z x 6 2 xy P (X > Y ) =
x +
dy dx = 15/56
2
0
0 7
9d. The desired probability is
R 2 R 1/2 6 2 xy x + 2 dx dy
1
P (Y > 1/2 and X < 1/2)
1
7
1/2 0
=
=
P Y > X <
= 69/80
R 1/2 6
2
2
P (X < 1/2)
(2x2 + x) dx
0
9e. The expected value of X is
Z ∞
Z
E[X] =
xfX (x) dx =
−∞
0
1
7
6
x (2x2 + x) dx = 5/7
7
9f. First we need the marginal density of Y . For 0 ≤ y ≤ 2, the marginal density of Y is
Z ∞
Z 1 6 2 xy 6 1 1
fY (y) =
f (x, y) dx =
x +
dx =
+ y
2
7 3 4
−∞
0 7
For y < 0 and for y > 2, the marginal density of Y is fY (y) = 0. Now we can compute the
expected value of Y , which is
Z ∞
Z 2
6 1 1
E[Y ] =
yfY (y) dy =
y
+ y dy = 8/7
7 3 4
−∞
0
10a. We first compute
Z
∞
Z
P (X < Y ) =
0
0
y
e−(x+y) dx dy = 1/2
3
Another method is to compute
Z
∞
Z
P (X < Y ) =
0
∞
e−(x+y) dy dx = 1/2
x
Finally, a third method is to just notice that X and Y are independent and have the same
distribution, so half the time we have X < Y and the other half of the time we have Y < X.
Thus P (X < Y ) = 1/2.
10b. For a < 0, we have P (X < a) = 0. For a > 0, we compute
Z ∞Z a
Z ∞Z a
f (x, y) dx dy =
e−(x+y) dx dy = 1 − e−a
P (X < a) =
−∞
−∞
0
0
Another method is to simply note that the joint density of X and Y shows us that, in this
case, X and Y must be independent exponential random variables, each with λ = 1. So
P (X < a) = 1 − e−a for a > 0, and P (X < a) = 0 otherwise, since this is the cumulative
distribution function of an exponential random variable.
12. We let X and Y denote, respectively, the number of men and women who enter the
drugstore. We assume that X and Y are independent, and X is Poisson with mean 5, and
Y is Poisson with mean 5; this agrees with the problem statement that X + Y is Poisson
with mean 10. Therefore
e−5 50 e−5 51 e−5 52 e−5 53
118 −5
+
+
+
=
e ≈ .2650
0!
1!
2!
3!
3
13. One possibility is to compute the desired area, (30)(10) = 300 (units given in minutes)
over the entire area of the sample space, (30)(60) = 1800, so the desired probability is
300/1800 = 1/6.
Another possibility is to integrate:
Z 45 Z x+5
1
1
dy dx =
6
15
x−5 1800
P (X ≤ 3 | Y = 10) = P (X ≤ 3) =
A third possibility is to notice that, regardless of when the man arrives, the woman has a
total interval of 10 out of 60 minutes in which she must arrive, so the desired probability is
10
= 16 .
60
The woman arrives first half of the time, and the man arrives first half of the time.
14. We write X for the location of the ambulence, and Y for the location of the accident, both
in the interval [0, L]. The distance in between is D = |X − Y |. We know that P (D < a) = 0
for a < 0 and P (D < a) = 1 for a = L, since the minimum and maximum distances for D
are 0 and L, respectively. So D must be between 0 and L.
Perhaps the easiest method for computing P (D < a) with 0 ≤ a ≤ L is to draw a picture
of the sample space and then divide the desired area over the entire area of the sample space;
this method works since the joint distribution of X, Y is uniform. So the desired probability
1
1
(L−a)2
(L−a)2
is 1 − 2 L2 − 2 L2 = a(2L − a)/L2 .
Another possibility is to integrate, and we need to break the desired integral into three
regions:
Z a Z x+a
Z L−a Z x+a
Z L Z L
1
1
1
P (D < a) =
dy dx +
dy dx +
dy dx = a(2L − a)/L2
2
2
2
L
0
0
a
x−a L
L−a x−a L
4
19a. The marginal density of X is fX (x) = 0 for x ≤ 0 and also for x ≥ 1. For 0 < x < 1,
the marginal density of X is
Z x
1
fX (x) =
dy = 1
0 x
19b. The marginal density of Y is fY (y) = 0 for y ≤ 0 and also for y ≥ 1. For 0 < y < 1,
the marginal density of Y is
Z 1
1
fY (y) =
dx = ln(1/y)
y x
19c. The expected value of X is
Z
E[X] =
∞
xfX (x) dx =
(x)(1) dx = 1/2
−∞
0
19c. The expected value of Y is
Z
Z ∞
yfY (y) dy =
E[Y ] =
−∞
1
Z
1
y ln(1/y) dy = 1/4
0
To see this, use integration by parts, with u = ln(1/y) and dv = y dy.
20a. Yes, X and Y are independent, because we can factor the joint density as follows:
f (x, y) = fX (x)fY (y), where
(
(
xe−x x > 0
e−y y > 0
fX (x) =
fY (y) =
0
else
0
else
20b. No; in this case, X and Y are not independent. To see this, we note that the density
is nonzero when 0 < x < y < 1. So the domain does not allow us to factor the joint density
into two separate regions. For instance, P 41 < X < 1 > 0 since
X can be in the range
1
1
between 1/4 and 1. On the other hand, P 4 < X < 1 Y = 8 = 0, since X cannot be in
the range between 1/4 and 1 when Y = 1/8; instead, X must always be smaller than Y .
23a. Yes, X and Y are independent, because we can factor the joint density as follows:
f (x, y) = fX (x)fY (y), where
(
(
6x(1 − x) 0 < x < 1
2y 0 < y < 1
fX (x) =
fY (y) =
0
else
0 else
R∞
R1
23b. We compute E[X] = −∞ xfX (x) dx = 0 x6x(1 − x) dx = 1/2.
R∞
R1
23c. We compute E[Y ] = −∞ yfY (y) dy = 0 y2y dy = 2/3.
R∞
R1
23d. We compute E[X 2 ] = −∞ x2 fX (x) dx = 0 x2 6x(1 − x) dx = 3/10. Thus Var(X) =
2
3
− 12 = 1/20.
10
2
R∞
R1
23e. We compute E[Y 2 ] = −∞ y 2 fY (y) dy = 0 y 2 2y dy = 1/2. Thus Var(Y ) = 21 − 32 =
1/18.
27a. The joint density of X, Y is f (x, y) = 1e−y for 0 < x < 1 and y > 0. The cumulative
distribution function of Z = X + Y is P (Z ≤ a) = 0 for a ≤ 0, since Z is never negative in
5
this problem. For 0 < a < 1, we compute
Z a Z a−x
e−y dy dx = e−a − 1 + a
P (Z ≤ a) =
0
0
For 1 ≤ a, we compute
Z
1
Z
a−x
P (Z ≤ a) =
0
e−y dy dx = e−a + 1 − e1−a
0
So the cumulative distribution function of Z is


0
FZ (a) = P (Z ≤ a) = e−a − 1 + a

e−a + 1 − e1−a
a≤0
0<a<1
a≥1
27b. The cumulative distribution function of Z = X/Y is P (Z ≤ a) = 0 for a ≤ 0, since Z
is never negative in this problem. For 0 < a, we compute
Z 1/a Z ay
Z ∞Z 1
X
−y
P (Z ≤ a) = P
≤ a = P (X ≤ aY ) =
e dxdy+
e−y dxdy = a(1−e−1/a )
Y
0
0
1/a 0
An alternate method of computing is to write
Z 1Z ∞
X
1
P (Z ≤ a) = P
≤a =P
X≤Y =
e−y dy dx = a(1 − e−1/a )
Y
a
0
x/a
So the cumulative distribution function of Z is
(
0
a≤0
FZ (a) = P (Z ≤ a) =
−1/a
a(1 − e
) 0<a
28. The cumulative distribution function of Z = X1 /X2 is P (Z ≤ a) = 0 for a ≤ 0, since Z
is never negative in this problem. For 0 < a, we compute
Z ∞ Z ax2
λ1 a
X1
≤ a = P (X1 ≤ aX2 ) =
λ1 λ2 e−(λ1 x1 +λ2 x2 ) dx1 dx2 =
P (Z ≤ a) = P
X2
λ1 a + λ2
0
0
An alternative method of computing is to write
Z ∞Z ∞
X1
1
λ1 a
≤a =P
X1 ≤ X2 =
λ1 λ2 e−(λ1 x1 +λ2 x2 ) dx2 dx1 =
P (Z ≤ a) = P
X2
a
λ1 a + λ2
0
x1 /a
31a. The number of crashes X in a month is roughly Poisson with mean λ = 2.2, so the
probability that X is more than 2 is
e−2.2 2.20 e−2.2 2.21 e−2.2 2.22
−
−
≈ .3773
0!
1!
2!
31b. The number of crashes X in two months is roughly Poisson with mean λ = (2)(2.2) =
4.4, so the probability that X is more than 4 is
P (X > 2) = 1 − P (X ≤ 2) = 1 −
e−4.4 4.40 e−4.4 4.41 e−4.4 4.42 e−4.4 4.43 e−4.4 4.44
−
−
−
−
≈ .4488
0!
1!
2!
3!
4!
32a. We assume that the weekly sales in separate weeks is independent. Thus, the number
of the mean sales in two weeks is (by independence) simply (2)(2200) = 4400. The variance
of sales in one week is 2302 , so that variance of sales in two weeks is (by independence) simply
P (X > 4) = 1−P (X ≤ 4) = 1−
6
(2)(2302 ) = 105,800. So the sales in two weeks, denoted by X, has normal distribution with
mean 4400 and variance 105,800. So
X − 4400
5000 − 4400
P (X > 5000) = P √
> √
105,800
105,800
≈ P (Z > 1.84)
= 1 − P (Z ≤ 1.84)
= 1 − Φ(1.84)
≈ 1 − .9671
= .0329
32b. The weekly sales Y has normal distribution with mean 2200 and variance 2302 =
52,900. So, in a given week, the probability p that the weekly sales Y exceeds 2000 is
p = P (Y > 2000)
Y − 2200
2000 − 2200
=P √
> √
52,900
52,900
≈ P (Z > −.87)
= P (Z < .87)
= Φ(.87)
≈ .8078
The
probability 3that
3 weekly sales exceeds 2000 in at least 2 out of 3 weeks is (approximately)
3 2
p
(1
−
p)
+
p = .9034.
2
3
33a. Write X for Jill’s bowling scores, so X is normal with mean 170 and variance 202 = 400.
Write Y for Jack’s bowling scores, so Y is normal with mean 160 and variance 152 = 225. So
−X is normal with mean −170 and variance 202 = 400. Thus, Y − X is nomal with mean
160 − 170 = −10 and variance 225 + 400 = 625. So the desired probability is approximately
0 − (−10)
Y − X − (−10)
√
> √
P (Y − X > 0) = P
625
625
2
=P Z>
5
2
=1−P Z ≤
5
= 1 − Φ(.4)
≈ 1 − .6554
= .3446
7
Since the bowling scores are actually discrete integer values, we get an even better approximation by using continuity correction
P (Y − X > 0) = P (Y − X ≥ .5)
Y − X − (−10)
.5 − (−10)
√
=P
> √
625
625
= P (Z > .42)
= 1 − P (Z ≤ .42)
= 1 − Φ(.42)
≈ 1 − .6628
= .3372
33b. The total of their scores, X + Y , is nomal with mean 160 + 170 = 330 and variance
225 + 400 = 625. So the desired probability is approximately
X + Y − 330
350 − 330
√
P (X + Y > 350) = P
> √
625
625
4
=P Z>
5
= 1 − P (Z ≤ .8)
= 1 − Φ(.8)
≈ 1 − .7881
= .2119
Since the bowling scores are actually discrete integer values, we get an even better approximation by using continuity correction
X + Y − 330
350.5 − 330
√
√
P (X + Y ≥ 350.5) = P
>
625
625
= P (Z > .82)
= 1 − P (Z ≤ .82)
= 1 − Φ(.82)
≈ 1 − .7939
= .2061
34a. The number of males X who never eat breakfast is Binomial with n = 200 and
p = .252; the number of females who never eat breakfast is Binomial with n = 200 and
p = .236. Thus X is approximately normal with mean np = (200)(.252) = 50.4 and variance
npq = 37.6992, and Y is approximately normal with mean np = (200)(.236) = 47.2 and
variance npq = 36.0608. So X +Y is approximately normal with mean 50.4+47.2 = 97.6 and
variance 37.6992 + 36.0608 = 73.76. So the desired probability, using continuity correction,
8
is approximately
P (X + Y ≥ 110) = P (X + Y ≥ 109.5)
X + Y − 97.6
109.5 − 97.6
√
=P
≥ √
73.76
73.76
= P (Z ≥ 1.39)
= 1 − P (Z ≤ 1.39)
= 1 − Φ(1.39)
≈ 1 − .9177
= .0823
34b. We note that −X is approximately normal with mean −50.4 and variance 37.6992.
So Y − X is approximately normal with mean 47.2 − 50.4 = −3.2 and variance 37.6992 +
36.0608 = 73.76. So the desired probability, using continuity correction, is approximately
P (Y ≥ X) = P (Y − X ≥ 0)
= P (Y − X ≥ −.5)
Y − X − (−3.2)
−.5 − (−3.2)
√
√
=P
≥
73.76
73.76
= P (Z ≥ .31)
= 1 − P (Z ≤ .31)
= 1 − Φ(.31)
≈ 1 − .6217
= .3783
38a. The conditional mass of Y1 given Y2 = 1 is
pY1 |Y2 (0|1) =
397
p(0, 1)
397/2197
p(0, 1)
=
=
=
3
pY2 (1)
1 − pY2 (0)
469
1 − 12
13
pY1 |Y2 (1|1) =
p(1, 1)
p(1, 1)
72/2197
72
=
=
3 =
12
pY2 (1)
1 − pY2 (0)
469
1 − 13
and
38b. The conditional mass of Y1 given Y2 = 0 is
pY1 |Y2 (0|0) =
p(0, 0)
1331/2197
1331
=
=
3
12
pY2 (0)
1728
13
and
pY1 |Y2 (1|0) =
p(1, 0)
397/2197
397
=
=
3
12
pY2 (0)
1728
13
41a. The conditional mass function of X given Y = 1 is
pX|Y (1, 1) =
p(1, 1)
=
pY (1)
1
8
1
8
+
1
8
= 1/2
and
pX|Y (2, 1) =
p(2, 1)
=
pY (1)
1
8
1
8
+
1
8
= 1/2
9
The conditional mass function of X given Y = 2 is
pX|Y (1, 2) =
p(1, 2)
=
pY (2)
1
4
1
4
+
1
2
= 1/3
and
pX|Y (2, 2) =
p(2, 2)
=
pY (2)
1
2
1
4
+
1
2
= 2/3
41b. Since the conditional mass of X changes depending on the value of Y , then the value
of Y affects the various probabilities for X, so X and Y are not independent.
41c. We compute
P (XY ≤ 3) = p(1, 1) + p(2, 1) + p(1, 2) =
1
1 1 1
+ + =
8 8 4
2
and
P (X + Y > 2) = p(2, 1) + p(1, 2) + p(2, 2) =
1 1 1
7
+ + =
8 4 2
8
and
P (X/Y > 1) = p(2, 1) = 1/8
43. The density of Y given X = x, for 0 ≤ x < ∞, is
f (x, y)
c(x2 − y 2 )e−x
3
c(x2 − y 2 )e−x
fY |X (y|x) =
=
=
= Rx
4
fX (x)
4
c 3 e−x x3
c(x2 − y 2 )e−x dy
−x
1 y2
−
x x3
49a. We see that min(X1 , . . . , X5 ) ≤ a if and only if at least one of the Xi ’s has Xi ≤ a. So
P (min(X1 , . . . , X5 ) ≤ a) = 1 − P (min(X1 , . . . , X5 ) > a)
= 1 − P (X1 > a, . . . , X5 > a)
= 1 − P (X1 > a) · · · P (X5 > a)
= 1 − (e−λa )5
= 1 − e−5λa
49b. We see that max(X1 , . . . , X5 ) ≤ a if and only if all Xi ’s have Xi ≤ a. So
P (max(X1 , . . . , X5 ) ≤ a) = P (X1 ≤ a, . . . , X5 ≤ a) = P (X1 ≤ a) · · · P (X5 ≤ a) = (1−e−λa )5
√
54a. We see that
p u u = g1 (x, y) = xy and v = g2 (x, y) = x/y. Thus x = h1 (u, v) = uv and
y = h2 (u, v) = v . The Jacobian is
y x x x
2x
J(x, y) = 1 −x = − − = −
y
y
y
y
y2
so |J(x, y)|−1 =
y
.
2x
Therefore the joint density of U, V is
fU,V (u, v) = fX,Y (x, y)|J(x, y)|−1 =
1
x2 y 2
y
1
1
1
= 3 = √ 3p u = 2
2x
2x y
2u v
2( uv)
v
54b. We did not discuss these marginal densities in class, but just in case you wanted to
know, we can calculate:
The marginal density of U is fU (u) = 0 for u < 1; for u ≥ 1, the marginal density of U is
Z u
1
ln(u)
dv =
2
u2
1/u 2u v
10
The marginal density of V is fV (v) = 0 for v ≤ 0; for 0 < v ≤ 1, the marginal density of V
is
Z ∞
1
du = 1/2
2
1/v 2u v
For v > 1, the marginal density of V is
Z ∞
1
1
du = 2
2
2u v
2v
v
57. We see that y1 = g1 (x1 , x2 ) = x1 + x2 and y2 = g2 (x1 , x2 ) = ex1 . Thus x1 = h1 (y1 , y2 ) =
ln(y2 ) and x2 = y1 − ln(y2 ). The Jacobian is
1 1
J(x, y) = x1 = −ex1
e
0
so |J(x, y)|−1 = e−x1 . Therefore the joint density of Y1 , Y2 is
fY1 ,Y2 (y1 , y2 ) = fX1 ,X2 (x1 , x2 )|J(x1 , x2 )|−1
= λ1 λ2 e−λ1 x1 −λ2 x2 e−x1
= λ1 λ2 e−((λ1 +1)x1 +λ2 x2 )
= λ1 λ2 e−((λ1 +1) ln(y2 )+λ2 (y1 −ln(y2 ))
= λ1 λ2 y2−λ1 +λ2 −1 e−y1 λ2
Chapter 7 Problems
5. Since the accident occurs at a point uniformly distributed in the square, then the accident
occurs at the point (X, Y ), where X and Y are each uniform on (−1.5, 1.5), and also X and
Y are independent. So the expected travel distance to the hospital is
E[|X| + |Y |] = E[|X|] + E[|Y |]
Z 1.5
Z 1.5
1
1
|x| dx +
=
|y| dy
3
3
−1.5
−1.5
Z
Z 1.5
Z 0
=
(−x)(1/3) dx +
(x)(1/3) dx +
−1.5
0
0
−1.5
Z
1.5
(y)(1/3) dy
(−y)(1/3) dy +
0
3 3 3 3
+ + +
8 8 8 8
= 12/8
=
= 3/2
7a. The expected number of objects chosen by both A and B is X = X1 + · · · + X10 where
(
1 if A and B both choose the ith object
Xi =
0 otherwise
So E[Xi ] = P (Xi = 1) = (3/10)(3/10) = 9/100. Thus E[X] = 10(9/100) = .9.
7b. The number of objects not chosen by both A nor B is X = X1 + · · · + X10 where
(
1 if neither A nor B choose the ith object
Xi =
0 otherwise
11
So E[Xi ] = P (Xi = 1) = (7/10)(7/10) = 49/100. Thus E[X] = 10(49/100) = 4.9.
7c. The number of objects chosen by exactly one of A or B is X = X1 + · · · + X10 where
(
1 if exactly one of A or B choose the ith object
Xi =
0 otherwise
So E[Xi ] = P (Xi = 1) = (7/10)(3/10)+(3/10)(7/10) = 42/100. Thus E[X] = 10(42/100) =
4.2.
9a. The number of empty urns is X = X1 + · · · + Xn where
(
1 if urn i is empty
Xi =
0 otherwise
Only the balls numbered i, i + 1, i + 2, . . . , n can possibly go into urn i. The probability that
ball i goes into urn i is 1/i; the probability that ball i + 1 goes into urn i is 1/(i + 1); the
probability that ball i + 2 goes
into urn
i is 1/(i 1+ 2); etc., etc. So the probability that urn
1
1
1
i is empty is 1 − i 1 − i+1 1 − i+2 · · · 1 − n , or more simply
i
i+1
n−1
i−1
i−1
···
=
i
i+1
i+2
n
n
Pn i−1
Pn
(n−1)(n)
1
1
(i
−
1)
=
So E[Xi ] = P (Xi = 1) = i−1
.
Thus
E[X]
=
=
.
= n−1
i=1 n
i=1
n
n
n
2
2
9b. There is only one way that none of the urns can be empty: Namely, the ith ball must
go into the ith urn for each i. To see this, first note that the nth ball is the only ball that
can go into the nth urn. Next, there are two balls, the n − 1 and n ball that can go in urn
n − 1, but the nth ball is already committed to the nth urn, so ball n − 1 must go into urn
n − 1. Next, there are three balls, the n − 2, n − 1, and n ball that can go in urn n − 2,
but balls n and n − 1 are already committed to urns n and n − 1, respectively, so ball n − 2
must go into urn n − 2. Similar reasoning continues.
1 1 1
So the probability that none of the urns are empty is n1 n−1
·
·
·
= n!1 .
n−2
1
11. The number of changeovers is X = X2 + · · · + Xn where
(
1 if a changeover occurs from the (i − 1)st flip to the ith flip
Xi =
0 otherwise
So E[Xi ] = P (Xi = 1) = p(1 − p) + (1 − p)p = 2p(1 − p). Thus E[X] = (n − 1)(2p)(1 − p).
12a. The number of men who have a woman sitting next to them is X = X1 + · · · + Xn
where
(
1 if the ith man has a woman sitting next to him
Xi =
0 otherwise
So E[Xi ] = P (Xi = 1). There are two seats on the end of the aisle where a man can sit; for
each such seat, the probability that he is sitting there is 1/(2n), and the probability that a
woman is sitting next to him afterwards is n/(2n − 1). So the probability a specific man sits
n
1
1
= 2n−1
. There are 2n − 2
on the left or right end, with a woman next to him, is 2 2n
2n−1
sets in the middle of the row; for each such seat, the probability that he is sitting there
is 1/(2n), and the probabilty that a woman is sitting next to him afterwards (only on his
n
n−1
n−1
n
n
n−1
3n
left; only on his right; both sides; respectively) is 2n−1
+ 2n−1
+ 2n−1
= 2(2n−1)
.
2n−2
2n−2
2n−2
12
So the probability that a specific man sits in the middle, with a woman next to him, is
3(2n−2)
1
3n
1
(2n − 2) 2n
= 4(2n−1)
. So the total probability is E[Xi ] = P (Xi = 1) = 2n−1
+ 3(2n−2)
=
2(2n−1)
4(2n−1)
3n−1
3n−1
= n(3n−1)
. Thus E[X] = n 2(2n−1)
.
2(2n−1)
2(2n−1)
12b. If the group is randomly seated at a round table, then we write X = X1 + · · · + Xn
where
(
1 if the ith man has a woman sitting next to him
Xi =
0 otherwise
So E[Xi ] = P (Xi = 1). Regardless of where the ith man sits, the probability that a woman
is sitting next to him afterwards (only on his left; only on his right; both sides; respectively)
3n
n
n−1
n−1
n
n
n−1
3n
3n
=
is 2n−1
+
+
=
.
So
E[X
]
=
.
Thus
E[X]
=
n
i
2n−2
2n−1 2n−2
2n−1 2n−2
2(2n−1)
2(2n−1)
2(2n−1)
3n2
.
2(2n−1)
13. The number of people whose age matches their card is X = X1 + · · · + X1000 where
(
1 if the ith person’s age matches his card
Xi =
0 otherwise
So E[Xi ] = P (Xi = 1) =
1
.
1000
Thus E[X] = 1000(1/1000) = 1.