The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 7. Functions of Random Variables Sections 7.2 -- 7.4: Functions of Discrete Random Variables, Method of Distribution Functions and Method of Transformations in One Dimension Jiaping Wang Department of Mathematical Science 04/10/2013, Wednesday
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Chapter 7. Functions of Random Variables
Sections 7.2 -- 7.4: Functions of Discrete Random Variables, Method of Distribution Functions and Method of Transformations in One Dimension
Jiaping Wang
Department of Mathematical Science
04/10/2013, Wednesday
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Outline Functions of Discrete Random Variables Methods of Distribution Functions Method of Transformations in One Dimension More Examples Homework #10
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Part 1. Functions of Discrete Random Variables
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Introduction
For example, there is a sample X1, X2, β¦, Xn from same distribution, also there is a function denoted by Y=f(X1, X2, β¦, Xn)=1/nβXi, which is a function of random variables {X1, X2, β¦, Xn}. Considering the discrete random variables, for example, X is a discrete random variables with space S={0, 1, 2, 3}, C is a function of X with C=150+50X, then we can have a mass probability table x 0 1 2 3
p(x) 0.5 0.3 0.15 0.05
c 150 200 250 300
p(c) 0.5 0.3 0.15 0.05
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Cont.
Considering X is a discrete random variables with space S={-1, 0, 1}, define Y=X2, then we can have a mass probability table as follows
x -1 0 1
p(x) 0.25 0.5 0.25
y 1 0 1
p(y) 0.25 0.5 0.25
y 0 1
p(y) 0.5 0.5
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Example 7.1
A quality control manager samples from a lot of items, testing each item until r defectives have been found. Find the distribution of Y, the number of items that are tested to obtain r defectives.
Answer: Assume that the probability p of obtaining a defective item is constant from trial To trial, the number of good items X sampled prior to the r-th defective one is a negative Binomial random variable. The mass function is π π = π₯ = π π₯ = π₯+πβ1
πβ1 ππππ₯, π₯ = 0, 1, 2, β¦ The number of trials, Y, is equal to the sum of the number of good items and defective Ones, that is, Y=X+r thus X=Y-r, with Y=r, r+1, r+2, β¦ so the mass function for Y is π π = π¦ = π π¦ = π¦β1
If X has a probability density function ππΏ(π), and Y is a function of X, we are interested in finding ππ(π) = π·(π β€π) or the density ππ(π) by using the distribution of X. For example, π = πΏπ with density ππΏ(π). For yβ₯0, ππ π = π· π β€ π = π· πΏπ β€ π = π· β π β€ πΏ β€ π = π· πΏ β€ π β π π β€ β π = ππΏ π β ππΏ β π . Then we can have the density function for Y: ππ π = π
π πππ π = π
π πππΏ π β π
π πππΏ β π
=π
π πππΏ π +
ππ π
ππΏ β π
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Application in Normal Distribution
X is standard normal random variable, what is the probability density function of Y=X2? We know ππ π₯ = 1
2πexp βπ₯2
2,ββ < π₯ < β, thus for yβ₯0,
ππ π¦ = 1
2 π¦[ 12π
exp β ( π¦)2
2+ 1
2πexp β (β π¦)2
2] = 1
2 πy β 1
2 exp(βy2)
Recall that Ξ 1
2= π, we can see Y follows a gamma distribution with
Summary of the Distribution Function Method Let Y be a function of the continuous random variables X1, X2, β¦, Xn. Then 1. Find the region Y=y in the (X1, X2, β¦, Xn) space. 2. Find the region Yβ€y. 3. Find πΉπ(π¦) = π(π β€ π¦) by integrating π(π1,π2, β¦ ,ππ) over the region Yβ€y. 4. Find the density function fY(y) by differentiating FY(y). That is,
ππ π¦ = πππ¦πΉπ π¦ .
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Part 3. Method of Transformation in One Dimension
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Introduction
The transformation method for finding the probability distribution of a function of a random variable is simply a generalization of the distribution function method. Consider a random variable X with the distribution function FX(x). Suppose that Y is a function of X, say, Y=g(X) which is an increasing function with the inverse X=g-1(Y)=h(Y). Then We have πΉπ π¦ = π π β€ π¦ = π π π β€ π¦ = π π β€ π π¦ = πΉπ[π π¦ ] Then the density function is ππ π¦ = π
Let π = π(π) with inverse function π = π(π) such that h is a one-to-one, continuous function from π΅ = (πΌ,π½) onto A. If πβ(π¦) exists and πβ(π¦) β 0 for all y β π΅. Then π = π(π) determines a new random variable with density
Answer: Here π = π(π) = β2π + 5 the inverse function π = π π = 5βπ2
where h is a continuous and one-to-one function from B=(3,5) onto A=(0,1). So πβ(π¦) = β1/2 for any y β π΅ . Then we can have ππ π¦ = ππ π π¦ πβ² π¦ = 2 5βπ¦
2β 12
= 5βπ¦2
, 3 < π¦ < 5.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Summary
Summary of the Univariate Transformation Method Let Y be the function of the continuous random variables X, Y=g(X). Then 1. Write the probability density function of X. 2. Find the inverse function h such that X=h(Y). Verify that h is a continuous
one-to-tone function from B=(Ξ±, Ξ²) onto A=(a, b) where for π₯ β π΄, π π₯ >0.
3. Verify πππ¦π π¦ = πβ²(π¦) exists, and is not zero for any π¦ β π΅.
Let X be a random variable having a continuous c.d.f., F(x). Let Y=F(X). Show that Y has a uniform distribution on (0,1). Conversely, if U has a uniform distribution on (0,1), show that X = F-1(U) has the c.d.f, F(x).
Answer: F(X) is non-decreasing and has domain 0<F(X)<1, that is, 0<Y<1. Suppose F(x) has inverse function, ie., y=F(x)x=F-1(y). Then FY(y)=P(Y β€ y)=P[F(X) β€ y]=P[X β€F-1(y)]=F(F-1(y))=y fY(y)=1, for 0<y<1. FX(x)=P(X β€x)=P(F-1(U) β€x)=P(U β€F(x))=F(x).
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Additional Example 2
Show that if U is uniform on (0,1), then X=-log(U) has an exponential distribution Exp(1).
Answer: The density function for U is fU(u)=1. X=-log(U) U=exp(-X), so h(x)=e-x, which is continuous and one-to-one function with B=(0, β) as A=(0, 1). The derivative of h(x) is hβ(x)=-e-x which is not zero in the domain. So we can have fX(x) =fU[h(x)]|hβ(x)|=(1)(|-e-x|)=e-x.