Sie sind auf Seite 1von 20

5.

Functions of a Random Variable


Let X be a r.v defined on the model (, F , P ), and suppose
g(x) is a function of the variable x. Define
Y g ( X ).

(5-1)

Is Y necessarily a r.v? If so what is its PDF FY ( y ), pdf fY ( y ) ?


Clearly if Y is a r.v, then for every Borel set B, the set of for
Y ( ) must
B
which
belong to F. Given that X is a r.v, this is
1
g
B ) a Borel set, i.e., if g(x) is a Borel
assured if
is (also
function. In that case if X is a r.v, so is Y, and for every Borel
set B
P (Y B ) P ( X g 1 ( B )).

(5-2) 1

PILLAI

In particular
FY ( y ) P (Y ( ) y ) P g ( X ( )) y P X ( ) g 1 ( , y ] . (5-3)

Thus the distribution function as well of the density


function of Y can be determined in terms of that of X. To
obtain the distribution function of Y, we must determine the
Borel set on the x-axis such that X ( ) g 1 ( y ) for every
given y, and the probability of that set. At this point, we
shall consider some of the following functions to illustrate
the technical details.
aX b

sin X

1
X
log X

X2

Y g( X )

|X |

X
eX

| X | U ( x)

PILLAI

Example 5.1: Y aX b
Solution: Suppose a 0.

(5-4)

y b

y b
FY ( y ) P Y ( ) y P aX ( ) b y P X ( )

. (5-5)
X
a

and

1 y b
fY ( y ) f X
.
a a

(5-6)

On the other hand if a 0, then

FY ( y ) P Y ( ) y P aX ( ) b y P

y b
X ( )

y b
,
a

1 FX

and hence
fY ( y )

(5-7)
1 y b
fX
.
a a

(5-8)
3

PILLAI

From (5-6) and (5-8), we obtain (for all a)


fY ( y )

1
y b
fX
.
|a | a

(5-9)
(5-10)

Example 5.2: Y X 2 .
FY ( y ) P Y ( ) y P X 2 ( ) y .

(5-11)

If y 0, then the event X 2 ( ) y , and hence


(5-12)

FY ( y ) 0, y 0.

For y 0, from Fig. 5.1, the event


is equivalent to {x1 X ( ) x2 }.

{Y ( ) y} { X 2 ( ) y}

Y X2
y

x1

Fig. 5.1

x2

PILLAI

Hence
FY ( y ) P x1 X ( ) x2 FX ( x2 ) FX ( x1 )
FX ( y ) FX ( y ),

(5-13)

y 0.

By direct differentiation, we get

fY ( y ) 2 y

If

f X (x )

( y ) f X ( y ) ,
0,

y 0,
otherwise.

(5-14)

represents an even function, then (5-14) reduces to


fY ( y )

1
fX
y

y U ( y ).

(5-15)

In particular if X N (0,1), so that


f X ( x)

1
x2 / 2
e
,
2

(5-16)
5

PILLAI

and substituting this into (5-14) or (5-15), we obtain the


p.d.f of Y X 2 to be
fY ( y )

1
e y / 2U ( y ).
2y

(5-17)

On comparing this with (3-36), we notice that (5-17)


represents a Chi-square r.v with n = 1, since (1 / 2) .
Thus, if X is a Gaussian r.v with 0, then Y X 2
represents a Chi-square r.v with one degree of freedom
(n = 1).
Example 5.3: Let
X c,

Y g( X )
0,
X c,

X c,
c X c,
X c.

PILLAI

In this case
P (Y 0) P ( c X ( ) c ) FX ( c ) FX ( c ).

For y 0, we have x c, and

Y ( ) X ( ) c

FY ( y ) P Y ( ) y P ( X ( ) c y )

Similarly

P X ( ) y c FX ( y c ),

y 0.

f X ( y c ), y 0,

fY ( y ) [ FX ( c ) FX ( c )] ( y ),
f ( y c ), y 0.
X
g( X )

FX (x )

c
c

(a)

so that

P X ( ) y c FX ( y c ), y 0.
y 0, if x c, and Y ( ) X ( ) c so

FY ( y ) P Y ( ) y P ( X ( ) c y )

Thus

(5-18)

(5-19)

that
(5-20)
(5-21)

FY ( y )

(b)
Fig. 5.2

(c)

PILLAI

Example 5.4: Half-wave rectifier


Y g ( X );

In this case

x,
g ( x)
0,

x 0,
x 0.

P(Y 0) P ( X ( ) 0) FX (0).

(5-22)

(5-23)

Fig. 5.3

and for y 0, since Y X ,


FY ( y ) P Y ( ) y P X ( ) y FX ( y ).

(5-24)

Thus

f X ( y ),

y 0,

fY ( y ) FX (0) ( y ) y 0,

0,
y 0,

f X ( y )U ( y ) FX (0) ( y ).

(5-25)
8

PILLAI

Note: As a general approach, given Y g ( X ), first sketch


the graph y g ( x ), and determine the range space of y.
Supposea y b is the range space of y g ( x ).
Then clearly for y a, FY ( y ) 0, and for y b, FY ( y ) 1, so
that FY ( y ) can be nonzero only in a y b. Next, determine
whether there are discontinuities in the range space of y. If
so evaluate P Y ( ) yi at these discontinuities. In the
continuous region of y, use the basic approach
FY ( y ) P g ( X ( )) y

and determine appropriate events in terms of the r.v X for


every y. Finally, we must have FY ( y ) for y , and
obtain
fY ( y )

dFY ( y )
dy

in a y b.

PILLAI

However, if Y g ( X ) is a continuous function, it is easy to


establish a direct procedure to obtain fY ( y ). A continuos
function g(x) with g (x ) nonzero at all but a finite number of
points, has only a finite number of maxima and minima,
and it eventually becomes monotonic as | x | . Consider a
specific y on the y-axis, and a positive increment y as
shown in Fig. 5.4
g (x )
y y
y

x
x1 x1 x1

x 2 x2 x 2

x3 x3 x3

Fig. 5.4

fY ( y )

for Y g ( X ), where g () is of continuous type.

10

PILLAI

Using (3-28) we can write


P y Y ( ) y y

y y

fY (u )du fY ( y ) y.

(5-26)

But the event y Y ( ) y y can be expressed in terms


of X ( ) as well. To see this, referring back to Fig. 5.4, we
notice that the equation y g (x ) has three solutions x1 , x2 , x3
(for the specific y chosen there). As a result
when y Y ( ) y y, the r.v X could be in any one of the
three mutually exclusive intervals
{x1 X ( ) x1 x1}, {x2 x2 X ( ) x2 } or {x3 X ( ) x3 x3} .

Hence the probability of the event in (5-26) is the sum of


the probability of the above three events, i.e.,
P y Y ( ) y y P{x1 X ( ) x1 x1}
P{ x2 x2 X ( ) x2 } P{x3 X ( ) x3 x3} .(5-27)

11

PILLAI

For small y , xi , making use of the approximation in (5-26),


we get
fY ( y ) y f X ( x1 ) x1 f X ( x2 )( x2 ) f X ( x3 )x3 .

(5-28)

In this case, x1 0, x2 0 and x3 0, so that (5-28) can be


rewritten as
fY ( y ) f X ( xi )
i

| xi |
1

f X ( xi )
y
i y / xi

(5-29)

and as y 0, (5-29) can be expressed as


fY ( y )
i

1
1
f X ( xi )
f X ( xi ).
dy / dx x
i g ( xi )

(5-30)

The summation index i in (5-30) depends on y, and for every


y the equation y g ( xi ) must be solved to obtain the total
number of solutions at every y, and the actual solutions x1 , x2 ,
all in terms of y.
12
PILLAI

For example, if Y X 2 , then for all y 0, x1 y and x2 y


represent the two solutions for each y. Notice that the
solutions xi are all in terms of y so that the right side of (5-30)
2
Y

X
is only a function of y. Referring back to the example
(Example 5.2) here for each y 0, there are two solutions
given by x1 y and x2 y . ( fY ( y ) 0 for y 0 ).
YX
Moreover
2

dy
dy
2 x so that
dx
dx

2 y
x xi

and using (5-30) we get

fY ( y ) 2

f
y

x1

( y ) f X ( y ) ,

which agrees with (5-14).

0,

Fig. 5.5

y 0,
otherwise ,

x2

(5-31)

13

PILLAI

Example 5.5:

1
Y .
X

(5-32)

Find fY ( y ).

Solution: Here for every y,


dy
1
2 so that
dx
x

x1 1 / y

dy
dx

is the only solution, and

x x1

1
2

y
,
2
1/ y

and substituting this into (5-30), we obtain


1
1
fY ( y ) 2 f X .
y
y

(5-33)

In particular, suppose X is a Cauchy r.v as in (3-39) with


parameter so that
/
f X ( x) 2
, x .
2
x

(5-34)

In that case from (5-33), Y 1 / X has the p.d.f


fY ( y )

1
/
(1 / ) /

,
2
2
2
2
2
y (1 / y )
(1 / ) y

y .

(5-35)
14

PILLAI

But (5-35) represents the p.d.f of a Cauchy r.v with


parameter 1 / . Thus if X C ( ), then 1 / X C (1 / ).
Example 5.6: Suppose f X ( x ) 2 x / 2 , 0 x , and Y sin X .
Determine fY ( y ).
Solution: Since X has zero probability of falling outside the
interval (0, ), y sin x has zero probability of falling outside
the interval (0,1). Clearly fY ( y ) 0 outside this interval. For
any 0 y 1, from Fig.5.6(b), the equation y sin x has an
infinite number of solutions , x1 , x2 , x3 ,, where x1 sin 1 y
is the principal solution. Moreover, using the symmetry we
also get x2 x1 etc. Further,
dy
cos x 1 sin 2 x 1 y 2
dx

so that

dy
dx

1 y2 .
x xi

15

PILLAI

f X ( x)

x3

(a)

y sin x

x1

x1

x2

x3

(b)
Fig. 5.6

Using this in (5-30), we obtain for 0 y 1,


fY ( y )

i
i 0

1
1 y

f X ( xi ).

(5-36)

But from Fig. 5.6(a), in this case f X ( x1 ) f X ( x3 ) f X ( x4 ) 0


(Except for f X ( x1 ) and f X ( x2 ) the rest are all zeros).
16

PILLAI

Thus (Fig. 5.7)


fY ( y )

1
1 y2

f X ( x1 )

2( x1 x1 )

1 y

f X ( x2 )
2

1 y2

0,

fY ( y )

2 x1 2 x2
2

2
2


1 y
1

0 y 1,
otherwise.

(5-37)

Fig. 5.7

Example 5.7: Let Y tan X where X U / 2, / 2 .


Determine fY ( y ).
Solution: As x moves from / 2, / 2 , y moves from , .
From Fig.5.8(b), the function Y tan X is one-to-one
for / 2 x / 2 . For any y, x1 tan 1 y is the principal
solution. Further
dy d tan x

sec 2 x 1 tan 2 x 1 y 2
dx dx

17

PILLAI

so that using (5-30)


fY ( y )

1
1/
f X ( x1 )
,
2
| dy / dx |x x1
1 y

y ,

(5-38)

which represents a Cauchy density function with parameter


equal to unity (Fig. 5.9).
f X (x )

/2

/2

fY ( y )

(a)
y tan x
/2

x1 / 2
(b)
Fig. 5.8

1
1 y2

Fig. 5.9

18

PILLAI

Functions of a discrete-type r.v


Suppose X is a discrete-type r.v with
P( X xi ) pi , x x1 , x2 ,, xi ,

(5-39)

and Y g ( X ). Clearly Y is also of discrete-type, and


when x xi , yi g ( xi ), and for those yi
P(Y yi ) P( X xi ) pi , y y1 , y2 ,, yi ,

(5-40)

Example 5.8: Suppose X P( ), so that


P( X k ) e

k
, k 0,1,2,
k!

(5-41)

2
Y

X
1. Find the p.m.f of Y.
Define

Solution: X takes the values 0,1,2,, k , so that Y only


takes the value 1, 2, 5, L , k 2 1, L and
19

PILLAI

P(Y k 2 1) P ( X k )

so that for j k 2 1

P (Y j ) P X

j 1 e

j 1
, j 1, 2, 5, L , k 2 1, L . (5-42)
( j 1)!

20

PILLAI

Das könnte Ihnen auch gefallen