One Function of Two Random Variables: Y X G Z X F F
One Function of Two Random Variables: Y X G Z X F F
One Function of Two Random It is important to know the statistics of the incoming signal
for proper receiver design. In this context, we shall analyze
Variables
problems of the following type:
Given two random variables X and Y and a function g(x,y),
X +Y
we form a new random variable Z as
max( X , Y ) X −Y
Z = g ( X , Y ). (8-1)
min( X , Y ) Z = g ( X ,Y ) XY (8-2)
Given the joint p.d.f f XY ( x , y ), how does one obtain f Z ( z ), X +Y
2 2 X /Y
the p.d.f of Z ? Problems of this type are of interest from a tan −1 ( X / Y )
practical standpoint. For example, a receiver output signal
usually consists of the desired signal buried in noise, and Referring back to (8-1), to start with
the above formulation in that case reduces to Z = X + Y. FZ ( z ) = P (Z (ξ ) ≤ z ) = P ( g ( X , Y ) ≤ z ) = P [( X , Y ) ∈ D z ]
= f XY ( x , y ) dxdy , (8-3)
1 x , y∈ D z 2
PILLAI PILLAI
Dz x = z− y
X
x
3 4
Fig. 8.1 Fig. 8.2
PILLAI PILLAI
In that case
We can find f Z ( z ) by differentiating FZ ( z ) directly. In this
+∞ z− x y
context, it is useful to recall the differentiation rule in (7- FZ ( z ) =
x = −∞ y = −∞
f XY ( x, y )dxdy , (8-8)
15) - (7-16) due to Leibnitz. Suppose
and differentiation of (8-8)
b( z) y = z−x
H (z) = h ( x , z ) dx . (8-5) gives
a(z)
dF ( z ) +∞ ∂ z−x
Then f Z ( z) = Z = f XY ( x, y)dy dx x
dz x =−∞ ∂z y = −∞
dH ( z ) db ( z ) da ( z ) ∂h ( x , z )
h (b( z ), z ) − h (a ( z ), z ) +
b( z ) +∞
= dx . (8-6) = f XY ( x, z − x)dx. (8-9) Fig. 8.3
dz dz dz a(z) ∂z x =−∞
1
The above integral is the standard convolution of the In that case
functions f X ( z ) and f Y ( z ) expressed two different ways. We z z− y
FZ ( z ) = f XY ( x, y )dxdy
thus reach the following conclusion: If two r.vs are y =0 x =0
(z,0) or
z
z f X ( x ) fY ( z − x )dx, z > 0,
x=z−y fZ ( z) = f XY ( x, z − x )dx = y =0
(8-13)
x =0
0, z ≤ 0,
x
(0, z)
if X and Y are independent random variables.
7 8
Fig. 8.4
PILLAI PILLAI
As the next example shows, care should be taken in using For 0 ≤ z < 1,
the convolution formula for r.vs with finite range. z z− y z z2
FZ ( z ) = 1 dxdy = ( z − y )dy = , 0 ≤ z < 1. (8-16)
Example 8.3: X and Y are independent uniform r.vs in the
y =0 x =0 y =0 2
common interval (0,1). Determine f Z ( z ), where Z = X + Y. For 1 ≤ z < 2, notice that it is easy to deal with the unshaded
Solution: Clearly, Z = X + Y 0 < z < 2 here, and as Fig. 8.5 region. In that case
FZ ( z ) = 1 − P(Z > z ) = 1 −
1 1
1 dxdy
shows there are two cases of z for which the shaded areas are y = z −1 x = z − y
fY (x ) f X ( z − x) f X ( z − x ) fY ( x )
Using (8-16) - (8-17), we obtain
dFZ ( z ) z 0 ≤ z < 1,
fZ ( z) = = (8-18) x x x
dz 2 − z, 1 ≤ z < 2. 1 z −1 z z
11
Fig. 8.6 (c) 12
PILLAI PILLAI
2
Example 8.3: Let Z = X − Y . Determine its p.d.f f Z ( z ). As a special case, suppose
Solution: From (8-3) and Fig. 8.7 f X ( x ) = 0, x < 0, and fY ( y ) = 0, y < 0.
+∞ z+ y
FZ ( z ) = P( X − Y ≤ z ) = f XY ( x, y )dxdy In this case, Z can be negative as well as positive, and that
y =−∞ x = −∞
+∞ z+ y
If X and Y are independent, then the above formula reduces FZ ( z ) = f XY ( x, y )dxdy x=z+ y
y =0 x =0
to z x
+∞
f Z ( z) = f X ( z + y ) fY ( y )dy = f X ( − z ) ⊗ fY ( y ), (8-22) and for z < 0, from Fig 8.8 (b) −z
−∞ (a)
+∞ z+ y
FZ ( z ) = f XY ( x, y )dxdy y
which represents the convolution of f X (− z) with f Y ( z ). y=− z x =0
y
After differentiation, this gives x=z+ y
y x− y= z
x= y+z +∞ −z
f XY ( z + y , y ) dy , z ≥ 0, x
x fZ (z) = 0
+∞ (8-23) Fig. 8.8 (b)
f XY ( z + y , y ) dy , z < 0.
13 −z 14
Fig. 8.7 PILLAI PILLAI
Example 8.4: Given Z = X / Y, obtain its density function. Integrating over these two regions, we get
Solution: We have FZ ( z ) = P ( X / Y ≤ z ) . (8-24)
The inequality X / Y ≤ z can be rewritten as X ≤ Yz if Y > 0, FZ ( z ) =
+∞ yz
f XY ( x , y )dxdy +
0 ∞
f XY ( x , y )dxdy . (8-26)
and X ≥ Yz if Y < 0. Hence the event ( X / Y ≤ z ) in (8-24) need __ y =0 x = −∞ y = −∞ x = yz
to be conditioned
__
by the event A = (Y > 0 ) and its compliment A . Differentiation with respect to z gives
Since A ∪ A = Ω, by the partition theorem, we have +∞ 0
fZ ( z) = yf XY ( yz, y )dy + ( − y ) f XY ( yz, y )dy
{X / Y ≤ z}= {( X / Y ≤ z ) ∩ ( A ∪ A )}= {( X / Y ≤ z ) ∩ A}∪ {( X / Y ≤ z ) ∩ A } 0 −∞
+∞
= | y | f XY ( yz, y )dy , − ∞ < z < +∞. (8-27)
and hence by the mutually exclusive property of the later −∞
two events
P (X / Y ≤ z ) = P ( X / Y ≤ z,Y > 0) + P ( X / Y ≤ z,Y < 0 ) Note that if X and Y are nonnegative random variables, then
= P ( X ≤ Yz , Y > 0 ) + P ( X ≥ Yz , Y < 0 ) . (8-25) the area of integration reduces to that shown in Fig. 8.10.
Fig. 8.9(a) shows the area corresponding to the first term, y
and Fig. 8.9(b) shows that corresponding to the second term x = yz
y y
in (8-25). x = yz
x = yz
x
x
x 15 Fig. 8.10 16
(a) Fig. 8.9 (b) PILLAI PILLAI
FZ ( z ) = σ (z) =
2
f XY ( x, y )dxdy 0
z 2
2 rz 1
.
y =0 x =0 − +
or σ σ 1σ σ
2 2
1 2 2
+∞
y f XY ( yz, y )dy, z > 0, Thus
fZ ( z) = 0 (8-28)
0, otherwise. σ 1σ 2 1 − r 2 / π
fZ (z) = , (8-30)
σ 22 ( z − r σ 1 / σ 2 ) 2 + σ 12 (1 − r 2 )
Example 8.5: X and Y are jointly normal random variables
with zero mean so that which represents a Cauchy r.v centered at rσ 1 / σ 2 . Integrating
1 −
1 x 2 2 rxy
− +
y2
2 ( 1 − r 2 ) σ 12 σ 1σ 2 σ 22
(8-29)
(8-30) from − ∞ to z, we obtain the corresponding
f XY ( x , y ) = e .
2 πσ 1σ 2 1 − r2 distribution function to be
Show that the ratio Z = X / Y has a Cauchy density function FZ ( z ) =
1 1 σ z − rσ 1
+ arctan 2 . (8-31)
centered at rσ 1 / σ 2 . 2 π σ 1 1 − r2
Solution: Inserting (8-29) into (8-27) and using the fact Example 8.6: Z = X 2
+Y . 2
Obtain f Z ( z ).
that f XY ( − x ,− y ) = f XY ( x , y ), we obtain Solution: We have
FZ ( z ) = P ( X 2 + Y 2 ≤ z ) =
2 ∞ − y 2 / 2σ 2 σ 02 ( z ) (8-32)
fZ ( z) = ye 0
dy = , f XY ( x , y ) dxdy .
X 2 +Y 2 ≤ z
2 πσ 1σ 2 1 − r2 0
πσ 1σ 2 1 − r2 17 18
PILLAI PILLAI
3
But, X 2 + Y 2 ≤ z represents the area of a circle with radius Example 8.7 : X and Y are independent normal r.vs with zero
z,
and hence from Fig. 8.11, Mean and common variance σ 2. Determine fZ (z) for Z = X 2 + Y 2 .
Solution: Direct substitution of (8-29) with r = 0, σ1 = σ 2 = σ
z z− y2
FZ ( z ) =
y=− z x= − z− y2
f XY ( x , y ) dxdy . (8-33) Into (8-34) gives
This gives after repeated differentiation
2
z 1 1 2
+ y 2 ) / 2σ 2 e − z / 2σ z 1
fZ ( z) = 2⋅ e −( z− y dy = dy
y=− z
2 z − y2 2πσ 2
πσ 2 0
z − y2
(f , y ) ) dy .
z 1 (8-34)
fZ (z) = ( z − y , y ) + f XY ( − z − y
2 2 2
e − z / 2σ
π /2 z cos θ 1 2
(8-35)
y=− z
2 z − y2
XY
= dθ = e − z / 2 σ U ( z ),
πσ 2 0
z cos θ 2σ 2
As an illustration, consider the next example.
y
where we have used the substitution y = z sin θ . From (8-35)
we have the following result: If X and Y are independent zero
z
mean Gaussian r.vs with common variance σ 2 , then
X 2 +Y 2 = z
z X 2 + Y 2 is an exponential r.vs with parameter 2σ 2.
x
− z
Example 8.8 : Let Z = X 2 + Y 2 . Find fZ (z).
Fig. 8.11 19
Solution: From Fig. 8.11, the present case corresponds to20 a
PILLAI circle with radius z 2 . Thus PILLAI
z z2 − y2
FZ ( z ) =
y=− z x=− z2− y2
f XY ( x , y ) dxdy . What about its phase
And by repeated differentiation, we obtain θ = tan −1
X
? (8-38)
(f )
z Y
(8-36)
z
fZ (z) = XY ( z − y , y ) + f XY ( −
2 2
z − y , y ) dy .
2 2
z − y
Clearly, the principal value of θ lies in the interval (−π / 2, π / 2).
−z 2 2
Now suppose X and Y are independent Gaussian as in If we let U = tan θ = X / Y , then from example 8.5, U has a
Example 8.7. In that case, (8-36) simplifies to Cauchy distribution with (see (8-30) with σ 1 = σ 2 , r = 0 )
z z 1 2
− y 2 + y 2 ) / 2σ 2 2z 2
/ 2σ 2 z 1
fZ ( z) = 2 e(z dy = e−z dy 1/π
0
z 2 − y 2 2πσ
2
πσ 2 0
z2 − y2 fU ( u ) = , − ∞ < u < ∞. (8-39)
2z π /2 z cos θ z u2 + 1
− z 2 / 2σ
(8-37)
2 2 2
= e d θ = 2 e − z / 2 σ U ( z ),
πσ 2 0 z cos θ σ As a result
which represents a Rayleigh distribution. Thus, if W = X + iY , 1 1 1/π 1 / π , − π / 2 < θ < π / 2,
fθ (θ ) = fU (tan θ ) = = (8-40)
where X and Y are real, independent normal r.vs with zero | dθ / du | (1 / sec 2 θ ) tan 2 θ + 1 0, otherwise .
Let us reconsider example 8.8 where X and Y have nonzero x = z cos θ , y = z sin θ , µ = µ X2 + µ Y2 , µ X = µ cos φ , µY = µ sin φ ,
means µ X and µY respectively. Then Z = X 2 + Y 2 is said to
we get the Rician probability density function to be
be a Rician r.v. Such a scene arises in fading multipath
(e )d θ
2 2 2
ze − ( z + µ ) / 2σ
situation where there is a dominant constant component fZ ( z) =
π /2
z µ cos( θ −φ ) / σ 2
+ e − zµ cos( θ + φ ) / σ
2
2 πσ 2 − π /2
− ( z 2 + µ 2 ) / 2σ 2
nonzero means µ X and µY respectively. Multipath/Gaussian is the modified Bessel function of the first kind and zeroth
Solution: Since Line of sight noise
order.
signal (constant)
1 2
+ ( y − µY )2 ] / 2σ 2
f XY ( x , y ) = e − [( x − µ X ) , Rician Example 8.10: Z = max( X , Y ), W = min( X , Y ). Determine f Z (z).
2 πσ 2
a Output
Solution: The functions max and min are nonlinear
substituting this into (8-36) and letting 23
PILLAI
24
PILLAI
4
operators and represent special cases of the more general Returning back to that problem, since
order statistics. In general, given any n-tuple X 1 , X 2 , , X n , X, X >Y,
Z = max( X , Y ) = (8-45)
Y, X ≤Y,
we can arrange them in an increasing order of magnitude
such that we have (see also (8-25))
F Z ( z ) = P (max( X , Y ) ≤ z ) = P [( X ≤ z , X > Y ) ∪ (Y ≤ z , X ≤ Y )]
X (1) ≤ X ( 2 ) ≤ ≤ X (n ) , (8-43) = P ( X ≤ z , X > Y ) + P (Y ≤ z , X ≤ Y ),
where X (1) = min ( X1, X 2 , , X n ) , and X ( 2 ) is the second smallest since ( X > Y ) and ( X ≤ Y ) are mutually exclusive sets that
value among X 1 , X 2 , , X n , and finally X (n) = max ( X1, X 2 , , X n ) . form a partition. Figs 8.12 (a)-(b) show the regions
If X 1 , X 2 , , X n represent r.vs, the function X ( k ) that takes on satisfying the corresponding inequalities in each term
the value x ( k ) in each possible sequence ( x1 , x 2 , , x n ) is above. y y y
x=z x= y x= y
known as the k-th order statistic. ( X (1) , X (2) , , X ( n ) ) represent X ≤Y
( z, z )
X≤z y=z
the set of order statistics among n random variables. In this + =
context x x x
R = X ( n ) − X (1) (8-44) X >Y Y≤z
represents the range, and when n = 2, we have the max and (a ) P ( X ≤ z, X > Y ) ( b ) P (Y ≤ z , X ≤ Y ) (c )
25 26
min statistics. PILLAI Fig. 8.12 PILLAI
Fig. 8.12 (c) represents the total region, and from there Once again, the shaded areas in Fig. 8.13 (a)-(b) show the
FZ ( z ) = P ( X ≤ z , Y ≤ z ) = F XY ( z , z ). (8-46) regions satisfying the above inequalities and Fig 8.13 (c)
shows the overall region.
If X and Y are independent, then y y y
x=w
x= y x= y
FZ ( z ) = F X ( x ) FY ( y ) ( w, w )
y=w
and hence x x x
f Z ( z ) = F X ( z ) f Y ( z ) + f X ( z ) FY ( z ). (8-47)
(a) (b) (c)
Y, X >Y,
From Fig. 8.13 (c),
W = min( X , Y ) = (8-48)
X, X ≤Y. FW ( w ) = 1 − P (W > w ) = 1 − P (X > w ,Y > w )
Thus = F X ( w ) + FY ( w ) − F XY ( w , w ) , (8-49)
FW ( w) = P(min(X , Y ) ≤ w) = P[(Y ≤ w, X > Y ) ∪ ( X ≤ w, X ≤ Y )] .
where we have made use of (7-5) and (7-12) with x2 = y 2 = +∞ ,
27 and x1 = y1 = w. 28
PILLAI PILLAI
Example 8.11: Let X and Y be independent exponential r.vs Solution: Although min(⋅) / max( ⋅) represents a complicated
with common parameter λ. Define W = min( X ,Y ). Find fW (w) ? function, by partitioning the whole space as before, it is
Solution: From (8-49) possible to simplify this function. In fact
X /Y , X ≤Y,
FW ( w ) = FX ( w ) + FY ( w ) − FX ( w ) FY ( w ) Z = (8-51)
Y /X, X >Y.
and hence As before, this gives
FZ ( z ) = P ( Z ≤ z ) = P ( X / Y ≤ z , X ≤ Y ) + P (Y / X ≤ z , X > Y )
fW ( w ) = f X ( w ) + f Y ( w ) − f X ( w ) FY ( w ) − FX ( w ) f Y ( w ).
= P ( X ≤ Yz , X ≤ Y ) + P (Y ≤ Xz , X > Y ) . (8-52)
But f X ( w) = fY ( w) = λe−λw , and FX ( w) = FY ( w) = 1 − e−λw , so that Since X and Y are both positive random variables in this case,
we have 0 < z < 1. The shaded regions in Figs 8.14 (a)-(b)
fW ( w ) = 2 λ e λw − 2 (1 − e − λw ) λ e − λw = 2 λ e −2 λwU ( w ). (8-50) represent the two terms in the above sum.
y y
Thus min ( X, Y ) is also exponential with parameter 2λ. x = yz
x=y x=y
Example 8.12: Suppose X and Y are as give in the above y = xz
example. Define Z = [min( X , Y ) / max( X , Y ) ] . Determine f Z (z ). x x
29 (a) 30
(b)
PILLAI Fig. 8.14 PILLAI
5
From Fig. 8.14 Solution: Since X and Y both take integer values { 0 , 1 , 2 , },
∞ yz ∞ xz
the same is true for Z. For any n = 0 , 1, 2 , , X + Y = n gives
FZ ( z ) =
0 x =0
f XY ( x, y )dxdy +
0 y =0
f XY ( x, y )dydx. (8-53) only a finite number of options for X and Y. In fact, if X = 0,
then Y must be n; if X = 1, then Y must be n-1, etc. Thus the
Hence event { X + Y = n } is the union of (n + 1) mutually exclusive
fZ ( z) =
∞
y f XY ( yz, y )dy +
∞
x f XY ( x, xz )dx =
∞
y{ f XY ( yz , y ) + f XY ( y , yz ) }dy events Ak given by
0 0 0
Ak = { X = k , Y = n − k } , k = 0 ,1 , 2 , , n. (8-55)
yλ { e }dy = 2λ
∞
−λ ( yz + y ) − λ ( y + yz )
∞ 2 ∞
= 2
+e 2
ye −λ (1+ z ) y dy = ue −udy
0 0 (1 + z )2 0
As a result
2 f Z (z ) n
= (1 + z ) 2
, 0 < z < 1, 2 P(Z = n ) = P( X + Y = n) = P (X = k, Y = n − k )
(8-54) k =0
0, otherwise . n
z = P( X = k , Y = n − k ) . (8-56)
1 k =0
Fig. 8.15
If X and Y are also independent, then
Example 8.13 (Discrete Case): Let X and Y be independent
Poisson random variables with parameters λ1 and λ2 P ( X = k , Y = n − k ) = P ( X = k ) P (Y = n − k )
respectively. Let Z = X + Y . Determine the p.m.f of Z. 31 and hence 32
PILLAI PILLAI
n
P( Z = n) = P( X = k , Y = n − k )
k =0
n
λ1k λn2 −k e − ( λ1 + λ2 ) n
n!
= e −λ1 e − λ2 = λ1k λn2 −k
k =0 k! ( n − k )! n! k =0 k! ( n − k )!
( λ1 + λ2 ) n
= e − ( λ1 + λ2 ) , n = 0, 1, 2, , ∞. (8-57)
n!
Thus Z represents a Poisson random variable with
parameter λ1 + λ2 , indicating that sum of independent Poisson
random variables is also a Poisson random variable whose
parameter is the sum of the parameters of the original
random variables.
As the last example illustrates, the above procedure for
determining the p.m.f of functions of discrete random
variables is somewhat tedious. As we shall see in Lecture 10,
the joint characteristic function can be used in this context
to solve problems of this type in an easier fashion. 33
PILLAI