0% found this document useful (0 votes)
16 views58 pages

Continuous Random Variables

Continuous Random Variables

Uploaded by

pmaldio866
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views58 pages

Continuous Random Variables

Continuous Random Variables

Uploaded by

pmaldio866
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

Chapter 5 part 2

Continuous Random Variables

EEE 214

Chapter 5 part 2 EEE 214 1 / 28


Outline

1 Exponential distribution

2 Normal distribution

3 Distribution of a function of a continuous random variable

Chapter 5 part 2 EEE 214 2 / 28


Exponential distribution

Outline

1 Exponential distribution

2 Normal distribution

3 Distribution of a function of a continuous random variable

Chapter 5 part 2 EEE 214 3 / 28


Exponential distribution

Exponential distribution
Definition
A continuous random variable X has a Exponential distribution
distribution with λ > 0 if its pdf is
(
λe−λx if x ≥ 0,
f (x) =
0 if x < 0.

X ∼ Exp(λ)

Chapter 5 part 2 EEE 214 4 / 28


Exponential distribution

Exponential distribution
Definition
A continuous random variable X has a Exponential distribution
distribution with λ > 0 if its pdf is
(
λe−λx if x ≥ 0,
f (x) =
0 if x < 0.

X ∼ Exp(λ)
F (x) = 1 − e−λx if x ≥ 0 and 0 elsewhere.
1
E(X) = λ
V ar(X) = 1/λ2

Chapter 5 part 2 EEE 214 4 / 28


Exponential distribution

PDF plot
Exponential Distribution with Varying Rate

lambda = 0.5

3.0
lambda = 1
lambda = 2
2.5
2.0 lambda = 3
Density

1.5
1.0
0.5
0.0

0 2 4 6 8 10

Chapter 5 part 2 EEE 214 5 / 28


Exponential distribution

Example
Suppose that the length of a phone call in minutes is an exponential random
variable with parameter λ = 1/10. If someone arrives immediately ahead of
you at a public telephone booth, find the probability that you will have to
wait
(a) more than 10 minutes;
(b) between 10 and 20 minutes.

Chapter 5 part 2 EEE 214 6 / 28


Exponential distribution

Example
Let X be an exponentially distributed random variable with λ = 2. Find
the value of c for which P (X > c) = .25.

Chapter 5 part 2 EEE 214 7 / 28


Normal distribution

Outline

1 Exponential distribution

2 Normal distribution

3 Distribution of a function of a continuous random variable

Chapter 5 part 2 EEE 214 8 / 28


Normal distribution

Normal Distribution
Definition
A continuous random variable X has a Normal distribution distribution
with mean µ and variance σ 2 if its pdf is

1 (x−µ)2
X ∼ N(µ, σ 2 ) ⇐⇒ f (x) = √ e− 2σ 2 , where x ∈ R
2πσ 2

Chapter 5 part 2 EEE 214 9 / 28


Normal distribution

Normal Distribution
Definition
A continuous random variable X has a Normal distribution distribution
with mean µ and variance σ 2 if its pdf is

1 (x−µ)2
X ∼ N(µ, σ 2 ) ⇐⇒ f (x) = √ e− 2σ 2 , where x ∈ R
2πσ 2
Pdf: unimodal and symmetric, bell shaped continuous random variable

Chapter 5 part 2 EEE 214 9 / 28


Normal distribution

The normal pdf is well-defined


Z ∞ (x−µ)2
1
√ e− 2σ2 dx = 1
−∞ 2πσ 2

Use the fact that normal pdf is well define, calculate the integral
Z ∞
(x−1)2
e− 10 dx =?
−∞

Chapter 5 part 2 EEE 214 10 / 28


Normal distribution

The normal pdf is well-defined


Z ∞ (x−µ)2
1
√ e− 2σ2 dx = 1
−∞ 2πσ 2

Use the fact that normal pdf is well define, calculate the integral
Z ∞
(x−1)2
e− 10 dx =?
−∞

Suppose we have a random variable X ∼ N(µ = 1, σ 2 = 5), then


Z ∞ Z ∞
1 (x−µ)2 1 (x−1)2

1= √ e 2σ dx =
2 √ e− 10 dx
−∞ 2πσ 2 −∞ 2π · 5

Chapter 5 part 2 EEE 214 10 / 28


Normal distribution

The normal pdf is well-defined


Z ∞ (x−µ)2
1
√ e− 2σ2 dx = 1
−∞ 2πσ 2

Use the fact that normal pdf is well define, calculate the integral
Z ∞
(x−1)2
e− 10 dx =?
−∞

Suppose we have a random variable X ∼ N(µ = 1, σ 2 = 5), then


Z ∞ Z ∞
1 (x−µ)2 1 (x−1)2

1= √ e 2σ dx =
2 √ e− 10 dx
−∞ 2πσ 2 −∞ 2π · 5
Z ∞ (x−1)2 √
=⇒ e− 10 dx = 10π
−∞

Chapter 5 part 2 EEE 214 10 / 28


Normal distribution

Mean and variance of Normal random variable


If X ∼ N(µ, σ 2 ), and Z = X−µσ , then Z has a standard normal
distribution (more later in Chapter 5.7).

Z ∼ N(0, 1)

Chapter 5 part 2 EEE 214 11 / 28


Normal distribution

Mean and variance of Normal random variable


If X ∼ N(µ, σ 2 ), and Z = X−µσ , then Z has a standard normal
distribution (more later in Chapter 5.7).

Z ∼ N(0, 1)

E[X] = µ

Chapter 5 part 2 EEE 214 11 / 28


Normal distribution

Mean and variance of Normal random variable


If X ∼ N(µ, σ 2 ), and Z = X−µσ , then Z has a standard normal
distribution (more later in Chapter 5.7).

Z ∼ N(0, 1)

E[X] = µ
Since X ∼ N(µ, σ 2 ) ⇐⇒ X = σZ + µ and Z ∼ N(0, 1), it’s suffice to
show the mean and variance of standard normal are 0 and 1.

Chapter 5 part 2 EEE 214 11 / 28


Normal distribution

Mean and variance of Normal random variable


If X ∼ N(µ, σ 2 ), and Z = X−µσ , then Z has a standard normal
distribution (more later in Chapter 5.7).

Z ∼ N(0, 1)

E[X] = µ
Since X ∼ N(µ, σ 2 ) ⇐⇒ X = σZ + µ and Z ∼ N(0, 1), it’s suffice to
show the mean and variance of standard normal are 0 and 1.
Z ∞ ∞ Z
1 x2
E[Z] = xfZ (x)dx = x √ e− 2 dx
−∞ −∞ 2π
Z ∞ 2
1 x
= √ x e− 2 dx
2π −∞

1 x2
= −√ e− 2 =0
2π −∞

Chapter 5 part 2 EEE 214 11 / 28


Normal distribution

Mean and variance of Normal random variable


If X ∼ N(µ, σ 2 ), and Z = X−µσ , then Z has a standard normal
distribution (more later in Chapter 5.7).
Z ∼ N(0, 1)
V ar(X) = σ 2
Since X ∼ N(µ, σ 2 ) ⇐⇒ X = σZ + µ and Z ∼ N(0, 1), it’s suffice to
show the mean and variance of standard normal are 0 and 1.

Chapter 5 part 2 EEE 214 12 / 28


Normal distribution

Mean and variance of Normal random variable


If X ∼ N(µ, σ 2 ), and Z = X−µσ , then Z has a standard normal
distribution (more later in Chapter 5.7).
Z ∼ N(0, 1)
V ar(X) = σ 2
Since X ∼ N(µ, σ 2 ) ⇐⇒ X = σZ + µ and Z ∼ N(0, 1), it’s suffice to
show the mean and variance of standard normal are 0 and 1.
Z ∞ Z∞
1 x2
2 2
V ar[Z] = E[Z ] − (E[Z]) = E[Z ] = 2 2
x fZ (x)dx = x2 √ e− 2 dx
−∞ −∞ 2π
Z ∞ 2
1 x 2
= √ x2 e− 2 dx (integration by parts : u = x, dv = xe−x /2 dx)
2π −∞
( )
2 ∞
Z ∞ 2
1 − x2 − x2
= √ − xe + e dx
2π −∞ −∞
Z ∞
1 x2
= √ e− 2 dx = 1
−∞ 2π
Chapter 5 part 2 EEE 214 12 / 28
Normal distribution

68-95-99.7 Rule
A random variable X has a normal distribution,
▶ about 68% probability X falls within 1 SD of the mean,
▶ about 95% probability X falls within 2 SD of the mean,
▶ about 99.7% probability X falls within 3 SD of the mean.
The probability of X falls 4, 5, or more standard deviations away from
the mean is very low.

68%

95%

99.7%

µ − 3σ µ − 2σ µ−σ µ µ+σ µ + 2σ µ + 3σ

Chapter 5 part 2 EEE 214 13 / 28


Normal distribution

Normal probability calculation


We denote ϕ(x) and Φ(x) as pdf and cdf of the standard normal
distribution respectively.

Chapter 5 part 2 EEE 214 14 / 28


Normal distribution

Normal probability calculation


We denote ϕ(x) and Φ(x) as pdf and cdf of the standard normal
distribution respectively.
Probability calculations for X in terms of Z:
 
a−µ b−µ
P (a < X < b) = P <Z<
σ σ
   
b−µ a−µ
=Φ −Φ
σ σ

Chapter 5 part 2 EEE 214 14 / 28


Normal distribution

Example
If X is a normal random variable with parameters µ = 3 and σ 2 = 9, find
(a) P (2 < X < 5); (b) P (X > 0); (c) P (|X − 3| > 6).

Chapter 5 part 2 EEE 214 15 / 28


Normal distribution

Example
Suppose that X is a normally distributed random variable with mean µ and
variance σ 2 . If P (X < 10) = 0.67 and P (X < 20) = 0.975, approximate
µ and σ 2 .

Chapter 5 part 2 EEE 214 16 / 28


Normal distribution

At Heinz ketchup factory the amounts which go into bottles of ketchup


are supposed to be normally distributed with mean 36 oz. and standard
deviation 0.11 oz. Once every 30 minutes a bottle is selected from the
production line, and its contents are noted precisely. If the amount of
ketchup in the bottle is below 35.8 oz. or above 36.2 oz., then the bottle
will fails the quality control inspection. What’s the probability that the
amount of ketchup in a randomly selected bottle is less than 35.8 ounces?

Chapter 5 part 2 EEE 214 17 / 28


Normal distribution

At Heinz ketchup factory the amounts which go into bottles of ketchup


are supposed to be normally distributed with mean 36 oz. and standard
deviation 0.11 oz. Once every 30 minutes a bottle is selected from the
production line, and its contents are noted precisely. If the amount of
ketchup in the bottle is below 35.8 oz. or above 36.2 oz., then the bottle
will fails the quality control inspection. What’s the probability that the
amount of ketchup in a randomly selected bottle is less than 35.8 ounces?

Let X = amount of ketchup in a bottle: X ∼ N (36, 0.112 )

Chapter 5 part 2 EEE 214 17 / 28


Normal distribution

At Heinz ketchup factory the amounts which go into bottles of ketchup


are supposed to be normally distributed with mean 36 oz. and standard
deviation 0.11 oz. Once every 30 minutes a bottle is selected from the
production line, and its contents are noted precisely. If the amount of
ketchup in the bottle is below 35.8 oz. or above 36.2 oz., then the bottle
will fails the quality control inspection. What’s the probability that the
amount of ketchup in a randomly selected bottle is less than 35.8 ounces?

Let X = amount of ketchup in a bottle: X ∼ N (36, 0.112 )

35.8 36
Chapter 5 part 2 EEE 214 17 / 28
Normal distribution

x−µ 35.8 − 36
z= = = −1.82
σ 0.11

P (X < 35.8) = P (Z < −1.82) = 0.0344

Chapter 5 part 2 EEE 214 18 / 28


Normal distribution

Normal approximation to the Binomial distribution


pmf: Bin(4, 1/6)

0.3
0.0

0 1 2 3 4

pmf: Bin(20, 1/6)


0.15
0.00

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

pmf: Bin(4, 1/2)


0.25
0.00

0 1 2 3 4

pmf: Bin(20, 1/2)


0.00 0.10

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Chapter 5 part 2 EEE 214 19 / 28


Normal distribution

Normal approximation to the Binomial distribution


Let X ∼ Bin(n, p). When n is large enough, or more specifically,
np(1 − p) ≥ 10, the binomial distribution can be approximated by the
normal distribution

P (X = i) ≈ P (i − 0.5 < Y < i + 0.5), Y ∼ N(µ, σ 2 )

with parameters µ = np and σ 2 = np(1 − p).

Chapter 5 part 2 EEE 214 20 / 28


Normal distribution

Normal approximation to the Binomial distribution


Let X ∼ Bin(n, p). When n is large enough, or more specifically,
np(1 − p) ≥ 10, the binomial distribution can be approximated by the
normal distribution

P (X = i) ≈ P (i − 0.5 < Y < i + 0.5), Y ∼ N(µ, σ 2 )

with parameters µ = np and σ 2 = np(1 − p).


Probability calculation (actually, approximation)

P (a ≤ X ≤ b) ≈ P (a − 0.5 < Y < b + 0.5)


!
a − 0.5 − np Y −µ b + 0.5 − np
=P p < < p
np(1 − p) σ np(1 − p)
! !
b + 0.5 − np a − 0.5 − np
=Φ p −Φ p
np(1 − p) np(1 − p)

Chapter 5 part 2 EEE 214 20 / 28


Normal distribution

The ideal size of a first-year class at a particular college is 150 students.


The college, knowing from past experience that, on the average, only 30
percent of those accepted for admission will actually attend, uses a policy
of approving the applications of 450 students. Compute the probability that
more than 150 first-year students attend this college.

Chapter 5 part 2 EEE 214 21 / 28


Normal distribution

The ideal size of a first-year class at a particular college is 150 students.


The college, knowing from past experience that, on the average, only 30
percent of those accepted for admission will actually attend, uses a policy
of approving the applications of 450 students. Compute the probability that
more than 150 first-year students attend this college.

We are given that X ∼ Bin(n = 450, p = 0.3), and we are asked for
the probability

P (X > 150) = p(151) + · · · + p(450) = 1 − p(0) − p(1) − · · · − p(151)

Chapter 5 part 2 EEE 214 21 / 28


Normal distribution

The ideal size of a first-year class at a particular college is 150 students.


The college, knowing from past experience that, on the average, only 30
percent of those accepted for admission will actually attend, uses a policy
of approving the applications of 450 students. Compute the probability that
more than 150 first-year students attend this college.

We are given that X ∼ Bin(n = 450, p = 0.3), and we are asked for
the probability

P (X > 150) = p(151) + · · · + p(450) = 1 − p(0) − p(1) − · · · − p(151)

To use normal approximation, first check conditions

np(1 − p) = 450 × 0.3 × 0.7 = 94.5 ≥ 10

Chapter 5 part 2 EEE 214 21 / 28


Normal distribution

Use Normal approximation with continuity correction,

P (X > 150) ≈ P (X > 150 + 0.5)


!
150.5 − 450(0.3)
=P Z> p
450(0.3)(0.7)
= P (Z > 1.59)
= 1 − 0.9441 = 0.0559

Chapter 5 part 2 EEE 214 22 / 28


Normal distribution

Recap: Normal distribution X ∼ N(µ, σ 2 )


Mean µ, variance σ 2
Symmetry
f (µ − x) = f (µ + x), F (µ − x) = 1 − F (µ + x)

Chapter 5 part 2 EEE 214 23 / 28


Normal distribution

Recap: Normal distribution X ∼ N(µ, σ 2 )


Mean µ, variance σ 2
Symmetry
f (µ − x) = f (µ + x), F (µ − x) = 1 − F (µ + x)
Standard normal distribution µ = 0, σ 2 = 1.
X −µ
X ∼ N(µ, σ 2 ) ⇐⇒ Z = ∼ N(0, 1)
σ
Find probability using Φ(·) table
   
b−µ a−µ
P (a < X < b) = Φ −Φ
σ σ

Chapter 5 part 2 EEE 214 23 / 28


Normal distribution

Recap: Normal distribution X ∼ N(µ, σ 2 )


Mean µ, variance σ 2
Symmetry
f (µ − x) = f (µ + x), F (µ − x) = 1 − F (µ + x)
Standard normal distribution µ = 0, σ 2 = 1.
X −µ
X ∼ N(µ, σ 2 ) ⇐⇒ Z = ∼ N(0, 1)
σ
Find probability using Φ(·) table
   
b−µ a−µ
P (a < X < b) = Φ −Φ
σ σ
Normal approximation to Binomial X ∼ Bin(n, p)
Y ∼ N(µ = np, σ 2 = np(1 − p))

P (X = i) ≈ P (i − 0.5 < Y < i + 0.5)


Chapter 5 part 2 EEE 214 23 / 28
Normal distribution

Review: continuous distributions


Name Range pdf f (x) mean variance
1 α+β (β−α)2
Unif(α, β) [α, β] β−α 2 12

2
1 (x−µ)
N(µ, σ 2 ) (−∞, ∞) √ 1 e− 2 σ2 µ σ2
2πσ 2

Chapter 5 part 2 EEE 214 24 / 28


Distribution of a function of a continuous random variable

Outline

1 Exponential distribution

2 Normal distribution

3 Distribution of a function of a continuous random variable

Chapter 5 part 2 EEE 214 25 / 28


Distribution of a function of a continuous random variable

A (important!) theorem on finding pdf of g(X)


Suppose X is a continuous random variable with pdf fX (x). If a function
g(x) is
1 monotonic (increasing or decreasing), and
2 differentiable (and thus continuous),

Chapter 5 part 2 EEE 214 26 / 28


Distribution of a function of a continuous random variable

A (important!) theorem on finding pdf of g(X)


Suppose X is a continuous random variable with pdf fX (x). If a function
g(x) is
1 monotonic (increasing or decreasing), and
2 differentiable (and thus continuous),
then the random variable defined by Y = g(X) has pdf

dx
fY (y) = fX (x)
dy

Chapter 5 part 2 EEE 214 26 / 28


Distribution of a function of a continuous random variable

A (important!) theorem on finding pdf of g(X)


Suppose X is a continuous random variable with pdf fX (x). If a function
g(x) is
1 monotonic (increasing or decreasing), and
2 differentiable (and thus continuous),
then the random variable defined by Y = g(X) has pdf

dx
fY (y) = fX (x)
dy

Or more rigorously,
( 
fX g −1 (y) · d −1

dy g (y) if y = g(x) for some x
fY (y) =
0 if y ̸= g(x) for all x

Chapter 5 part 2 EEE 214 26 / 28


Distribution of a function of a continuous random variable

Example: let X ∼ Unif(0, 1), what distribution does Y = − ln(X) have?


7
6
5
4
-ln(x)

3
2
1
0

0.0 0.2 0.4 0.6 0.8 1.0

Chapter 5 part 2 EEE 214 27 / 28


Distribution of a function of a continuous random variable

Example: let X ∼ Unif(0, 1), what distribution does Y = − ln(X) have?

In order to use the previous theorem, need to check


the function g(x) = − ln(x)
1 monotonic
7

2 differentiable
6
5
4
-ln(x)

3
2
1
0

0.0 0.2 0.4 0.6 0.8 1.0

Chapter 5 part 2 EEE 214 27 / 28


Distribution of a function of a continuous random variable

Example: let X ∼ Unif(0, 1), what distribution does Y = − ln(X) have?

In order to use the previous theorem, need to check


the function g(x) = − ln(x)
1 monotonic ✓
7

2 differentiable
6
5
4
-ln(x)

3
2
1
0

0.0 0.2 0.4 0.6 0.8 1.0

Chapter 5 part 2 EEE 214 27 / 28


Distribution of a function of a continuous random variable

Example: let X ∼ Unif(0, 1), what distribution does Y = − ln(X) have?

In order to use the previous theorem, need to check


the function g(x) = − ln(x)
1 monotonic ✓
7

2 differentiable ✓
6
5
4
-ln(x)

3
2
1
0

0.0 0.2 0.4 0.6 0.8 1.0

Chapter 5 part 2 EEE 214 27 / 28


Distribution of a function of a continuous random variable

Example: let X ∼ Unif(0, 1), what distribution does Y = − ln(X) have?

In order to use the previous theorem, need to check


the function g(x) = − ln(x)
1 monotonic ✓
7

2 differentiable ✓
6

Inverse function g −1 (y):


5

y = − ln(x) ⇐⇒ x = e−y
4
-ln(x)

3
2
1
0

0.0 0.2 0.4 0.6 0.8 1.0

Chapter 5 part 2 EEE 214 27 / 28


Distribution of a function of a continuous random variable

Example: let X ∼ Unif(0, 1), what distribution does Y = − ln(X) have?

In order to use the previous theorem, need to check


the function g(x) = − ln(x)
1 monotonic ✓
7

2 differentiable ✓
6

Inverse function g −1 (y):


5

y = − ln(x) ⇐⇒ x = e−y
4
-ln(x)

dx
= −e−y
3

dy
2
1
0

0.0 0.2 0.4 0.6 0.8 1.0

Chapter 5 part 2 EEE 214 27 / 28


Distribution of a function of a continuous random variable

Example: let X ∼ Unif(0, 1), what distribution does Y = − ln(X) have?

In order to use the previous theorem, need to check


the function g(x) = − ln(x)
1 monotonic ✓
7

2 differentiable ✓
6

Inverse function g −1 (y):


5

y = − ln(x) ⇐⇒ x = e−y
4
-ln(x)

dx
= −e−y
3

dy
2

Range of Y : y ∈ [0, ∞).


1

dx
fY (y) = fX (x) = 1 · −e−y = e−y
0

dy
0.0 0.2 0.4 0.6 0.8 1.0

Chapter 5 part 2 EEE 214 27 / 28


Distribution of a function of a continuous random variable

Example: let X ∼ Unif(0, 1), what distribution does Y = − ln(X) have?

In order to use the previous theorem, need to check


the function g(x) = − ln(x)
1 monotonic ✓
7

2 differentiable ✓
6

Inverse function g −1 (y):


5

y = − ln(x) ⇐⇒ x = e−y
4
-ln(x)

dx
= −e−y
3

dy
2

Range of Y : y ∈ [0, ∞).


1

dx
fY (y) = fX (x) = 1 · −e−y = e−y
0

dy
0.0 0.2 0.4 0.6 0.8 1.0

x Therefor, Y has an exponential distribution,


Y ∼ Exp(1)
Chapter 5 part 2 EEE 214 27 / 28
Distribution of a function of a continuous random variable

Let X have pdf fX (x), where −∞ < x < ∞. We want to find the pdf for
Y = |X|. Can we use the formula fY (y) = fX (x) dx
dy ?

(a) Yes
(b) No

Chapter 5 part 2 EEE 214 28 / 28


Distribution of a function of a continuous random variable

Let X have pdf fX (x), where −∞ < x < ∞. We want to find the pdf for
Y = |X|. Can we use the formula fY (y) = fX (x) dx
dy ?

(a) Yes
(b) No

Chapter 5 part 2 EEE 214 28 / 28


Distribution of a function of a continuous random variable

Let X have pdf fX (x), where −∞ < x < ∞. We want to find the pdf for
Y = |X|. Can we use the formula fY (y) = fX (x) dx
dy ?

(a) Yes
(b) No g(x) = |x| is not monotonic; also not differentiable at 0.
0.8
|x|

0.4
0.0

-1.0 -0.5 0.0 0.5 1.0

Chapter 5 part 2 EEE 214 28 / 28


Distribution of a function of a continuous random variable

Let X have pdf fX (x), where −∞ < x < ∞. We want to find the pdf for
Y = |X|. Can we use the formula fY (y) = fX (x) dx
dy ?

(a) Yes
(b) No g(x) = |x| is not monotonic; also not differentiable at 0.
First find cdf FY (y), then find fY (y).
0.8
|x|

0.4
0.0

-1.0 -0.5 0.0 0.5 1.0

Chapter 5 part 2 EEE 214 28 / 28


Distribution of a function of a continuous random variable

Let X have pdf fX (x), where −∞ < x < ∞. We want to find the pdf for
Y = |X|. Can we use the formula fY (y) = fX (x) dx
dy ?

(a) Yes
(b) No g(x) = |x| is not monotonic; also not differentiable at 0.
First find cdf FY (y), then find fY (y).
For any y ≥ 0,

FY (y) = P (Y < y)
= P (|X| < y)
0.8

= P (−y < X < y)


|x|

0.4

= FX (y) − FX (−y)
0.0

-1.0 -0.5 0.0 0.5 1.0

Chapter 5 part 2 EEE 214 28 / 28


Distribution of a function of a continuous random variable

Let X have pdf fX (x), where −∞ < x < ∞. We want to find the pdf for
Y = |X|. Can we use the formula fY (y) = fX (x) dx
dy ?

(a) Yes
(b) No g(x) = |x| is not monotonic; also not differentiable at 0.
First find cdf FY (y), then find fY (y).
For any y ≥ 0,

FY (y) = P (Y < y)
= P (|X| < y)
0.8

= P (−y < X < y)


|x|

0.4

= FX (y) − FX (−y)
0.0

-1.0 -0.5 0.0 0.5 1.0 d


fY (y) = [FX (y) − FX (−y)]
x dy
= fX (y) + fX (−y)

Chapter 5 part 2 EEE 214 28 / 28

You might also like