Download as pdf or txt
Download as pdf or txt
You are on page 1of 34

CHAPTER 4

FUNCTIONS OF RANDOM
VARIABLES

SQQS1043 PROBABILITY & STATISTICS


Introduction

◉ A random variable is a rule that assigns a


numeric value to every possible outcome in a
sample space.
◉ Random variables may be discrete or
continuous in nature.
◉ In order to give probabilities to a collection of
probable values, a random variable must be
measured as a function.
Function of Random Variable

◉ When working with random variables, it is common to


consider their functions.
◉ This part concern with finding probability distributions of
functions of one or more random variable.
◉ That is; given a set of random variables 𝑋1 , 𝑋2 ,…, 𝑋𝑛 and
their joint probability distribution, we shall be interested in
finding the probability distribution of some random variable
𝑌 = 𝑢 𝑋1 , 𝑋2 , …, 𝑋𝑛
Function of Random Variable

◉ Which means: the value of Y are related to those of the 𝑋 ′ 𝑠 by the


equation
𝑦 = 𝑢 𝑥1 , 𝑥2 , …, 𝑥𝑛

◉ Methods available for solving this problems are:


○ Transformation technique
○ Distribution function technique
○ Moment generating function technique
4
Transformation Technique
◉ Also known as change-of-variable technique.
◉ In mathematics, a change-of-variables is a basic technique
used to simplify problems in which the original variables are
replaced with functions of other variables.
◉ The intent is that when expressed in new variables, the
problem may become simpler, or equivalent to a better
understood problem.
◉ Change of variables is an operation that is related to
substitution. 5
Transformation Technique:
Discrete case
◉ In discrete case, there is no real problem as long as the relationship
between the values of X and Y=u(x) is a one-to-one
◉ All we have to do is just make an appropriate substitution
Theorem 4.1:
Let X be a discrete random variable with probability distribution function
𝑓 𝑥 and let 𝑌 = 𝑢 𝑋 define a one-to-one transformation. 𝑦 = 𝑢 𝑥 can
be solved uniquely, 𝑥 = 𝑤 𝑦 . Then the probability distribution function of
Y is
𝑔 𝑦 =𝑓 𝑤 𝑦
6
Example 4.1

1
If X has the binomial distribution with n = 3 and 𝑝 = , find the
3
𝑋
probability distributions of 𝑌 = .
1+𝑋

7
Solution 4.1:

8
Transformation Technique:
Continuous Case
◉ When performing a transformation of variables in continuous cases,
certain assumptions and conditions need to be met
○ Assumption 1: Differentiability
■ we shall assume that the function given by 𝑦=𝑢(𝑥) is
differentiable and either increasing or decreasing for all values
within the range of X for which 𝑓(𝑥)≠0, so the inverse function,
given by 𝑥=𝑤(𝑦), exists for all corresponding values of y and is
differentiable except 𝑢′ (𝑥)=0 .
■ This assumption ensures that the transformation function is
well-behaved and allows for the existence of an inverse
function. 9
Transformation Technique:
Continuous Case
○ Assumption 2: Existence and Differentiability of the Inverse
Function
■ The inverse function, given by 𝑥 = 𝑤(𝑦) , exists for all
corresponding values of y and is differentiable except 𝑢′ 𝑥 =
0.
■ This condition ensures that the inverse transformation is well-
defined and allows for the application of the inverse function
in the transformation process.

10
Transformation Technique:
Continuous Case
Theorem 4.2
Let f(x) be the value of the probability density of the continuous random
variable X at x. If the function given by 𝑦 = 𝑢(𝑥) is differentiable and either
increasing or decreasing for all values within the range of X for which 𝑓(𝑥) ≠ 0,
then, for these values of x, the equation 𝑦 = 𝑢(𝑥) can be uniquely solved for x
to give 𝑥 = 𝑤(𝑦), and for the corresponding values of y the probability density
of 𝑌 = 𝑢(𝑋) is given by

𝒈 𝒚 = 𝒇 𝒘 𝒚 . 𝒘′ (𝒚) 𝐩𝐫𝐨𝐯𝐢𝐝𝐞𝐝 𝒖′ (𝒙) ≠ 𝟎

Elsewhere, 𝑔 𝑦 = 0.
11
Example 4.2 (continuous case)

If X has the exponential distribution given by

𝑒 −𝑥 for 𝑥 > 0
𝑓 𝑥 =ቊ
0 elsewhere

find the probability density of the random variable 𝑌 =


𝑋.
12
Solution 4.2

13
Distribution Function Technique

◉ The distribution function technique is a method used to find


the pdf of random function 𝑌 = 𝑔 𝑥 .
◉ Given distribution of X, determine distribution of 𝑌 = 𝑔 𝑥 .
i. finding the cumulative distribution function:
𝐹 𝑦 =𝑃 𝑌≤𝑦
ii. Then, differentiating the cumulative distribution function 𝐹 𝑦 to
get the probability density function. That is:
𝑓 𝑦 = 𝐹′ 𝑦
14
Distribution Function Technique
◉ Let X be a random variable with probability distribution function
𝑓 𝑥 and if 𝑌 = 𝑔 𝑥 is some function of X.
◉ The probability distribution function of 𝑌 = 𝑔 𝑥 can be derived
by obtaining the distribution function of 𝑌 where

𝐹 𝑦 =𝑃 𝑌≤𝑦
=𝑃 𝑔 𝑥 ≤𝑦
= 𝑃 𝑋 ≤ 𝑔−1 𝑦

15
Distribution Function Technique
Discrete Case

Def.4.1: If X is a discrete random variable,


then
𝐹 𝑦 = 𝑃 𝑋 ≤ 𝑔−1 𝑦
And
𝑓𝑦 𝑦 = 𝑓𝑥 𝑔−1 𝑦

16
Example 4.3
If the probability function of X is given by
𝑓 𝑥 = 𝑝 1 − 𝑝 𝑥−1 for 𝑥 = 1,2, … , ∞
and 𝑌 = 3 + 2𝑋. Obtain the probability distribution function of
the random variable Y.

17
Solution 4.3

18
Solution cont’…

19
S

Distribution Function Technique


Continuous Case
◉ A straightforward method of obtaining the probability density of a function of
continuous random variables consists of first finding its distribution function and
then its probability density by differentiation.
If 𝑋1 , 𝑋2 , … , 𝑋𝑛 are continuous random variables with a given joint probability density,
the probability density of 𝑌 = 𝑢(𝑋1 , 𝑋2 , … , 𝑋𝑛 ) is obtained by first determining an
expression for the probability
𝑮 𝒚 =𝑷 𝒀≤𝒚
= 𝑷(𝒖(𝑿𝟏 , 𝑿𝟐 , … , 𝑿𝒏 ) ≤ 𝒚)

and then differentiating to get


𝒅𝑮(𝒚)
𝒈 𝒚 =
𝒅𝒚 20
Example 4.4 (Continuous)

If the probability density of X is given by


6𝑥(1 − 𝑥) for 0 < 𝑥 < 1
𝑓 𝑥 =ቊ
0 elsewhere
find the probability density of 𝑌 = 𝑋 3

21
Example 4.4 (Solution)

22
Moment Generating Function
Technique
◉ Instead of determining densities of functions of random
variables directly, through density or distribution
manipulations, it is sometimes easier to convert to and
mathematically manipulate equivalent moment generating
functions.
◉ This method is possible because each distribution is
uniquely identified by a moment generating function.

23
Moment Generating Function
Technique : Discrete Case
◉ Moment generating function technique can play an important role in
determining the probability distribution of a random variables when the
function is a linear combination of n independent random variables.

Theorem 4.3:
If 𝑋1 , 𝑋2 ,…, 𝑋𝑛 are independent random
variables and 𝑌 = 𝑋1 + 𝑋2 + …+ 𝑋𝑛 , then
𝑛

𝑀𝑌 𝑡 = ෑ 𝑀𝑋𝑖 𝑡
𝑖=1
24
Example 4.5 (Discrete Case)

If 𝑋1 and 𝑋2 are independent random variables having


binomial distribution with the respective parameters
𝑛1 and 𝑝 and 𝑛2 and 𝑝, show that 𝑌 = 𝑋1 + 𝑋2 has the
binomial distribution with parameters 𝑛1 + 𝑛2 and 𝑝
using the m.g.f technique.

25
Solution 4.5:

26
Solution 4.5 cont’…

27
Moment Generating Function
Technique: Continuous Case
◉ As discrete case, moment generating functions can play an important role in
determining the probability density of a function of random variables when the
function is a linear combination of n independent random variables.
○ The moment generating function of the sum of n
independent random variables equals the product
of their moment generating functions.
(refer to Theorem 4.3)

28
Example 4.6 (Continuous Case)

If 𝑋1 , 𝑋2 , … , 𝑋𝑛 are independent random variables


having exponential distributions with the same
parameter 𝜃, find the probability density of the
random variable 𝑌 = 𝑋1 + 𝑋2 + ⋯ + 𝑋𝑛 .

29
Solution 4.6:

30
Class Activity 4.1

1. An appliance dealer sells three different models of upright freezers having 13.5, 15.9 and 19.1
cubic feet of storage space, respectively. Let X = the amount of storage space purchased by
the next customer to buy a freezer. Suppose that X has probability distribution as following
table and Y is the price (in RM) of a freezer having capacity X cubic feet.
x 13.5 15.9 19.1
P(X = x) 0.2 0.5 0.3
a) If the price of a freezer having capacity X cubic feet is 25x – 8.5, construct the probability
distribution of Y.
a) What is the expected price paid by the next customer to buy a freezer? Interpret its value.
b) What is the standard deviation of the price paid by the next customer?

31
Class Activity 4.1
2. Find the moment generating function of the negative binomial
distribution by making use of the fact that is k independent random
variables have geometric distributions with the same parameter 𝑝, their
sum is a random variable having the negative binomial distribution with
the parameter 𝑝 and k.

3. If n independent random variables have the same gamma distribution


with the parameters 𝛼 and 𝛽, find the moment generating function of
their sum and, if possible, identify its distribution.

32
4. If the probability density of X is given by
2 1−𝑥 , 0≤𝑥 ≤1
𝑓 𝑥 =ቊ
0, elsewhere
and 𝑌 = 1 − 2𝑋, find
a) The probability density of Y.
b) The distribution function of Y.
c) Find the mean and variance of Y.
33
Class Activity 4.1

5. The continuous random variable 𝑋 has the cumulative distribution function of


1
𝐹 𝑥 =ቐ 1 − , 𝑥≥1
𝑥4
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
a) Find the cumulative distribution function 𝐺 𝑦 of the random variable 𝑌
1
where 𝑌 = 𝑥 2
b) Hence, show that the probability density function of 𝑌 is given by

𝑔 𝑦 = ቐ2𝑦, 0 < 𝑦 ≤ 1
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
34

You might also like