ST 1010 2020 Week 1-Function of Random Variables
ST 1010 2020 Week 1-Function of Random Variables
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
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
X -1 0 1
P[X=x] 1/3 1/2 1/6
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 .
gY ( y ) = = = 1 y 4
dy dy 9 9
Note:
4
1) Show that g
1
Y ( y )dy = 1
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
=
(
−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 )
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:
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