Distributions of Functions of Random Variables §5.1 Functions of

Distributions of Functions of Random Variables









5.1 Functions of One Random Variable
5.2 Transformations of Two Random Variables
5.3 Several Random Variables
5.4 The Moment-Generating Function Technique
5.5 Random Functions Associated With Normal Distributions
5.6 The Central Limit Theorem
5.7 Approximations for Discrete Distributions – skipped
5.8 Chebyshev’s Inequality and Convergence in Probability
5.9 Limiting Moment-Generating Functions
5-1
STAT 4344
Dr. Yingfu (Frank) Li
§5.1 Functions of One Random Variable


Let X be a random variable. Then Y = u(X) is also a random
variable that has its own distribution. The fundamental
question here is how to find the distribution of Y, given the
distribution of X and function u(X).
Distribution function technique - No tricks. Just use def of CDF


Example 5.1-1



X ~ Γ(α, θ) & Y = eX, where θ = 1 / λ
Find the pdf of Y – loggamma
Example 5.1-2


STAT 4344
F(y) = P(Y ≤ y) = P(u(X) ≤ y), a function of y and then f(y) = F'(y)
W ~ U(-π/2, π/2) & X = tan(W).
Find the pdf of X – Cauchy
5-2
Dr. Yingfu (Frank) Li
1
Functions of One Random Variable

Change-of-variable technique



Redo Examples 5.1-1 – 5.1-2
Example 5.1-3



If Y = u(X) has the inverse function X = v(Y), then g(y) = f[v(y)]|v'(y)|
Let X have the pdf f(x) = 3(1 − x)2, 0< x < 1. Say Y = (1 − X)3.
Find the pdf of Y
Using definition is the best for 1 var. – Examples 5.1-5 – 5.1-7

Example 5.1-5



Example 5.1-6



Let X have the pdf f(x) = x2/3, −1 < x < 2, and Y = X2.
Find the pdf of Y
Let X have a Poisson distribution with λ = 4, and Y = √X.
Find the pdf of Y
Example 5.1-7: X ~ B(n, p), and Y = X2
5-3
STAT 4344
Dr. Yingfu (Frank) Li
Two Theorems related to Simulation

Use U(0,1) and a CDF F(x) to generate a random variable X
having a CDF F(x)


Example 5.1-4


Use U(0, 1) to generate observations from Cauchy distribution
Random variable X having F(x), then Y = F(X) ~ U(0,1)

STAT 4344
Theorem 5.1-1: Let Y have a distribution that is U(0, 1). Let F(x) have
the properties of a distribution function of the continuous type with
F(a) = 0, F(b) = 1, and suppose that F(x) is strictly increasing on the
support a < x < b, where a and b could be -∞ and ∞, respectively. Then
the random variable X defined by X = F-1(Y) is a continuous-type
random variable with distribution function F(x)
Theorem 5.1-2: Let X have the distribution function F(x) of the
continuous type that is strictly increasing on the support a < x < b.
Then the random variable Y, defined by Y = F(X), has a distribution
that is U(0, 1)
5-4
Dr. Yingfu (Frank) Li
2
5.2 Transformations of Two Random Variables


X1 and X2 are two continuous-type random variables with
joint pdf f(x1, x2) and Y1 = u1 (X1, X2), Y2 = u2 (X1, X2). The
fundamental question is how to find the joint pdf of (Y1, Y2)
Change-of-variable technique

If Y1 = u1 (X1, X2), Y2 = u2 (X1, X2) has the single-valued inverse X1
= v1 (Y1, Y2), X2 = v2 (Y1, Y2), then the joint p. d. f. of Y1 and Y2 is
g ( y1 , y2 ) | J | f [v1 ( y1 , y2 ), v2 ( y1, y2 )], ( y1 , y2 )  S1  x1
where | J | is the determinant of


y
J  1
 x2
 y
 1
x1 
y2 

x2 
y2 
It is often the mapping of the support S of X1, X2 into S1 of Y1, Y2
which causes the biggest challenge.
Examples of 5.2-1 – 5.2-3 & 5.2-6

Double exponential and beta distributions
5-5
STAT 4344
Dr. Yingfu (Frank) Li
Examples of Transformation

Example 5.2-1



Example 5.2-2



Let X1 and X2 be independent unit exponential random variables,
and Y1 = X1 − X2, Y2 = X1 + X2.
Find the joint pdf of Y1 & Y2
Example 5.2-3


MATH 4434
Let X1,X2 have the joint pdf f(x1, x2) = 2, 0 < x1 < x2 < 1.
Consider the transformation Y1 = X1/X2, Y2 = X2.
Find the joint pdf of Y1 & Y2
Let X1 and X2 have independent gamma distributions with
parameters α, θ and β, θ, respectively. Consider Y1 = X1/(X1 + X2),
Y2 = X1 + X2
Find the joint pdf of Y1 & Y2
5-6
Dr. Yingfu (Frank) Li
3
F Distributions

Example 5.2-4 – F distribution as a ratio of χ2 distributions




The reciprocal of an F(r1, r2) distribution is also an F(r2, r1)
distribution, with the degrees of freedom switched


This property can be used to find probability & quantile
Problems related to F distributions



F(r1, r2) is defined as normalized ratio of two independent χ2
distributions χ2(r1) and χ2(r2)
Its random variable takes positive values
It has a long right tail – skew to right, not a symmetric distribution
Finding probability
Finding percentile or quantile
Example 5.2-5


W ~ F(4, 6). Find P(1/15.21 ≤ W ≤ 9.15) & P(1/6.16 ≤ W ≤ 4.53).
F0.95(4, 6) = 1/F0.05(6, 4) = 1/6.16 = 0.1623
5-7
STAT 4344
Dr. Yingfu (Frank) Li
5.3 Several Random Variables



We have discussed how to find the pdf of function of one or
two random variables and it can be complicated for two
random variables. It will be more complicated for several
random variables. However, if we add the independence
condition, the problem might be doable.
The collection of n independent and identically distributed
random variables, X1, X2, . . . , Xn, is said to be a random
sample of size n from that common distribution – population
Joint distribution of independent variables



STAT 4344
Discrete case: p.m.f. f(x1, x2, …, xn) = f1(x1) f2(x2) … fn(xn)
Continuous case: p.d.f. f(x1, x2, …, xn) = f1(x1) f2(x2) … fn(xn)
Examples 5.3-1 – 5.3-3
5-8
Dr. Yingfu (Frank) Li
4
Examples of Several Random Variables

Example 5.3-1



Example 5.3-2


Let X1 and X2 be two independent random variables resulting from
two rolls of a fair die. Let Y = X1 + X2.
Find pdf of Y and mean & variance of Y
Let X1, X2, X3 be a random sample from a distribution with pdf
f(x) = e−x, 0 < x < ∞. Find P(0 < X1 < 1, 2 < X2 < 4, 3 < X3 < 7)
Example 5.3-3

An electronic device runs until one of its three components fails. The
lifetimes (in weeks), X1, X2, X3, of these components are
independent, and each has the Weibull pdf f(x) = 2x exp{−(x/5)2}/25,
0 < x < ∞. Find the probability that the device stops running in the
first three weeks
5-9
MATH 4434
Dr. Yingfu (Frank) Li
Several Theorems Regarding Mean & Variance

THM5.3-0: Let X1, X2, . . . , Xn be n independent random variables that
have the joint p.m.f. (or p.d.f.) f1(x1) f2(x2) … fn(xn). Let the random
variable Y = u(X1, X2, . . . , Xn) have the p.m.f. (or p.d.f.) g(y). Then,
 yg ( y)  ... u( x1 , x2 ,..., xn ) f1 ( x1 ) f2 ( x2 )... fn ( xn ) or
E(Y) =
y




x2
xn
yg ( y)dy    ... n u ( x1 , x2 ,..., xn ) f1 ( x1 ) f 2 ( x2 )... f n ( xn )dx1dx2 ...dxn
R
THM5.3-1: Let X1, X2, . . . , Xn be n independent random variables and
the random variable Y = u1(X1)u2(X2) . . . un(Xn). If E[ui(Xi)], i = 1, 2,
…, n, exists, then
E(Y) = E[u1(X1)u2(X2) . . . un(Xn)] = E[u1(X1)] E[u2(X2)] … E[un(Xn)]


x1
Are E(X2) and [E(X)][E(X)] = [E(X)]2 equal because of Theorem 5.3-1 ????
THM5.3-2: Let {Xi} be n independent random variables with respective
mean μi and variance σi2 , i = 1, 2, …, n. Then the mean and variance
of Y = a1X1 + a2X2 +n … + anXn, where {ai} are realn constants, are,
respectively  Y   a i  i
and
 Y2   a 2  i2
i 1
STAT 4344
i 1
5-10
i
Dr. Yingfu (Frank) Li
5
Examples 5.3-4 – 5.3-5

Example 5.3-4



Example 5.3-5



Let the independent random variables X1 and X2 have respective
means μ1 = −4 and μ2 = 3 and variances σ21 = 4 and σ22 = 9.
Find the mean and the variance of Y = 3X1 − 2X2
Let X1, X2 be a random sample from a distribution with mean μ and
variance σ2. Let Y = X1 − X2.
Find the mean and the variance of Y
Mean and variance of a sample statistic


Let X1,X2, . . . ,Xn, be a random sample from a distribution with
mean μ and variance σ2
X 1  X 2  ...  X n
Find the mean and variance of X 
n

What about sample variance?
5-11
MATH 4434
Dr. Yingfu (Frank) Li
5.4 The Moment-Generating Function Technique

Key question: Find the distribution of Y = u(X1, …, Xn)


Another way to do it: moment-generating function technique
THM5.4-1: Let {Xi} be n independent random variables
with respective moment-generating functions Mxi(t), i = 1, 2,
3, . . . , n. Then the moment-generating
function of Y = a1X1
n
+ a2X2 + … + anXn is M (t )   M ( a t )
Y

i 1
Xi
i
COROLLARY 5.4- 1: If X1, X2, . . . , Xn are observations of
a random sample from a distribution with momentgenerating function M(t), then


the moment-generating function of Y = X1 + X2 + . . . + Xn is
MY(t) = M(t) M(t) … M(t) = [M(t)]n
the moment-generating function of X = (X1 + X2 + . . . + Xn) / n is
M X (t )  M  t / n  M  t / n   M  t / n   [ M  t / n ]n
STAT 4344
5-12
Dr. Yingfu (Frank) Li
6
Let’s See Examples

Example 5.4-1

Let X1 and X2 be independent random variables with uniform
distributions on {1, 2, 3, 4}. Let Y = X1 + X2. Find the mgf of Y.


Example 5.4-2

Let X1, X2, ..., Xn denote the outcomes of n Bernoulli trials, each with
probability of success p. Y = X1 + X2 + ... + Xn. Find the mgf of Y.



What is the mgf of Xi?
What is the distribution of Y?
Example 5.4-3

Let X1, X2, X3 be the observations of a random sample of size n = 3
from the exponential distribution having mean θ. Find the mgf of Y =
X1 + X2 + X3.


MATH 4434
Can we find the distribution of Y?
What is the mgf of Xi?
What is the distribution of Y?
5-13
Dr. Yingfu (Frank) Li
Moment-Generating Function to Distributions



STAT 4344
THEOREM 5.4-2: Let X1, X2, . . . , Xn be independent chisquare random variables with r1, r2, …, rn degrees of freedom,
respectively. Then the distribution of the random variable Y =
X1 + X2 + . . . + Xn is chi-squared distribution with r1 + r2 +
… + rn degrees of freedom χ2(r1 + r2 + … + rn)
COROLLARY 5.4-2: Let Z1, Z2, . . . , Zn have standard
normal distributions, N(0,1). If these random variables are
independent, then W, the squared sum of {Zi} has a chisquared distribution with n degrees of freedom χ2(n)
COROLLARY 5.4-3: If X1, X2, . . . , Xn are independent and
have normal distributions with mean µi and standard deviation
σi, i = 1, 2, . . . , n, respectively, then the standardized squared
sum W is chi-squared distribution with n degrees of freedom.
5-14
Dr. Yingfu (Frank) Li
7
5.5 Random Functions Associated With Normal
Distributions

THEOREM 5.5-1: If X1, X2, . . . , Xn are n mutually
independent normal variables with mean µi and standard
deviation σi, i = 1, 2, . . . , n, respectively, then the linear
function Y = c1X1 + c2X2 + … + cnXn has the normal
distribution with mean μY and standard deviation σY, where


COROLLARY 5.5-1: If X1, X2, . . . , Xn are a random
sample from N(μ, σ2), then the distribution of the sample
mean X is also a normal distribution.


Example 5.5-1
Example 5.5-2
THEOREM 5.5-2: Let X1, X2, . . . , Xn be a random sample
from N(μ, σ2). Then the sample mean X̄ and the sample
variance S2 are independent and (n – 1)S2 / σ2 is χ2(n-1)

Example 5.5-3
5-15
STAT 4344
Dr. Yingfu (Frank) Li
Let’s See Examples

Example 5.5-1

Assume X1 ~ N(693.2, 22820), X2 ~ N(631.7, 19205), and X1 and X2
be independent. Find P(X1 > X2).


Example 5.5-2


Let X1, X2, ..., Xn be a random sample from the N(50, 16) distribution.
We know that the distribution of X is N(50, 16/n). To illustrate the
effect of n, the graph of the pdf of X is given in Figure 5.5-1 at the
page 194 for n = 1, 4, 16, and 64. When n = 64, compare the areas
that represent P(49 < X < 51) and P(49 < X1 < 51).
Example 5.5-3


MATH 4434
Hint: find the distribution of Y = X1 – X2
Let X1, X2, X3, X4 be a random sample of size 4 from N(76.4, 383).
4
4
( X  76.4)2
( X  X )2
Let
U  i
,
W  i
383
383
i 1
i 1
Find probabilities P(0.711 ≤ U ≤ 7.779) & P(0.352 ≤ W ≤ 6.251).
5-16
Dr. Yingfu (Frank) Li
8
T – Distribution

THEOREM 5.5-3 (Student’s t distribution): Suppose that Z
is a random variable with N(0, 1), U is a random variable
with χ2(r) and that Z and U are independent. Then T = Z /
√(U / r) has a t distribution with p. d. f.
 [( r  1) / 2]
1
f (t ) 
,
 t  
2
( r  1) / 2
 r  ( r / 2) (1  t / r )


We say T has a T – distribution with r degrees of freedom.
An important result used often in Statistics: Let X1, X2, . . . ,
Xn be a random sample from N(μ, σ2). Then
X 
T
S/ n
has a t distribution with r = n - 1 degrees of freedom
5-17
STAT 4344
Dr. Yingfu (Frank) Li
T – Distribution

Plots of T-distributions

Example 5.5-4



MATH 4434
Let the distribution of T be t(11).
Find P(−1.796 ≤ T ≤ 1.796)
Find a such that P(−a ≤ T ≤ a) = 0.95
5-18
Dr. Yingfu (Frank) Li
9
5.6 The Central Limit Theorem

THEOREM 5.6-1 (Central Limit Theorem): If X is the mean
of a random sample X1, X2, . . . , Xn from a distribution with
a finite mean µ and a finite positive variance σ2, then the
distribution of
X 
W
 / n is N(0, 1) in the limit as n → ∞



When n >> 1, then W ≈ Z.
Find various kinds of probabilities
Special case of THM 5.6-1: if X1, X2, . . . , Xn from N(µ, σ2),
then W ≡ Z by COROLLARY 5.5-1.
5-19
STAT 4344
Dr. Yingfu (Frank) Li
Let’s See Some Examples

Example 5.6-1


Example 5.6-2




Let X denote the mean of a random sample of size 25 from the
distribution whose pdf is f(x) = x3/4, 0 < x < 2.
Find P(1.5 ≤ X ≤ 1.65)
Example 5.6-5

MATH 4434
Let X1, X2, ..., X20 denote a random sample of size 20 from the
uniform distribution U(0, 1). Let Y = X1 + X2 + ... + X20.
Find P(Y ≤ 9.1) & P(8.5 ≤ Y ≤ 11.7)
Example 5.6-3


Let X be the mean of a random sample of n = 25 currents (in
milliamperes) in a strip of wire in which each measurement has a mean
of 15 and a variance of 4. Find P(14.4 < X < 15.6)
Let X1, X2, ..., Xn denote a random sample of size n from a chi-square
distribution and Y = X1 + X2 + ... + Xn. Then W = (Y − n)/√2n ≈ Z
5-20
Dr. Yingfu (Frank) Li
10