reference solutions

advertisement
1206/DCP1206 Probability, Fall 2014
5-Jan-2015
Homework 5 Solutions
Instructor: Prof. Wen-Guey Tzeng
1. Let the joint probability mass function of discrete random variables X and Y be given
by
c(x + y) if x = 1, 2, 3, y = 1, 2
p(x, y) =
0
otherwise
Answer.
(a) the value of the constant c
P3 P2
x=1
y=1 c(x + y) = 1, implies that c = 1/21.
(b) the marginal probability mass functions of X and Y.
P
pX (x) = 2y=1 (1/21)(x + y) = (2x + 3)/21. x = 1, 2, 3.
P
pY (y) = 3x=1 (1/21)(x + y) = (6 + 3y)/21. y = 1, 2.
(c) P (X ≥ 2|Y = 1)
P (X ≥ 2|Y = 1) =
p(2,1)+p(3,1)
pY (1)
=
7.21
9/21
= 7/9
(d)E(X) and E(Y ).
P
P
E(X) = 3x=1 2y=1 (1/21)x(x + y) = 46/21
P
P
E(Y ) = 3x=1 2y=1 (1/21)y(x + y) = 11/7
2
2. Two dice are rolled. The sum of the outcomes is denoted by X and the absolute value
of their difference by Y . Calculate the joint probability mass function of X and Y
and the marginal probability mass functions of X and Y .
Answer. Table 1 gives p(x, y), the joint probability mass function of X and Y; pX (x),
the marginal probability mass function of X; and pY (y), the marginal probability mass
function of Y .
2
3. Two points are placed on a segment of length l independently and at random to divide
the line into three parts. What is the probability that the length of none of the three
parts exceeds a given value α, l/3 ≤ α ≤ l?
Answer. Let X and Y be the two points that are placed on the segment. Let E be
the event that the length of none of the three parts exceeds the given value α. Clearly,
P (E|X < Y ) = P (E|Y < X) and P (X < Y ) = P (Y < X) = 1/2. Therefore,
P (E) = P (E|X < Y )P (X < Y ) + P (E|Y < X)P (Y < X) = P (E|X < Y )1 +
P (E|X < Y )1 = P (E|X < Y ).
1-1
y
x
2
3
4
5
6
7
8
9
10
11
12
pY (y)
0
1/36
0
1/36
0
1/36
0
1/36
0
1/36
0
1/36
6/36
1
0
2/36
0
2/36
0
2/36
0
2/36
0
2/36
0
10/36
2
0
0
2/36
0
2/36
0
2/36
0
2/36
0
0
8/36
3
0
0
0
2/36
0
2/36
0
2/36
0
0
0
6/36
4
0
0
0
0
2/36
0
2/36
0
0
0
0
4/36
5
0
0
0
0
0
2/36
0
0
0
0
0
2/36
pX (x)
1/36
2/36
3/36
4/36
5/36
6/36
5/36
4/36
3/36
2/36
1/36
Table 1: The joint probability mass function of X and Y in question 2
This shows that for calculation of P (E), we may reduce the sample space to the case
where X < Y . The reduced sample space is S = {(x, y) : x < y, 0 < x < l, 0 < y < l}.
The desired probability is the area of R = {(x, y)S : x < α, y − x < α, y > l − α}
divided by area (S) = l2 /2. But
(
(3α−l)2
if 3l ≤ α ≤ 2l
2
area(R) =
2
2
l
3l
α 2
if 2l ≤ α ≤ l
2 − 2 (1 − l )
Hence the desired probability is
P (E) =
2
( 3α
if 3l ≤ α ≤ 2l
l − 1)
α 2
1 − 3(1 − l ) if 2l ≤ α ≤ l
2
4. Let the joint probability mass function of random variables X and Y be given by
1 2
7 x y if (x, y) = (1, 1), (1, 2), (2, 1)
p(x, y) =
0
otherwise
Are X and Y independent? Why or why not?
Answer. Note that
p(1, 1) = 1/7
pX (1) = p(1, 1) + p(1, 2) = 1/7 + 2/7 = 3/7
pY (1) = p(1, 1) + p(2, 1) = 1/7 + 5/7 = 6/7.
Since p(1, 1) 6= pX (1)pY (1), X and Y are dependent.
2
5. The joint probability mass function p(x,y) of the random variables X and Y is given
by the following table. Determine if X and Y are independent.
1-2
x
0
1
2
3
y
0
0.1681
0.1804
0.0574
0.0041
1
0.1804
0.1936
0.0616
0.0044
2
0.0574
0.0616
0.0196
0.0014
3
0.0041
0.0044
0.0014
0.0001
Answer. For i, j ∈ {0, 1, 2, 3}, the sum of the numbers in the ith row is pX (i) and
the sum of the numbers in the jth row is pY (j). We have that pX (0) = 0.41, pX (1) =
0.44, pX (2) = 0.14, pX (3) = 0.01; pY (0) = 0.41, pY (1) = 0.44, pY (2) = 0.14, pY (3) =
0.01.
Since for all x, y ∈ {0, 1, 2, 3}, p(x, y) = pX (x)pY (y), X and Y are independent.
2
6. A point is selected at random from the disk R = {(x, y) ∈ R2 : x2 + y 2 ≤ 1}. Let X
be the x-coordinate and Y be the y-coordinate of the point selected. Determine if X
and Y are independent random variables.
Answer. The joint probability density function of X and Y is given by
1
1
area(R) = π if (x, y) ∈ R
f (x, y) =
0
otherwise
p
√
R √1−y2
R √1−x2
Now fX (x) = −√1−x2 π1 dy = π2 1 − x2 , fY (y) = √ 2 π1 dy = π2 1 − y 2
−
1−y
Since f (x, y) 6= fX (x)fY (y), the random variables X and Y are not independent.
2
7. Let the joint probability density function of continuous random variables X and Y be
given by
2 if 0 < x < y < 1
f (x, y) =
0 otherwise
Find fX|Y (x|y).
Ry
Answer. Since FY (y) = 0 2dx = 2y, 0 < y < 1, we have that fX|Y (x|y) =
2/2y = 1/y, 0 < x < y, 0 < y < 1.
f (x,y)
fY (y)
=
2
8. First a point Y is selected at random from the interval (0, 1). Then another point X
is selected at random from the interval (Y, 1). Find the probability density function
of X.
Answer. Let f (x, y) be the joint probability
R ∞ density function of X and Y . Clearly,
f (x, y) = fX|Y (x|y)f Y (y). Thus fX (x) = −∞ fX|Y (x|y)f Y (y)dy. Now
1 0<y<1
fY (y) =
0 otherwise
and
1-3
1
1−y
fX|Y (x|y) =
Therefore, for 0 < x < 1, fX (x) =
0
Rx
fX (x) =
if 0 < y < 1, y < x < 1
otherwise
1
0 1−y dy
= − ln(1 − x) and hence
− ln(1 − x) 0 < x < 1
0
otherwise
2
9. A point is selected at random and uniformly from the region R = {(x, y) : |x|+|y| ≤ 1}.
Find the conditional probability density function of X given Y = y.
Answer. Let f (x, y) be the joint probability density function of X and Y .
0.5 |x| + |y| ≤ 1
f (x, y) =
0 otherwise
and fY (y) = 1 − |y|, −1 ≤ y ≤ 1.
1
0.5
= 2(1−|y|)
, −1 + |y| ≤ x ≤ 1 − |y|, −1 ≤ y ≤ 1.
Hence fX|Y (x|y) = 1−|y|
2
10. Let the joint probability density function of random variables X and Y be
−(x+2y)
2e
if x ≥ 0, y ≥ 0
f (x, y) =
0
elsewhere.
Find E(X), E(Y ), and E(X 2 + Y 2 ).
Answer. Since f (x, y) = e−x .2e−2y , X and Y are independent exponential random
variables with parameters 1 and 2, respectively. Thus E(X) = 1, E(Y ) = 1/2,
E(X 2 ) = V ar(X) + [E(X)]2 = 1 + 1 = 2,
E(Y 2 ) = V ar(Y ) + [E(Y )]2 = 1/4 + 1/4 = 1/2.
Therefore, E(X 2 + Y 2 ) = 2 + 1/2 = 5/2
2
11. Suppose that random digits are generated from the set {0, 1, . . . , 9} independently and
successively. Find the expected number of digits to be generated until the pattern (a)
007 appears, (b) 156156 appears, (c) 575757 appears.
Answer.
(a) E(→ 007) = E(007 → 007) = 1, 000.
(b) E(→ 156156) = E(→ 156) + E(156 → 156156) = E(156 → 156) + E(156156 →
156156) = 1, 000 + 1, 000, 000 = 1, 001, 000.
(c) E(→ 575757) = E(→ 57) + E(57 → 5757) + E(5757 → 575757) = E(57 →
57)+E(5757 → 5757)+E(575757 → 575757) = 100+10, 000+1, 000, 000 = 1, 010, 100.
2
1-4
12. Suppose that 80 balls are placed into 40 boxes at random and independently. What
is the expected number of the empty boxes?
Answer. Let
1 if the ith box is empty
Xi =
0 elsewhere.
The expected number of the empty boxes is E(X1 + X2 + ... + X25 ) = 40E(Xi ) =
39 80
40P (Xi = 1) = 40( 40
) ≈ 5.28
2
13. Let the joint probability mass function of random variables X and Y be given by
1
70 x(x + y) if x = 1, 2, 3, y = 3, 4
p(x, y) =
0
elsewhere.
Find Cov(X, Y ).
Answer.P
P
E(X) = 3x=1 4y=3 (1/70)x2 (x + y) = 17/7
P
P
E(Y ) = 3x=1 4y=3 (1/70)xy(x + y) = 124/35
P
P
E(XY ) = 3x=1 4y=3 (1/70)x2 y(x + y) = 43/5.
Therefore Cov(X, Y ) = E(XY ) − E(X)E(Y ) = 43/5 − (17/7).(124/35) = −1/125. 2
14. Let X and Y be the coordinates of a random point selected uniformly from the unit
disk {(x, y) : x2 + y 2 ≤ 1}. Are X and Y independent? Are they uncorrelated? Why
or why not?
Answer. The joint probability density function of X and Y is given by
1
2
2
π x +y ≤1
f (x, y) =
0 elsewhere.
X and Y are dependent because,
for example, P (0 < X < 0.5|Y = 0) = 1/4 while,
√
√
R 1/2 R √1−x2 1
R
2 1/2
P (0 < X < 2) = 2 0
1 − x2 dx = 1/6 + 4π3 6= P (0 < X <
π dydx = π 0
0
0.5|Y = 0).
X and Y RR
are uncorrelated because R R
1 2π
E(X) = x2 +y2 ≤1 x/πdxdy = 1/π 0 0 r2 cos(θ)dθdr = 0
RR
R 1 R 2π
E(Y ) = x2 +y2 ≤1 y/πdxdy = 1/π 0 0 r2 sin(θ)dθdr = 0
and
RR
R 1 R 2π
E(XY ) = x2 +y2 ≤1 xy/πdxdy = 1/π 0 0 r3 cos(θ) sin(θ)dθdr = 0 implying that
Cov(X, Y ) = E(XY ) − E(X)E(Y ) = 0.
2
15. Mr. Ingham has invested money in three assets; 18% in the first asset, 40% in the
second one, and 42% in the third one. Let r1 , r2 , and r3 be the annual rate of returns
for these three investments, respectively. For 1 ≤ i, j ≤ 3, Cov(ri , rj ) is the ith
element in the jth row of the following table. [Note that V ar(ri ) = Cov(ri , ri )]. Find
the standard deviation of the annual rate of return for Mr. Ingham’s total investment.
Answer. Let r be the annual rate of return for Mr. Inghams total investment. We
have
1-5
r1
r2
r3
r1
0.064
0.03
0.015
r2
0.03
0.0144
0.021
r3
0.015
0.021
0.01
V ar(r) = V ar(0.18r1 + 0.40r2 + 0.42r3 )
= (0.18)2 V ar(r1 ) + (0.40)2 V ar(r2 ) + (0.42)2 V ar(r3 )
+2(0.18)(0.40)Cov(r1 , r2 ) + 2(0.18)(0.42)Cov(r1 , r3 ) + 2(0.40)(0.42)Cov(r2 , r3 )
= (0.18)2 (0.064) + (0.40)2 (0.0144) + (0.42)2 (0.01)
+2(0.18)(0.40)(0.03) + 2(0.18)(0.42)(0.015) + 2(0.40)(0.42)(0.021) = 0.01979.
2
16. Let the joint probability density function of X and Y be given by
sin x sin y if 0 ≤ x ≤ π/2, 0 ≤ y ≤ π/2
f (x, y) =
0
elsewhere.
Calculate the correlation coefficient of X and Y .
Answer. Since X and Y are independent random variables. [This can also be shown
directly by verifying the relation f (x, y) = fX (x)fY (y).] Hence Cov(X, Y ) = 0, and
therefore ρ(X, Y ) = 0.
2
1-6
Download