ECE 302 Brief Solution To Homework Assignment 6: X, Y X, Y
ECE 302 Brief Solution To Homework Assignment 6: X, Y X, Y
'
6
Y fX,Y (x, y) = 2/3
(a) Write fX,Y (x, y) in our usual notation (as
3 opposed to expressing it pictorially.)
? (b) Find FX,Y (x, y).
2
(c) Find the marginal fX (x).
(d) Find the marginal fY (y).
1
(e) Find fX|Y (x|y).
- (f) Find fY |X (y|x).
1 X
(g) Find E[X|Y = y]. (i) Find E[Y |X = x].
(h) Find E[X|Y ]. (j) Find E[Y |X].
Solution:
2/3 3
fX|Y (x|y) = =
2y/9 y
2/3 1
fY |X (y|x) = =
2(1 x) 3(1 x)
32 9x2
!
Z 1 Z 3
E[Y |X = x] = yfY |X (y|x) dx = y dy = = 3(1+x)/2.
3x 3(1 x) 2(1 x)3
2. Consider dropping a dart from a height of two meters. Air currents acting on the
feathers of the dart will impose an apparently random horizontal motion in addition
to the vertical motion resulting from the action of gravity on the dart. Suppose that
fX,Y (x, y) = c(x + 1)(2y + 2) on the square with side length 2 centered at (0, 0).
Assume that the coordinates of the location at which the dart is dropped (not where
it lands) are (0, 0).
so c = 1/8.
(b) Find the probability that the dart lands at (x, y) where both x and y are
negative.
Solution: Here we integrate the JPDF over the 3rd quadrant to obtain
1Z 0 Z 0
P [X 0, Y 0] = (x + 1)(2y + 2)dydx = 1/16
8 1 1
1Z 1 1 2 1
E[X] = x(x + 1)dx = x /2 + x3 /3 = 1/3.
2 1 2 1
3. Suppose that a photon arrives at a photon detector at time X and a second photon
arrives at time Y . Suppose that
(
2 ey 0 x < y
fX,Y (x, y) =
0 otherwise
(a) Suppose that the first photon arrives 3 seconds after we start watching.
i. Find the conditional PDF of the arrival time of the second photon.
Solution: The definition of the conditional PDF is that
fX,Y (x, y)
fY |X (y|x) =
fX (x)
for values of x such that fX (x) > 0. Thus we must find fX (x), which yields
Z
fX (x) = 2 ey dy = ey = ex .
x x
Then (
e(yx) 0 x < y <
fY |X (y|x) =
0 otherwise,
so (
e(3y) 3 < y <
fY |X (y|3) =
0 otherwise.
ii. Find the expected value of the arrival time of the second photon.
Solution: Here, using integration by parts, we obtain
Z
E[Y |X = 3] = ye(3y) dy (15)
3
3 3 1 y
= e3 e 2e (16)
3
= 3 + 1/. (17)
ii. Find the expected value of the arrival time of the first photon.
Solution: !5
Z 5
1 1 x2 5
E[X|Y = 5] = x dx = = .
0 5 5 2 0 2
Note that knowing that the second photon arrived at time Y = 5 doesnt
tell us anything about where in the time interval [0, 5) the first photon
arrives, in the sense that the conditional distribution is uniform on the
interval so the expected value is the midpoint of the interval.
y6
4 PX,Y (x, y)
(a) Find c.
3 t4c t5c t6c
(b) Find PX (x).
Solution:
From the diagram we see that SX = {1, 2, 3} and SY = {1, 2, 3}. Thus c(2 +
3 + 4 + 3 + 4 + 5 + 4 + 5 + 6) = 1 requires c = 1/36.
(b) To obtain PX (x) we sum over values of y SY as follows:
9/36 x=1
12/36 x = 2
X
PX (x) = PX,Y (x, y) =
ySY
15/36 x = 3
0 otherwise
Checking to make sure that this is a valid PDF, we verify that 9/36 + 12/36 +
15/36 = 36/36 = 1.
ECE 302 Assignment 6 Solution March 21, 2007 7
(c) As usual we start by finding PY (y). We could sum over x or simply note that
the symmetry of the distribution requires Py (y) = PX (x).
Then the conditional probability we seek is
1
36
(x + y) x+y
PX|Y (x|y) = 1 =
36
3(x + 2) 3(x + 2)
on the region where 1 x 3 and 1 y 3.
(d) The conditional expected value requested is obtained as follows:
X
E[X|Y = 3] = xPX|Y (x|3) (18)
xSX
!
X x+3
= x (19)
xSX 3(x + 2)
= 446/180 = 223/90. (20)
We should perform a simple check to see whether this value is plausible. We
verify that minxSX x = 1 < 223/90 = 2 + 43/90 < 3 = maxxSX x, so the
answer is plausible.
(e) The cumulative distribution function can be written as
0 x < 1 or y < 1 (or both)
2/36 1 x < 2 and 1 y < 2
5/36 2 max(x, y) < 3 and 1 min(x, y) < 2
FX,Y (x, y) = 9/36 max(x, y) > 3 and 1 min(x, y) < 2
12/36 2 min(x, y) < 3 max(x, y) < 3
21/36 2 min(x, y) < 3 and 3 max(x, y)
1 min(x, y) 3.
(f) The expected values E[X], E[Y ], and E[XY ] will be needed here so we compute
them first. The expected value of X is
X X
E[X] = xPX,Y (x, y) = 13/6.
xSX ySY
Thus
Cov [X, Y ] = E[XY ] E[X]E[Y ] = 14/3 (13/6)2 = 1/36.
ECE 302 Assignment 6 Solution March 21, 2007 8