You are on page 1of 9

Introduction to probability and Statistics (Stat 276) Department of Statistics (AAU)

CHAPTER SIX
FUNCTIONS OF RANDOM VARIABLES
4.1. Equivalent events

4.2. Functions of discrete random variables and their distributions

4.3. Functions of continuous random variables and their distributions

Introduction:

Suppose we know that the distribution of a random variable X. In addition to knowing the
distribution of the random variable X we may also be interested to know the distribution of
another random variable, say Y, which is a function of the original random variable X. That is,
given the distribution of the random variable X we want to find or determine the distribution of
the function Y=H(X). The transformation process is presented in the following diagram.

Note that Y is a real valued function of the random variable X with domain Rx and range Ry.
Moreover, the function Y itself is a random variable.

Thus, let E be an experiment, S be a sample space associated with E and X be a random variable
defined on S. Suppose that y = H(x) is a real valued function of x. then Y = H(X) is a random
variable since for every s ∈ S, a value of Y is determined, say y = H(X(s)). As before we call
Rx the range space of X, the set of all possible values of the function X. similarly we define RY
the range space of Y, the set of all possible values of the function Y.

Illustrative Example: Rx

Let X be a random variable that represents the radius of a circle. Consider another variable Y that
represents the area of a circle. Clearly, Y is a function of X, and their functional relationship is
presented as Y=X2.

Page 1 of 9
Introduction to probability and Statistics (Stat 276) Department of Statistics (AAU)

4.1. Equivalent events

Definition: Let C be an event associated with the range space of Y, RY, i.e.  . Moreover, let
 be defined as B = {x ∶ H(x)C}. Then B and C are equivalent events. Meaning, each
and every element in C is a function of a corresponding element in B.

Note that:

 The informal interpretation of the above is that B and C are equivalent events if and only
if B and C occur together. That is, when B occurs, C occurs and conversely.
 When we speak of equivalent events (in the above sense), these events are associated
with different sample space.

Example: Suppose that ( ) = . Then the events = { > 2} = { > 4 } are


equivalent. Thus, for if = , then { > 2} occurs if and only if { > 4 } occurs

Definition: Suppose X is a random variable defined on the sample space S and Rx be its range
space. Let Y=H(X) be a random variable with range space Ry where H is a real valued function.
For any event  , ( ) is defined as

P(C) = {x ∶ H(x)C}

In words: The probability of an event associated with the range space of Y is defined as the
probability of the equivalent event (in terms of X).

In other words, we can evaluate probabilities involving events associated with the function of the
random variable X if the P.d.f of X is known and if it is possible to determine the equivalent
event.

Example1: Let X represent the radii o f circles. Suppose that H(x)=2x.

B1={x>2} is equivalent to C1={y>4}

B2={x5} is equivalent to C2={y10}

Hence, P(B1)=P(C1) and P(B2)=P(C2)

e -x if x  0
Example 2: Let X be a continuous random variable with P.d.f f ( x)  
0 Otherwise

x 1
Suppose that a random variable Y is defined by Y  . If = { : 7}, find P(C).
2

Page 2 of 9
Introduction to probability and Statistics (Stat 276) Department of Statistics (AAU)

Solution:

It can be seen that RX= { : > 0} and RY= { : > 1/2}, which implies that CRY.

x 1
y7  7  x  15
2

Thus, define B as B={X: X  15} so that B and C are equivalent.



1
Hence, P(C)  P(B)   e  x dx 
15 e15

Exercise: Suppose that the length o f t ime it takes Earl to drive work everyday is a rando m
variable X (measured in hours) with distribution funct ion,

 1 1 3
8(x - ) if x
f ( x)   4 4 4
0 Otherwise

If we define a random variable Y as Y=60X, then find P(Y<45).

Remark: The other procedure for finding probabilit ies associated with Y is to find P.d.f of Y
fro m the known P.d.f of X.

Solution

3
Let E 1  {Y  45} and E 2  { X  }
4
Since E 1 and E 2 are equivalent events, we have
3
3
4 4
3 1
P(E 1 )  P ( E 2 )  P(Y  45)  P(X  )   f ( x ) dx   8( X  ) dx
4  1 4
4
3 3
X 2 X   2X 2  X 
4  2( 3 4 ) 2  3
4 2 ( 1 4 ) 2  1 
 8    8  4 4  8( 0.09375  ( 0.03125))  1
  8  
 2 4  1  4  1  4 4
4 4  

Page 3 of 9
Introduction to probability and Statistics (Stat 276) Department of Statistics (AAU)

4.2. Functions of discrete random variables and their distributions

Case I: X is a discrete random variable:

If X is discrete rando m variable and Y=H(X), then it fo llows immediately that Y is also a
discrete random variable. That is if the possible values of X are x1,x2,…,xn then the possible
values of Y are H(x1),H(x2),…,H(xn).

Definition: If x , x , … , x , …. are the possible values of X, P(x ) = P(X = x ), and H is a


function such that to each value y there corresponds exactly one value x, then the probability
distribution of Y is obtained as follows:

Possible values of Y: y = H(x ), i = 1,2, … , n, …

Probabilities of Y: q(y ) = P(Y = y ) = P(x )

Example 1: Consider the following probability distribution of a discrete random variable X

xi -1 0 1

P(x ) 1/3 1/2 1/6

Find the probability distribution of = 3 + 1.

Solution:

y -2 1 4

(y ) 1/3 1/2 1/6


Note that: It may happen that several values of X lead to the same value of Y. In other words,
the relation between X and Y may not necessarily be One-to-One, as the following examples
illustrate.

Example: Consider the above example. Moreover let Y=X2. Hence the possible value ofs of Y
are zero and one, assumed with probabilities ½ and ½. Thus, y=1 corresponds to not only one
possible value in the range space of X, but it refers to two possible values, namely x=1 and x=-1.
Accordingly, P(Y=1)=P(x=1)+P(x=-1). For y = 1 iff X =1 or X = -1 and the probabilities of this
latter event is + = 1

Definition: let , , … , , … represent the X- values having the property =


. Then (y ) = P(Y = y ) = P( ) + ( ) + ⋯ ( ) + ⋯

Example 1: Suppose the probabilit y funct ion of a discrete random variable X is

Page 4 of 9
Introduction to probability and Statistics (Stat 276) Department of Statistics (AAU)

-1 0 1 2

( = ) 7 8 4 11
30 30 30 30

Find the probabilit y funct ion of Y if

a) Y=X2 b)Y=2X+5

Solution:

a) The possible values of Y are {0,1,4} as it is shown in the table below.

x -1 0 1 2

Y=X2 (-1)2=1 02=0 12=1 22=4

P (Y  0)   P ( X  x); x : x 2  0
8
 P (Y  0)  P ( X 2  0)  P ( X  0) 
30

P (Y  1)   P ( X  x); x : x 2  1
7 4 11
 P (Y  1)  P ( X 2  1)  P ( X  1)  P ( X  1)   
30 30 30

P (Y  4)   P ( X  x); x : x 2  4
11
 P (Y  4)  P ( X 2  4)  P ( X  2) 
30

Consequent ly, the probabilit y distribut ion of Y turns out to be:

0 1 4

( ) 8 11 11
30 30 30

b) The possible values o f Y are {3,5,7,9} as it is shown in the table below.

Page 5 of 9
Introduction to probability and Statistics (Stat 276) Department of Statistics (AAU)

x -1 0 1 2

Y=2X+5 3 5 7 9

P (Y  3)   P ( X  x); x : 2 X  5  3
7
 P (Y  3)  P (2 X  5  3)  P ( X  1) 
30

P (Y  5)   P ( X  x); x : 2 X  5  5
8
 P (Y  5)  P (2 X  5  5)  P ( X  0) 
30

P (Y  7)   P ( X  x); x : 2 X  5  7
4
 P (Y  7)  P (2 X  5  7)  P ( X  1) 
30

P (Y  9)   P( X  x); x : 2 X  5  9
11
 P (Y  9)  P (2 X  5  9)  P ( X  2) 
30

Consequent ly, the probabilit y distribut ion of Y=2X+5 beco mes:

3 5 7 9

( ) 7 8 4 11
30 30 30 30

Example 2: Let X be a discrete random variable having the possible values 1, 2, 3, . . . , n, . .. and
suppose that P(X = x) = . Find the probability distribution of Y if

1
=
−1

Case II: If X is a continuous random variable.

X may assume all real values while Y is defined to be +1 if > 0 and -1 if < 0. In order to
obtain the probability distribution of Y, simply determine the equivalent event (in the range
space Rx) corresponding to the different values of Y. In the above case ( = 1) = ( > 0)
and ( = −1) = ( ≤ 0).

Page 6 of 9
Introduction to probability and Statistics (Stat 276) Department of Statistics (AAU)

In general case, if { = } is equivalent to an event, say A, in the range space of X, then

( )= ( = )= ( )

4.3. Functions of continuous random variables and their distributions

Here in this section our interest is to determine the Probability Density Function of a function of
a continuous random variable. Let X be a continuous random variable and Y be another random
variable which is a function of X. That is Y=H(X). Moreover, assume that the random variable Y
is a continuous random variable. To find or determine the P.d.f of Y=H(X), we follow the
following steps:

a) Obtain the Cumulative Distribution Function (cdf) of Y, denoted by G(y), where


( ) = ( < ) in terms of the cdf or P.d.f of X by finding an event A in Rx which is
equivalent to the event Yy.
b) Differentiate G(y) with respect to y in order to obtain g(y),which is going to be the P.d.f
of Y.
c) Determine those values of y in the range space of Y for which g(y)>0.

Example 1: Suppose that X has P.d.f given by:

x
 if 0  x  2
f ( x)   2
0 Otherwise

Let H(X)=2X+4. Find the P.d.f of Y=H(X)

Solution:
y4 y4
2
y4 2
x x 2 ( y  4) 2
Step 1: G ( y )  P(Y  y )  P(2 X  4  y )  P( X  )  dx  
2 0
2 4 0
16

d 2( y  4) ( y  4)
Step 2: g ( y )  G( y)  
dy 16 8

Step 3: f(x)>0 if 0<x<2 which implies that the range space of y=2x+4 is. Moreover,
( y  4)
g ( y)   0 if y>4 the intersection of which with the range space of Y gives 4<y<8.
8

Page 7 of 9
Introduction to probability and Statistics (Stat 276) Department of Statistics (AAU)

y - 4
 if 4  y  8
Therefore, the P.d.f of Y is found to be: g ( y )   8
0 Otherwise

1 if 0  x  1
Exercise: Let a rando m variable X has a densit y function f ( x)   . Let
0 Otherwise
H(X)=ex. Then find the P.d.f of Y=H(X).

S ol u t i on :
G ( y )  P(Y  y )  P(e x  y )  P(ln e x  ln y )
ln y

 f ( x)dx  x
ln y
 P( X  ln y )  0  ln y


1
G ( y )  ln y  G ( y )  g ( y ) 
dy; y  0
y
f(x)  0 if 0  x  1  1  y  e and y  0  1  y  e
1
 if 1  y  e
g ( y)   y
0 otherwise

Example: suppose that X has the pdf

2x, 0 < < 1


f(x) =
0 otherwise
Then find the pdf of ( )=3 +1

( ) = ( ≤ ) = (3 + 1 ≤ 1)

−1
= ≤
3

−1
= 2xdx =
3

Thus ( ) = ( ) = ( − 1)

Since ( ) > 0 0 < < 1, ℎ ( ) > 0 1 < < 4.

The other method of obtaining ( ).

−1 −1
( )= ( ≤ )= ≤ = ,
3 3

Page 8 of 9
Introduction to probability and Statistics (Stat 276) Department of Statistics (AAU)

Where F is the cdf of X; that is

( ) = ( ≤ ).

In order to calculate the derivative of G, ( ), we use the chain rule for differentiation as
follows:

( )=

−1
( )= ( ) ; ℎ =
3

Hence

1 1 −1 1 2
( )= ( )∗ = ( )∗ =2∗ ∗ = ( − 1)
3 3 3 3 9
Exercise: for the above example,

Theorem: Let X be a continuous random variable with pdf , where ( ) > 0 for < <
. suppose that = ( ) is a strictly monotone (increasing or decreasing) function of . Assume
that this function is differentiable ( and hence continuous) for all . Then the random variable Y
is defined as = ( ) has a pdf g given by,

( )= ( ( )) ∗ ( ) ℎ .

Theorem: Let X be a continuous random variable with pdf and = . Then the random
variable Y has the pdf given by:

1
( )= + − .
2

 Equivalent Events: Two event s A and B are equivalent if and only if each and every the
sample po ints in one o f the two sets is a functio n o f a corresponding
sample point in the other set.

Page 9 of 9

You might also like