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

ST 1010 2020 Week 1-Function of Random Variables

Uploaded by

Anon son
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

ST 1010 2020 Week 1-Function of Random Variables

Uploaded by

Anon son
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

ST 1010: Statistical Theory (2C,30L) DST @ UOC

ST1010: Statistical Theory (2C, 30L)

Function of Random Variables


Let E be an experiment and S be a sample space associated with E. Let X be a random variable defined on S.
Suppose Y = H ( X ) is a real value function of X, then Y = H ( X ) is also a random variable.

Y is a Discrete Functions
Case I : X is discrete and then Y is also discrete
Case II : X is continuous and then Y is discrete

Case I: X is discrete and then Y is also discrete


Suppose that possible values of X are ( x1 , x2 , x3 ,..., xn ) . Than possible values of Y = H ( X ) are;

Y= y1 y2 y3 . . . yn
H(x1) H(x2) H(x3) . . . H(xn)
Here we want to find the probability distribution function of Y as follows:
Y y1 y2 y3 . . . yn
P[Y=y]

Example 01: Suppose that a random variable X has 3 values such that -1, 0, +1 with probabilities 1/3, 1/2,
and 1/6 respectively. Then find the p.d.f. of Y = H ( X ) = 3 X + 1 .
Answer: Here we have

X -1 0 1
P[X=x] 1/3 1/2 1/6
Therefore the possible values of Y are: And the p.d.f. of Y is:
X -1 0 1 Y -2 1 4
Y=3X+1 -2 1 4 P[Y=y] 1/3 1/2 1/6

Example 02: Suppose that a random variable X has following p.d.f.

X -1 0 1
P[X=x] 1/3 1/2 1/6

Let Y = X 2 . Find the p.d.f. of Y.


1 1 1
Answer: P (Y = y ) = P Y = −1 or Y = 1 = P Y = −1 + P Y = 1 = + =
3 6 2
Y 1 0
P[X=x] 1/2 1/2

General procedure: When X is Discrete


If ( x1 , x2 , x3 ,..., xn ) are the possible values of X with P[ X = xi ] = P( xi ) where i=1,2,3,…n and H is a function
such that each value of Y corresponds to one and only one X (and vies versa), which is called 1-1 function,
then the p.d.f. of Y is as follows.
Y= H(x1) H(x2) H(x3) . . . H(xn)
P[Y=y] P(x1) P(x2) P(x3) . . . P(xn)

See example 01

However, in some situations H(X) may not 1-1 function. (That is, y may correspond to more that one x). If
ji
xi1 , xi 2 , xi 3 ,..., xiji all leads to same yi where i = 1, 2,3,..., n then P[Y = yi ] =  P[ X = xik ]
k =1
See example 02

RABA 1
ST 1010: Statistical Theory (2C,30L) DST @ UOC
Case II: X is continuous and then Y is discrete
Example 03: Suppose X is assuming all real values. If we define Y:
1 for x  0
Y =
−1 for x  0

Then P Y = 1 = P[ X  0] =  f ( x)dx
0
0
P Y = −1 = P[ X  0] =  f ( x)dx
−

Y is a Continuous Function
General procedure: When X is Continuous
Step (01): Obtain the cumulative distribution function of Y (That is GY ( y ) )
dGY ( y )
Step (02): Obtain the probability density function of Y (That is gY ( y ) = )
dy
Step (03): Determine the values of y, in the range space for which gY ( y )  0 .

Example 04: Suppose X has p.d.f. f ( x) = 2 x 0  x  1 . Let Y = 3X + 1. Find the p.d.f. of Y.


Answer: Here Y = 3X + 1 is 1-1 function.
y −1 y −1
y −1
y −1 3 3
x2 ( y − 1)2
GY ( y) = P[Y  y] = P[3 X + 1  y] = P[ X 
3
]= 
0
f ( x)dx = 0
2 xdx = 2
2 0
3
=
9
Therefore GY ( y ) is:
 y −1
0 0
3 0 y 1

 ( y − 1) 2 y −1 → 
 ( y − 1) 2
GY ( y ) =  0 1 GY ( y ) =  1 y  4
 9 3  9
 y −1 1 y4
1 1
 3

Therefore the p.d.f. of y is;


dGY ( y ) d  ( y − 1)  2 ( y − 1)
2

gY ( y ) = =  = 1 y  4
dy dy  9  9
 
Note:
4
1) Show that g
1
Y ( y )dy = 1

2) Draw the C.D.F of Y

Example 05: Suppose that the continuous random variable has p.d.f.. f ( x) = 2 x 0  x  1 . Let Y = e − x
. (That is 1-1 function) Find the p.d.f. of Y?

Answer:
GY ( y ) = P[Y  y ] = P[e− x  y ] = P[− x  ln y ] = P[ x  − ln y ]
1 1
x2 1
= 
− ln y
f ( x)dx = 
− ln y
2 xdx =2
2 − ln y

= 1 − ( ln y )
2

RABA 2
ST 1010: Statistical Theory (2C,30L) DST @ UOC
0 − ln y  0

GY ( y ) = 1 − ( ln y )
2
0  − ln y  1
1 − ln y  1

Therefore the p.d.f. of y is gY ( y ) =


dGY ( y) d 1 − (log y)
=
2

=
(
−2log y ) e−1  y  1
dy dy y
Note:
1
1. Show that g −1
Y ( y )dy = 1
e
2. Draw the C.D.F of Y

Theorem : Let X be a continuous random variable with a p.d.f. f ( x ) for a  x  b . Suppose that Y = H ( X )
is a strictly monotone [strictly increasing or decreasing] (and also 1-1) function of X. Assume that H(X) is
differentiable at all x. Then the random variable Y = H ( X ) has a p.d.f. gY ( y ) as follows:
dx
gY ( y) = f X ( x) 
dy
Note: There are two situations for H.
1. Assume that H is a strictly increasing function. Then gY ( y )  0 for values of y such that
H ( a )  y  H (b )

2. Assume that H is a strictly decrease function. Then gY ( y )  0 for values of y such that
H (b )  y  H ( a )

Proof: Consider the above 2 situations separately.


Situation 01: When H is increasing
GY ( y) = P[Y  y] = P[ H ( X )  y] = P[ X  H −1 ( y )] = F ( x ) where x = H −1 ( y )
dGY ( y ) dF ( x ) dx dx
gY ( y ) =
= = f ( x) → (01)
dy dy dy dy
Situation 02: When H is decreasing
GY ( y ) = P[Y  y ] = P[ H ( X )  y ] = P[ X  H −1 ( y )]
= 1 − P[ X  H −1 ( y )] = 1 − F ( x ) where x = H −1 ( y )
dGY ( y ) d 1 − F ( x )  dx dx  dx 
gY ( y ) = = = − f ( x ) = f ( x ) −  → (02)
dy dy dy dy  dy 
From (01) and (02)
dx
gY ( y) = f X ( x)
dy

RABA 3
ST 1010: Statistical Theory (2C,30L) DST @ UOC
Example 06: Suppose X has p.d.f.
f ( x) = 2 x 0  x 1
Let Y = 3X + 1 (1-1 and strictly increasing function).
Find the p.d.f. of Y.

Answer: We know that


dx
gY ( y) = f X ( x)
dy
Here
dx 1
= and f ( x) = 2 x
dy 3
Therefore
1  y − 1  1 2 ( y − 1)
gY ( y ) = 2 x = 2  = for 1  y  4
3  3 3 9

Example 07: Suppose X is a continuous random variable with p.d.f.


1
f ( x) = −1  x  1
2
Let Y = X 2 (not a 1-1 function) . Find the p.d.f. of Y.

Answer:
GY ( y ) = P Y  y  = P  X 2  y  = P  − y  X  + y 
+ y + y

=  f ( x ) dx = 
1
2
1 +
dx =  x −
2
y
y
=
1
2
(
y− − y 
 )
− y − y

= y
Therefore
dGY ( y ) 1
gY ( y ) = = for 0  y  1
dy 2 y

Note: In general
P  a  X  b = F ( b ) − F ( a )
GY ( y) = P − y  X  + y  = FX ( y ) − F (− y ) X

dG ( y ) d 
gY ( y ) = Y
dy
=
dy 
FX ( y ) − F ( − y ) = f ( y ) 2 1 y + f ( − y ) 2 1 y
X X X

=
1 
2 y
fX ( y ) + f ( − y ) = 2 1 y  12 + 12 
X

1
= for 0  y  1
2 y

RABA 4

You might also like