Download HW6 Solution

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
Transcript
ECE 302
Assignment 6 Solution
March 21, 2007
1
ECE 302 Brief Solution to Homework Assignment 6
I will fill in more details later.
Note: To obtain credit for an answer, you must provide adequate justification. Also, if
it is possible to obtain a numeric answer, you should not only find an expression for the
answer, but also solve for the numeric answer.
1. Consider the joint pdf shown below:
Y
6
'
fX,Y (x, y) = 2/3
3
?
2
(b) Find FX,Y (x, y).
(c) Find the marginal fX (x).
1
(a) Write fX,Y (x, y) in our usual notation (as
opposed to expressing it pictorially.)
(d) Find the marginal fY (y).
(e) Find fX|Y (x|y).
1 X
-
(f) Find fY |X (y|x).
(g) Find E[X|Y = y].
(i) Find E[Y |X = x].
(h) Find E[X|Y ].
(j) Find E[Y |X].
Solution:
(a) The joint pdf shown in the figure is
(
fX,Y (x, y) =
2/3 0 ≤ x ≤ y ≤ 3
0
otherwise.
(b) We consider the full range of possibilities:
i.
ii.
iii.
iv.
v.
either x < 0 or y < 0 or both;
x > y/3 and 0 ≤ y ≤ 3;
0 ≤ x ≤ y/3 and y > 3;
0 ≤ 3x ≤ y ≤ 3;
x > 1 and y > 3.
The values of FX,Y (x, y) for these cases are
ECE 302
Assignment 6 Solution
March 21, 2007
2
i. We have FX,Y (x, y) = 0 if either x < 0 or y < 0 or both.
ii. For x > y/3 and 0 ≤ y ≤ 3, we first fix u and integrate over v from v = 3u
to v = y. Then we integrate over u from u = 0 to u = y/3. Thus we
obtain
FX,Y (x, y) =
Z
y/3
Z
y
2/3dv du
(1)
3u
0
y/3
2
(y − 3u)du
(2)
3
0
2
3 2 y/3
(3)
=
yu − u 3
2
0
!
2 1 2
3 2
=
y −
y
(4)
3 3
2(32 )
1 2
=
y .
(5)
9
iii. For 0 ≤ x ≤ y/3 and y > 3, we first fix u and integrate over v from 3u to
3. Then we integrate over u from u = 0 to u = x.
Z xZ 3
2
dv du
(6)
FX,Y (x, y) =
0
3u 3
Z x
2
=
(3 − 3u)du
(7)
0 3
x
(8)
= 2 u − u2 /2 =
Z
0
2
= 2x − x = x(2 − x).
(9)
iv. 0 ≤ 3x ≤ y ≤ 3; Here we have
FX,Y (x, y) =
=
Z
x
0
Z
0
y
2
dv du
3
(10)
2
(y − 3u)du
3
(11)
Z
3u
x
x
2
2
=
uy − 3u /2 3
0
2
(xy − 3x2 /2)
=
3
1
=
x(2y − 3x).
3
v. We have FX,Y (x, y) = 1 if x ≥ 1 and y ≥ 3.
Finally,


0





 x(2 − x)
FX,Y (x, y) = 






x < 0 or y < 0 (or both)
x > y/3 and 0 ≤ y ≤ 3
y 2 /9
0 ≤ x ≤ y/3 and y > 3
x(2y − 3x)/3 0 ≤ 3x ≤ y ≤ 3
1
x > 1 and y > 3
(12)
(13)
(14)
ECE 302
Assignment 6 Solution
March 21, 2007
3
(c) The marginal distribution of the random variable X is
fX (x) =
Z
∞
−∞
fX,Y (x, y)dy =
Z
3
3x
2
dy = 2(1 − x)
3
for 0 ≤ x ≤ 1, or
(
fX (x) =
2(1 − x) 0 ≤ x ≤ 1
0
otherwise
(d) The marginal distribution of the random variable Y is
fY (y) =
Z
y/3
0
2
dx = 2y/9
3
for 0 ≤ y ≤ 3, or
(
fY (y) =
2y/9 0 ≤ y ≤ 3
0
otherwise
(e) The conditional distribution of the random variable X in terms of y is given
by
fX,Y (x, y)
fX|Y (x|y) =
fY (y)
for values of y such that fY (y) > 0. Thus
fX|Y (x|y) =
3
2/3
=
2y/9
y
for 0 ≤ x < y/3 < 1.
(f) The conditional distribution of the random variable Y in terms of x is given
by
fX,Y (x, y)
fY |X (y|x) =
fX (x)
for values of x such that fX (x) > 0. Thus
fY |X (y|x) =
1
2/3
=
2(1 − x)
3(1 − x)
for 0 ≤ 3x < y < 3.
(g) Expected value of X in terms of y:
E[X|Y = y] =
Z
∞
−∞
(h) E[X|Y ] = Y /6.
xfX|Y (x|y) dx =
Z
0
y/3
3
x
y
!
y/3
3x2 dx =
2y 0
=
3y 2
= y/6.
2y9
ECE 302
Assignment 6 Solution
March 21, 2007
4
(i) Expected value of Y in terms of x:
∞
3
1
E[Y |X = x] =
yfY |X (y|x) dx =
y
3(1 − x)
−∞
3x
Z
Z
!
dy =
32 − 9x2
= 3(1+x)/2.
2(1 − x)3
(j) E[Y |X] = 3/2(1 + X).
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).
(a) Find the value of c.
Solution: We apply the axioms of probability to obtain
Z
1
−1
Z
1
c(x + 1)(2y + 2)dydx = 8c = 1
−1
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
(x + 1)(2y + 2)dydx = 1/16
P [X ≤ 0, Y ≤ 0] =
8 −1 −1
(c) Find the expected values of the landing coordinates.
Solution: We first show that the joint PDF is the product of the marginals,
then apply Theorem 4.27(e) to compute the expected value of X to be
1
1Z 1
1 2
x(x + 1)dx =
x /2 + x3 /3 = 1/3.
2 −1
2
−1
E[X] =
(d) Find the expected value of Y given that X = x.
Solution: Having shown that the random variables X and Y are independent above, we can apply Theorem 4.27(e) to conclude that
E[Y |X = x] = E[Y ] = 1/3.
ECE 302
Assignment 6 Solution
March 21, 2007
5
3. Suppose that a photon arrives at a photon detector at time X and a second photon
arrives at time Y . Suppose that
(
λ2 e−λy 0 ≤ x < y
0
otherwise
fX,Y (x, y) =
where λ is the average number of photons received per second.
(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
fY |X (y|x) =
fX,Y (x, y)
fX (x)
for values of x such that fX (x) > 0. Thus we must find fX (x), which yields
fX (x) =
Z
∞
x
Then
∞
λ2 e−λy dy = −λe−λy (
x
= λe−λx .
λe−λ(y−x) 0 ≤ x < y < ∞
0
otherwise,
fY |X (y|x) =
so
(
λeλ(3−y) 3 < y < ∞
0
otherwise.
fY |X (y|3) =
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λ(3−y) dy
3
3 −3λ
e
λ
= 3 + 1/λ.
= λe3λ
(15)
1 λy ∞
− 2e λ
(b) Now suppose that the second photon arrives at 5 seconds.
i. Find the conditional PDF of the arrival time of the first photon.
Solution: First we find the marginal
fY (y) =
Z
y
λ2 e−λy dx = λ2 e−λy y.
0
Then for Y = 5, we have that
(
fX|Y (x|5) =
1/5 0 ≤ x < 5
0
otherwise
(16)
3
(17)
ECE 302
Assignment 6 Solution
March 21, 2007
6
ii. Find the expected value of the arrival time of the first photon.
Solution:
!5
Z 5
5
1
1 x2 = .
E[X|Y = 5] =
x dx =
5
5 2 0 2
0
Note that knowing that the second photon arrived at time Y = 5 doesn’t
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.
4. Consider the joint PMF given below:
y6
PX,Y (x, y)
4
(a) Find c.
3
t4c
t5c
t6c
2
t3c
t4c
t5c
(c) Find PX|Y (x|y).
1
t2c
t3c
t4c
(d) Find E[X|Y = 3].
(b) Find PX (x).
(e) Find FX,Y (x, y).
-
1
2
3 x
(f) Find Cov[X, Y ].
(h) Are X and Y uncorrelated?
(g) Are X and Y orthogonal?
(i) Are X and Y independent?
Solution:
(a) One of the axioms of probability requires that
X X
PX,Y (x, y) = 1.
x∈SX y∈SY
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:
PX (x) =
X
y∈SY
PX,Y (x, y) =

9/36








x=1
12/36 x = 2
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
PX|Y (x|y) =
1
(x + y)
36
1
3(x + 2)
36
=
x+y
3(x + 2)
on the region where 1 ≤ x ≤ 3 and 1 ≤ y ≤ 3.
(d) The conditional expected value requested is obtained as follows:
E[X|Y = 3] =
X
xPX|Y (x|3)
(18)
x∈SX
x+3
=
x
3(x + 2)
x∈SX
!
X
= 446/180 = 223/90.
(19)
(20)
We should perform a simple check to see whether this value is plausible. We
verify that minx∈SX x = 1 < 223/90 = 2 + 43/90 < 3 = maxx∈SX x, so the
answer is plausible.
(e) The cumulative distribution function can be written as


0





2/36





 5/36
x < 1 or y < 1 (or both)
1 ≤ x < 2 and 1 ≤ y < 2
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
E[X] =
X X
xPX,Y (x, y) = 13/6.
x∈SX y∈SY
The expected value of Y is
E[Y ] =
X X
yPX,Y (x, y) = 13/6.
x∈SX y∈SY
The expected value of the product XY is
E[XY ] =
X X
xyPX,Y (x, y) = 14/3.
x∈SX y∈SY
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
(g) By the definition of orthogonality, a pair of random variables are orthogonal if
and only if their correlation is zero. By definition of correlation, the correlation
or random variables X and Y is rX,Y = E[XY ]. We see from part (f) above
that X and Y are not orthogonal.
(h) Because the covariance is not zero, random variables X and Y are not uncorrelated, i.e. they are correlated.
(i) By definition, X and Y being independent implies that the conditional PMF’s
are equal to the marginals. From parts (b) and (c) above, we see that that is
not the case; therefore, X and Y cannot be independent.