0% found this document useful (0 votes)
138 views

One Function of Two Random Variables

This document discusses how to obtain the probability density function (PDF) fZ(z) of a new random variable Z that is defined as a function g(X,Y) of two random variables X and Y with a joint PDF fXY(x,y). To determine fZ(z), one must find the region Dz in the xy-plane where g(x,y) ≤ z and evaluate the double integral of fXY(x,y) over Dz. If X and Y are independent, fZ(z) is the convolution of their individual PDFs fX(x) and fY(y). Examples are provided to illustrate these methods.

Uploaded by

ever fuentes
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
138 views

One Function of Two Random Variables

This document discusses how to obtain the probability density function (PDF) fZ(z) of a new random variable Z that is defined as a function g(X,Y) of two random variables X and Y with a joint PDF fXY(x,y). To determine fZ(z), one must find the region Dz in the xy-plane where g(x,y) ≤ z and evaluate the double integral of fXY(x,y) over Dz. If X and Y are independent, fZ(z) is the convolution of their individual PDFs fX(x) and fY(y). Examples are provided to illustrate these methods.

Uploaded by

ever fuentes
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 33

8.

One Function of Two Random


Variables
Given two random variables X and Y and a function g(x,y),
we form a new random variable Z as

Z g ( X , Y ). (8-1)

Given the joint p.d.f f XY ( x, y ), how does one obtain f Z (z ),


the p.d.f of Z ? Problems of this type are of interest from a
practical standpoint. For example, a receiver output signal
usually consists of the desired signal buried in noise, and
the above formulation in that case reduces to Z = X + Y.
1
PILLAI
It is important to know the statistics of the incoming signal
for proper receiver design. In this context, we shall analyze
problems of the following type:
X Y
max( X , Y ) X Y
min( X , Y ) Z g ( X ,Y ) XY (8-2)

X 2 Y 2 X /Y
tan 1 ( X / Y )

Referring back to (8-1), to start with


FZ ( z ) P Z ( ) z P g ( X , Y ) z P( X , Y ) Dz
f XY ( x, y )dxdy, (8-3)
x , yDz 2
PILLAI
where Dz in the XY plane represents the region such
that g ( x, y ) z is satisfied. Note that Dz need not be simply
connected (Fig. 8.1). From (8-3), to determine FZ (z) it is
enough to find the region Dz for every z, and then evaluate
the integral there.
We shall illustrate this method through various examples.
Y

Dz

Dz
X

3
Fig. 8.1
PILLAI
Example 8.1: Z = X + Y. Find f Z (z ).
Solution:
z y
FZ ( z ) P X Y z f XY ( x, y )dxdy, (8-4)
y x

since the region Dz of the xy plane where x y z is the


shaded area in Fig. 8.2 to the left of the line x y z.
Integrating over the horizontal strip along the x-axis first
(inner integral) followed by sliding that strip along the y-axis
from to (outer integral) we cover the entire shaded
area. y

x z y

Fig. 8.2 4
PILLAI
We can find f Z (z) by differentiating FZ (z) directly. In this
context, it is useful to recall the differentiation rule in (7-
15) - (7-16) due to Leibnitz. Suppose
b( z )
H ( z) a( z)
h( x, z )dx. (8-5)
Then
b ( z ) h ( x , z )
h b( z ), z h a ( z ), z
dH ( z ) db( z ) da ( z )
dx. (8-6)
dz dz dz a ( z ) z
Using (8-6) in (8-4) we get
z y z y f
XY ( x, y )

f Z ( z) f XY ( x, y )dx dy f XY ( z y, y ) 0 dy
z z




f XY ( z y, y )dy. (8-7)

Alternatively, the integration in (8-4) can be carried out first


along the y-axis followed by the x-axis as in Fig. 8.3. 5
PILLAI
In that case
zx
FZ ( z )
y
f XY ( x, y )dxdy, (8-8)
x y

and differentiation of (8-8)


y zx
gives
dFZ ( z ) zx
f Z ( z) y f XY ( x, y )dy dx x
dz x
z

f XY ( x, z x )dx. (8-9) Fig. 8.3
x

If X and Y are independent, then


f XY ( x, y) f X ( x) fY ( y) (8-10)

and inserting (8-10) into (8-8) and (8-9), we get



f Z ( z) f X ( z y ) fY ( y )dy f X ( x ) fY ( z x )dx. (8-11)
y x
6
PILLAI
The above integral is the standard convolution of the
functions f X (z ) and fY (z) expressed two different ways. We
thus reach the following conclusion: If two r.vs are
independent, then the density of their sum equals the
convolution of their density functions.
As a special case, suppose that f X ( x) 0 for x 0 and fY ( y ) 0
for y 0, then we can make use of Fig. 8.4 to determine the
new limits for Dz .
y

(z ,0)

x z y
x
(0, z )
7
Fig. 8.4
PILLAI
In that case
z z y
FZ ( z ) f XY ( x, y )dxdy
y 0 x 0

or
z

f Z ( z ) f XY ( x, y )dx dy 0 XY
z z y f ( z y, y )dy, z 0,
y 0 z x 0
(8-12)

0, z 0.
On the other hand, by considering vertical strips first in
Fig. 8.4, we get
z zx
FZ ( z ) f XY ( x, y )dydx
x 0 y 0

or
z f ( x ) f ( z x )dx, z 0,
f XY ( x, z x )dx y 0 X
z
f Z ( z) Y
(8-13)
x 0
0, z 0,
if X and Y are independent random variables.
8
PILLAI
Example 8.2: Suppose X and Y are independent exponential
r.vs with common parameter , and let Z = X + Y.
Determine f Z (z).
x y
Solution: We have Xf ( x ) e U ( x ), f Y ( y ) e U ( y ), (8-14)
and we can make use of (13) to obtain the p.d.f of Z = X + Y.
z z
f Z ( z) e
2 x
e ( z x )
dx e
2 z
dx z2ezU ( z ). (8-15)
0 0

As the next example shows, care should be taken in using


the convolution formula for r.vs with finite range.
Example 8.3: X and Y are independent uniform r.vs in the
common interval (0,1). Determine f Z (z), where Z = X + Y.
Solution: Clearly, Z X Y 0 z 2 here, and as Fig. 8.5
shows there are two cases of z for which the shaded areas are
quite different in shape and they should be considered
9
separately. PILLAI
y y

x z y
x z y
x x
(a ) 0 z 1 (b) 1 z 2
Fig. 8.5

For 0 z 1,
z z y z z2
FZ ( z ) 1 dxdy ( z y )dy , 0 z 1. (8-16)
y 0 x 0 y 0 2
For 1 z 2, notice that it is easy to deal with the unshaded
region. In that case
FZ ( z ) 1 PZ z 1
1 1

y z 1 x z y
1 dxdy
1 (2 z )2 (8-17)
1 (1 z y )dy 1 , 1 z 2. 10
y z 1 2
PILLAI
Using (8-16) - (8-17), we obtain
dFZ ( z ) z 0 z 1,
f Z ( z) (8-18)
dz 2 z, 1 z 2.
By direct convolution of f X (x) and fY ( y ), we obtain the
same result as above. In fact, for 0 z 1 (Fig. 8.6(a))
z
f Z ( z ) f X ( z x) fY ( x)dx 1 dx z. (8-19)
0

and for 1 z 2 (Fig. 8.6(b))


1
f Z ( z) 1 dx 2 z. (8-20)
z 1

Fig 8.6 (c) shows f Z (z) which agrees with the convolution
of two rectangular waveforms as well.

11
PILLAI
fY (x) f X ( z x) f X ( z x) fY ( x)

x x x
1 z 1 z z

(a ) 0 z 1

fY (x) f X ( z x) f X ( z x) fY ( x)

x x x
1 z 1 z
z 1 1
(b) 1 z 2

f Z (z )

z
0 1 2
Fig. 8.6 (c) 12
PILLAI
Example 8.3: Let Z X Y . Determine its p.d.f f Z (z ).
Solution: From (8-3) and Fig. 8.7
z y
FZ ( z ) P X Y z f XY ( x, y )dxdy
y x

and hence
dFZ ( z ) z y
fZ ( z) f XY ( x, y )dx dy f XY ( y z, y )dy.
y z
(8-21)
dz x

If X and Y are independent, then the above formula reduces


to
f Z ( z) f X ( z y ) fY ( y )dy f X ( z ) fY ( y ), (8-22)

which represents the convolution of f X ( z ) with fY (z ).


y

y x y z
x yz
x
13
Fig. 8.7 PILLAI
As a special case, suppose
f X ( x) 0, x 0, and fY ( y) 0, y 0.
In this case, Z can be negative as well as positive, and that
gives rise to two situations that should be analyzed
separately, since the region of integration for z 0 and z 0
are quite different. For z 0, from Fig. 8.8 (a) y
z y
FZ ( z ) f XY ( x, y )dxdy x z y
y 0 x 0
x
and for z 0, from Fig 8.8 (b) z
z
(a)
z y
FZ ( z ) f XY ( x, y )dxdy y
y z x 0

After differentiation, this gives x z y


z
f ( z y , y )dy ,
XY z 0, x
f Z ( z ) 0 (8-23)
z XY
f ( z y , y )dy , z 0. Fig. 8.8 (b)

14
PILLAI
Example 8.4: Given Z = X / Y, obtain its density function.
Solution: We have FZ ( z) PX / Y z . (8-24)
The inequality X / Y z can be rewritten as X Yz if Y 0,
and X Yz if Y 0. Hence the event X / Y z in (8-24) need __
to be conditioned
__
by the event A Y 0 and its compliment A .
Since A A , by the partition theorem, we have
X / Y z ( X / Y z ) ( A A ) ( X / Y z ) A ( X / Y z ) A
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
P X Yz , Y 0 P X Yz , Y 0 . (8-25)
Fig. 8.9(a) shows the area corresponding to the first term,
and Fig. 8.9(b) shows that corresponding to the second term
y y
in (8-25). x yz
x yz
x

x 15
(a) Fig. 8.9 (b) PILLAI
Integrating over these two regions, we get
yz 0
FZ ( z ) f XY ( x, y )dxdy f XY ( x, y )dxdy. (8-26)
y 0 x y x yz

Differentiation with respect to z gives


0
f Z ( z ) yf XY ( yz , y )dy ( y ) f XY ( yz , y )dy
0

| y | f XY ( yz , y )dy , z . (8-27)

Note that if X and Y are nonnegative random variables, then


the area of integration reduces to that shown in Fig. 8.10.
y
x yz

x
Fig. 8.10 16
PILLAI
This gives
yz
FZ ( z ) f XY ( x, y )dxdy
y 0 x 0
or
y f ( yz , y )dy,
f Z ( z ) 0 XY
z 0,
(8-28)
0, otherwise.
Example 8.5: X and Y are jointly normal random variables
with zero mean so that
1 x 2 2 rxy y 2

1 2 (1 r 2 ) 12 1 2 22
f XY ( x, y ) e
. (8-29)
21 2 1 r 2

Show that the ratio Z = X / Y has a Cauchy density function


centered at r 1 / 2 .
Solution: Inserting (8-29) into (8-27) and using the fact
that f XY ( x, y) f XY ( x, y), we obtain
2 02 ( z )

y 2 / 2 02
f Z ( z) ye dy ,
21 2 1 r 2 0
1 2 1 r 2
17
PILLAI
where
1 r2
( z)
2
0 .
z2 2 rz 1

12 1 2 22

Thus
1 2 1 r 2 /
f Z ( z) 2 , (8-30)
2 ( z r 1 / 2 ) 1 (1 r )
2 2 2

which represents a Cauchy r.v centered at r 1 / 2 . Integrating


(8-30) from to z, we obtain the corresponding
distribution function to be
1 1 2 z r 1
FZ ( z ) arctan . (8-31)
2 1 1 r 2

Example 8.6: Z X 2 Y 2 . Obtain f Z (z ).


Solution: We have
FZ ( z ) P X 2 Y 2 z f XY ( x, y )dxdy. (8-32)
X 2 Y 2 z
18
PILLAI
But, X 2 Y 2 z represents the area of a circle with radius z,
and hence from Fig. 8.11,
z z y2
FZ ( z ) f XY ( x, y )dxdy. (8-33)
y z x z y2

This gives after repeated differentiation


f Z ( z)
z

y z
2 z y
1
2
f XY ( z y 2
, y ) f XY ( z y 2

, y ) dy. (8-34)

As an illustration, consider the next example.


y

z
X 2 Y 2 z
z
x

z
Fig. 8.11 19
PILLAI
Example 8.7 : X and Y are independent normal r.vs with zero
Mean and common variance 2 . Determine f Z (z) for Z X 2 Y 2 .
Solution: Direct substitution of (8-29) with r 0, 1 2
Into (8-34) gives
e z / 2
2
z 1 1 z 1

y ) / 2
fZ ( z) 2 e( z y dy
2 2 2

dy
2 z y 2 2 2
y z 2 0
zy 2

e z / 2 z cos
2
/2 1 z / 2 2

2 0
z cos
d
2 2
e U ( z ), (8-35)

where we have used the substitution y z sin . From (8-35)


we have the following result: If X and Y are independent zero
mean Gaussian r.vs with common variance 2 , then
X 2 Y 2 is an exponential r.vs with parameter 2 2 .

Example 8.8 : Let Z X 2 Y 2 . Find f Z (z).


Solution: From Fig. 8.11, the present case corresponds to20 a
circle with radius z 2 . Thus PILLAI
z z2 y2
FZ ( z )
f ( x, y )dxdy.
y z x z2 y2
XY

And by repeated differentiation, we obtain


f Z ( z)
z

z
z y2
z
2
f XY ( z 2 y 2 , y ) f XY ( z 2 y 2 , y ) dy. (8-36)

Now suppose X and Y are independent Gaussian as in


Example 8.7. In that case, (8-36) simplifies to
z z 1 2z z 1
f Z ( z ) 2 y 2 y 2 ) / 2 2
dy e z / 2 2

2 2
e( z dy
z y 2 2
2
0 2 2 0
z y
2 2

2z /2 z cos z
d 2 e z / 2 U ( z ),
z 2 / 2 2

2 2
e (8-37)
2 0 z cos

which represents a Rayleigh distribution. Thus, if W X iY ,


where X and Y are real, independent normal r.vs with zero
mean and equal variance, then the r.v W X Y has a 2 2

Rayleigh density. W is said to be a complex Gaussian r.v


with zero mean, whose real and imaginary parts are
independent r.vs. From (8-37), we have seen that its 21
magnitude has Rayleigh distribution. PILLAI
What about its phase
tan 1
X
? (8-38)
Y

Clearly, the principal value of lies in the interval ( / 2, / 2).


If we let U tan X / Y , then from example 8.5, U has a
Cauchy distribution with (see (8-30) with 1 2 , r 0 )
1/ (8-39)
fU (u ) , u .
u 1
2

As a result
1 1 1/ 1 / , / 2 / 2,
f ( ) fU (tan ) (8-40)
| d / du | (1 / sec ) tan 1 0,
2 2
otherwise .

To summarize, the magnitude and phase of a zero mean


complex Gaussian r.v has Rayleigh and uniform distributions
respectively. Interestingly, as we will show later, these two
derived r.vs are also independent of each other! 22
PILLAI
Let us reconsider example 8.8 where X and Y have nonzero
means X and Y respectively. Then Z X 2 Y 2 is said to
be a Rician r.v. Such a scene arises in fading multipath
situation where there is a dominant constant component
(mean) in addition to a zero mean Gaussian r.v. The constant
component may be the line of sight signal and the zero mean
Gaussian r.v part could be due to random multipath
components adding up incoherently (see diagram below).
The envelope of such a signal is said to have a Rician p.d.f.
Example 8.9: Redo example 8.8, where X and Y have
nonzero means X and Y respectively. Multipath/Gaussian
Solution: Since Line of sight noise
signal (constant)
1
f XY ( x, y ) e [( x X ) ( y Y ) 2 ] / 2 2
2
, Rician
2 2
a
Output
23
substituting this into (8-36) and letting PILLAI
x z cos , y z sin , X2 Y2 , X cos , Y sin ,
we get the Rician probability density function to be
ze ( z ) / 2
e d
2 2 2
/2

z cos( ) / 2
f Z ( z) e z cos( ) /
2

2 2 /2

ze ( z ) / 2 /2 z cos( ) / 2
2 2 2
3/2
e d e z cos( ) / 2
d
2 2
/2 /2
ze ( z ) / 2 z
2 2 2

I 0 2
, (8-41)
2 2
where
1 2 1

cos( )
I 0 ( ) e d e cos d (8-42)
2 0 0

is the modified Bessel function of the first kind and zeroth


order.
Example 8.10: Z max( X , Y ), W min( X , Y ). Determine f Z (z).
Solution: The functions max and min are nonlinear 24
PILLAI
operators and represent special cases of the more general
order statistics. In general, given any n-tuple X 1, X 2 , , X n ,
we can arrange them in an increasing order of magnitude
such that
X (1) X ( 2 ) X ( n ) , (8-43)

where X (1) min X 1, X 2 , , X n , and X ( 2 ) is the second smallest


value among X 1, X 2 , , X n , and finally X ( n ) max X 1, X 2 , , X n .
If X 1, X 2 , , X n represent r.vs, the function X ( k ) that takes on
the value x( k ) in each possible sequence x1, x2 , , xn is
known as the k-th order statistic. ( X (1) , X (2) , , X ( n ) ) represent
the set of order statistics among n random variables. In this
context
R X ( n ) X (1) (8-44)
represents the range, and when n = 2, we have the max and
25
min statistics. PILLAI
Returning back to that problem, since
X , X Y,
Z max( X , Y ) (8-45)
Y , X Y,

we have (see also (8-25))


FZ ( z ) P max( X , Y ) z P X z, X Y Y z, X Y
P X z, X Y P Y z, X Y ,
since ( X Y ) and ( X Y ) are mutually exclusive sets that
form a partition. Figs 8.12 (a)-(b) show the regions
satisfying the corresponding inequalities in each term
above. y y y
xz x y x y
X Y
X z yz ( z, z )

x x x
X Y Y z

(a ) P( X z, X Y ) (b) P(Y z, X Y ) (c )
26
Fig. 8.12 PILLAI
Fig. 8.12 (c) represents the total region, and from there
FZ ( z) P X z,Y z FXY ( z, z). (8-46)

If X and Y are independent, then


FZ ( z) FX ( x) FY ( y)

and hence
f Z ( z) FX ( z) fY ( z) f X ( z) FY ( z). (8-47)

Similarly
Y , X Y,
W min( X , Y ) (8-48)
X , X Y.
Thus
FW ( w) Pmin( X , Y ) w PY w, X Y X w, X Y .
27
PILLAI
Once again, the shaded areas in Fig. 8.13 (a)-(b) show the
regions satisfying the above inequalities and Fig 8.13 (c)
shows the overall region.
y y
y xw
x y x y
( w, w)
yw
x x x

(a) (b) (c)


Fig. 8.13
From Fig. 8.13 (c),
FW ( w) 1 PW w 1 P X w, Y w
FX ( w) FY ( w) FXY ( w, w) , (8-49)
where we have made use of (7-5) and (7-12) with x2 y2 ,
and x1 y1 w. 28
PILLAI
Example 8.11: Let X and Y be independent exponential r.vs
with common parameter . Define W min( X , Y ). Find fW (w) ?
Solution: From (8-49)
FW ( w) FX ( w) FY ( w) FX ( w) FY ( w)

and hence
fW ( w) f X ( w) fY ( w) f X ( w) FY ( w) FX ( w) fY ( w).

But f X ( w) fY ( w) ew , and FX ( w) FY ( w) 1 e w , so that


fW ( w) 2ew 2(1 e w )e w 2e 2 wU ( w). (8-50)

Thus min ( X, Y ) is also exponential with parameter 2.


Example 8.12: Suppose X and Y are as give in the above
example. Define Z min( X ,Y ) / max( X ,Y ). Determine f Z (z).
29
PILLAI
Solution: Although min( ) / max( ) represents a complicated
function, by partitioning the whole space as before, it is
possible to simplify this function. In fact
X /Y , X Y,
Z (8-51)
Y / X , X Y.
As before, this gives
FZ ( z ) P Z z P X / Y z , X Y P Y / X z , X Y
P X Yz, X Y P Y Xz, X Y . (8-52)
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)
represent the two terms in the above sum.
y y
x yz
x y x y
y xz
x x
(a) 30
(b)
Fig. 8.14 PILLAI
From Fig. 8.14
yz xz
FZ ( z ) f XY ( x, y )dxdy f XY ( x, y )dydx. (8-53)
0 x 0 0 y 0

Hence

f Z ( z ) y f XY ( yz , y )dy x f XY ( x, xz)dx y f XY ( yz , y ) f XY ( y , yz ) dy
0 0 0

y e dy 2
2

( yz y ) ( y yz ) (1 z ) y
2
e 2
ye dy ue u dy
0 0 (1 z )2 0

2 f Z (z )
, 0 z 1, 2
(1 z )2 (8-54)
0, otherwise .
z
1
Fig. 8.15
Example 8.13 (Discrete Case): Let X and Y be independent
Poisson random variables with parameters 1 and 2
respectively. Let Z X Y . Determine the p.m.f of Z. 31
PILLAI
Solution: Since X and Y both take integer values 0, 1, 2,,
the same is true for Z. For any n 0, 1, 2, , X Y n gives
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
event { X Y n} is the union of (n + 1) mutually exclusive
events Ak given by
Ak X k , Y n k , k 0,1,2,, n. (8-55)
As a result
n
P( Z n ) P( X Y n ) P X k , Y n k
k 0
n
P( X k , Y n k ) . (8-56)
k 0

If X and Y are also independent, then


P X k , Y n k P( X k ) P(Y n k )
and hence 32
PILLAI
n
P( Z n ) P( X k , Y n k )
k 0
n
1k n2k e ( 1 2 ) n
n!
e 1
e 2
1 2
k n k

k 0 k! (n k )! n! k 0 k! ( n k )!

( ) n
e ( 1 2 ) 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

You might also like