ECE 313: Problem Set 12: Problems and Solutions Functions of Random Variables, Conditional PDFS, Covariances
ECE 313: Problem Set 12: Problems and Solutions Functions of Random Variables, Conditional PDFS, Covariances
1. [Joint Distributions]
Suppose two jointly continuous random variables X and Y have joint distribution given by
(
1
, if − 12 ≤ u ≤ 12 , − 12 ≤ v ≤ 12 , and u2 + v 2 > 16
1
fX,Y (u, v) = C
0, otherwise
(a) find C.
Solution: since they are uniformly distributed over a region, we know that the area of the region
is equal to C1 . Note that the support is the origin-centered unit rectangle, except for the origin-
centered circle of radius 14 . Thus the area of the region can be calculated as the area of the unit
square minus the area of circle of radius 14 . So C = 1−π/16
1
.
(b) find fX|Y (u|0.45), fX|Y (u|0), fY|X (v|0.45), and fY|X (v|0). Are X and Y independent?
Solution: note that the shape of the conditional pdf is the same as that of the joint pdf, it is only
normalized to integrate to one. Thus we know that given any value of Y = v0 , X is uniformly
distributed over some interval pertaining to the support. So we know that given Y = 0, X is
uniform over [− 12 , − 14 ] ∪ [ 41 , 12 ]. However, given Y = −.45, X is uniform over [− 12 , 21 ]. Also,
from symmetry, the conditional distribution on Y given X = u0 is the same as the conditional
distribution of X given Y = v0 . Thus, we have:
(
1, u ∈ [− 12 , 21 ]
fX|Y (u|0.45) =
0, otherwise
(
2, u ∈ [− 12 , − 14 ] ∪ [ 41 , 21 ]
fX|Y (u|0) =
0, otherwise
(
1, v ∈ [− 12 , 12 ]
fY|X (v|0.45) =
0, otherwise
(
2, v ∈ [− 12 , − 14 ] ∪ [ 41 , 12 ]
fY|X (v|0) =
0, otherwise
Lastly, clearly from above, they are not independent: fX|Y (0|0.45) = 1 whereas fX|Y (0|0) = 0.
π
(c) Let Z = X2 + Y2 . Find FZ ( 64 ). Solution: Note that since π < 4,
³π´ µ ¶ µ ¶
1 2 2 1
FZ ≤ FZ =P X +Y ≤ = 0.
64 16 16
where the last equality holds from observation of the support of the joint density fX,Y (u, v)
2. [Joint Distributions]
Let X and Y be two independent random variables where X is exponentially distributed of rate λ1 and
Y is exponentially distributed of rate λ2 .
(a) Let Z = min(X, Y). Find the density of Z, given by fZ (a). (hint: first find P (Z > a) using
equivalence of events).
Solution:
P (Z > a) = P (min(X, Y) > a) = P (X > a, Y > a) = P (X > a)P (Y > a) = e−(λ1 +λ2 )a .
So it follows that (
(λ1 + λ2 )e−(λ1 +λ2 )a
fZ (a) =
0, otherwise
(c) Let B be the event {X > Y}. Express P (B) in terms of G(c) for some value of c and find solve
for it in closed form.
Solution:
Z ∞ Z u
P (B) = λ1 λ2 e−λ1 u+λ2 v dvdu
u=0 v=0
= G(0)
λ2
=
λ1 + λ2
(d) Express P (Z > c|B) in terms of a ratio G(cnum )/G(cdenom ) for some specific values of cnum and
cdenom , solve for it in closed form, and find fZ|B (c).
Solution: Note that the event {Z > c} is in one-to-one correspondence with the event {X >
c} ∩ {Y > c}. So:
(e) show without any integrals why fZ|B c (c) is also exponentially distributed of rate λ.
Solution: Apply the total probability theorem.
2
3. [Using a joint density]
Suppose X and Y are jointly continuous random variables distributed over the unit square with the
joint pdf given by ½ 3u2
fX,Y (u, v) = 2 + 2uv u, v ∈ [0, 1]
0 else
R∞ 2
(b) Express P {X + 4Y ≥ 2} in terms of the Q function defined by Q(u) = √1 e−v /2 dv.
u 2π
Solution: Let S = X + 4Y. Then S is the sum of the independent Gaussian random variables
X and 4Y. Thus, S is a Gaussian random variable. Also, E[S] = E[X] + 4E[Y ] = 0, and
Var(S) = Cov(X + 4Y, X + 4Y ) = Var(X) + 8Cov(X, Y ) + 16Var(Y ) = 1 + 0 + 16 = 17. So S has
the N (0, 17) distribution. Thus, P {X + 4Y ≥ 2} = P { √S17 ≥ √217 } = Q( √217 ).
(c) Express P {(X − Y )2 > 9} in terms of the Q function. (Hint: For what values of X − Y is the
event true?)
Solution: Let D = X − Y. Proceeding as in part (a), we see that D is a N (0, 2) random
n variable.
o
So P {(X − Y )2 > 9} = P {D2 > 9} = P {D ≥ 3 or D ≤ −3} = 2P {D ≥ 3} = 2P √D2 ≥ √32 =
2Q( √32 ).
3
√
(a) Let R = X2 + Y2 denote the distance of the random point (X, Y) from the origin. Note that
R ≥ 0. For ρ ≥ 0, express FR (ρ) = P {R ≤ ρ} as a double integral with respect to u and v and
then transform this integral to polar coordinates to show that
Z ρ (
2πρg(ρ), ρ ≥ 0,
FR (ρ) = 2π r · g(r) dr and fR (ρ) =
r=0 0, ρ < 0.
Z Z √
u=+ρ v=+ ρ2 −u2
Solution: For ρ ≥ 0, FR (ρ) = P {R ≤ ρ} = √ fX,Y (u, v) dv du
u=−ρ v=− ρ2 −u2
Z ρ Z 2π Z ρ
= g(r) rdθ dr = 2π r · g(r) dr which has derivative fR (ρ) = 2πρg(ρ) for ρ ≥ 0.
r=0 θ=0 r=0
(b) Now suppose that X and Y are independent N (0, σ 2 ) random variables. Verify that their joint
pdf has circular symmetry about the origin, and hence deduce that R has the Rayleigh pdf
ρ ¡ ρ2 ¢ ¡ ρ2 ¢
fR (ρ) = 2 exp − 2 , ρ ≥ 0 (cf. Ross, p. 214 or 277). Also, show that P {R > ρ} = exp − 2 .
σ 2σ 2σ
In communications applications, the noise at the output of a bandpass filter with center frequency f0
Hz can be expressed as X(t) cos(2πf0 t) − Y(t) sin(2πf0 t) where for each p time instant t, X(t) and Y(t)
are independent N (0, σ 2 ) random variables. The noise amplitude R(t) = (X(t))2 + (−Y(t))2 is thus a
Rayleigh random variable for each t. Note that E[R2 (t)] = E[X2 (t) + Y2 (t)] = 2σ 2 is the noise power.
1 ¡ u2 + v 2 ¢ 1 ¡ r2 ¢
Solution: fX,Y (u, v) = exp − = exp − obviously has circular sym-
2πσ 2 2σ 2 2πσ 2 2σ 2
ρ ¡ ρ 2 ¢
metry and hence fR (ρ) = 2 exp − 2 , ρ ≥ 0. Next, note from Problem 2(a) of Problem Set
σ 2σ
10 that Z ∞ ¯∞
r ¡ r2 ¢ ¡ r2 ¢¯¯ ¡ ρ2 ¢
P {R > ρ} = exp − dr = − exp − = exp − .
ρ σ2 2σ 2 2σ 2 ¯ρ 2σ 2
(c) Let σ 2 = 1 in part (b). For α > 0, sketch √on the u-v plane the region {|X| > α, |Y| > α} and
show that it is a subset of the region {R > 2α}. Hence conclude that
√
P {|X| > α, |Y| > α} = 4Q2 (α) < P {R > 2α} = exp(−α2 )
and therefore for α ≥ 0, Q(α) ≤ 21 exp(−α2 /2), which you also proved in Problem 10.2.
Solution: The region {|X| > α, |Y|√> α} is the four-part dark-shaded region in the √ right-hand
figure below while the event {R > 2α} is everything
√ outside the circle of radius 2α shown in
the right-hand figure. (The entire region {R > 2α} is shown in the left-hand figure below.)
α α
−α α −α α
−α −α
√ √
Obviously, {|X| > α, |Y| > α} ⊂ {R > 2α} and so P {|X| > α, |Y| > α} < P {R > 2α}.
Furthermore, since X and Y are independent random variables, the events {|X| > α} and {|X| >
α} are independent events, and since P {|X| > α} = P {X > α} + P {X < −α} = 2Q(α), we
conclude√that P {|X| > α, |Y| > α} = 4Q2 (α). On the other hand, from part (b) we have that
P {R > 2α} = exp(−α2 ) and so for α > 0, 4Q2 (α) < exp(−α2 ), that is, Q(α) < 21 exp(−α2 /2).
Since Q(0) = 12 , we conclude that Q(α) ≤ 12 exp(−α2 /2) for α ≥ 0 with equality holding only at
α = 0.
4
6. [Drill problem on jointly continuous random variables II]
The jointly continuous random variables X and Y have joint pdf
(
2 exp(−u − v), 0 < u < v < ∞,
fX,Y (u, v) =
0, elsewhere.
(a) Sketch the u-v plane and indicate on it the region over which fX,Y (u, v) is nonzero.
Solution: The joint pdf is nonzero on the shaded region shown in the figure below.
v
v0
u0
u
u0 v0
(b) Find the marginal pdfs of X and Y.
Z ∞
Solution: For any u0 > 0, fX (u0 ) = 2 exp(−u0 − v) dv = 2 exp(−2u0 ).
Z v0 v=u0
v v
3u
v=
α
=
v
α−u
v
=
3u
α
−
u
u
u u
α α
u u 2
5
7. [Some moments for a random rectangle]
Let A = XY denote the area and L = 2(X + Y ) the length of the perimeter, of a rectangle with length
X and height Y, such that X and Y are independent, and uniformly distributed on the interval [0, 1].
(a) Find E[A] and E[L].
Solution: