Probability and statistics II
Chapter 3: Continuous random variables
Semester 1, 2021
Lecture 13
Motivation example
The time (in hours) a manager takes to interview a job applicant has an exponential distribution with ⁄ = 2.
The applicants are scheduled at quarter-hour intervals, beginning at 8:00 am.
The applicants arrive exactly on time.
When the applicant with an 8:15 am appointment arrives at the manager’s office, what is the probability that
he or she will have to wait before seeing the manager?
Continuous random variable
In many situations, the quantity we measure is not discrete, e.g. time until an event, yield of a crop, height of
students. How can we calculate probabilities for these cases?
Probability density function (pdf)
A continuous random variable Y has a probability density function f : Y æ [0, Œ), given by
⁄ b
f (y)dy = P (a Æ Y Æ b),
a
for some a, b œ Y .
Cumulative distribution function
Recall the definition of the cumulative probability distribution function (cdf):
F (y) = P (Y Æ y), ≠Œ < y < Œ.
Recall that for a discrete r.v., this is a step function as only a countable number of values are taken by a
discrete r.v., and so the cdf takes jumps at those values and remains flat between them.
In fact, the cdf of a discrete r.v. is a monotonic non-decreasing, right-continuous function.
Roughly speaking, a function is right-continuous if no jump occurs when the limit point is approached from
the right. That is, the limit as approached from above exists and is the function value at that point, written
lim F (t) = F (a).
tæa+
1
,Cumulative distribution function
This cumulative probability distribution function also enables us to consider the probability of an uncountable
number of values for an r.v. Y occurring in regions of the state space Y .
Properties of the cumulative distribution function
If F (y) is a cumulative distribution function, then the following properties hold:
• lim F (y) = 0.
yæ≠Œ
• lim F (y) = 1.
yæŒ
• F (y) is a non-decreasing function of y, i.e., if y1 and y2 are any values such that y1 < y2 , then
F (y1 ) Æ F (y2 ).
CDF of a continuous random variable
A random variable Y with cdf F (y) is said to be continuous if F (y) is continuous for all y.
To be mathematically precise, the first derivative of F (y) needs to exist and be continuous, except for at
most a finite number of points in any finite interval.
Probability density function
Let F (y) be the cumulative distribution function for a continuous random variable Y . Then, f (y) given by
dF (y)
f (y) = F Õ (y) =
dy
wherever the derivative exists, is called the probability density function (pdf) for the random variable Y .
Properties of the pdf
It follows from previous Definitions that the distribution function F (y) of a random variable Y can be written
as
⁄ y
F (y) = f (t)dt,
≠Œ
where f (·) is the probability density function of the r.v. Y .
If f (y) is the pdf of a continuous random variable Y , then to be valid the following must hold
• f (y) Ø 0 ⁄for all ≠Œ < y < Œ,
Œ
• F (Œ) = f (y)dy = 1.
≠Œ
Properties of the pdf
Consider the random variable Y with pdf
I
3y 2 for 0 Æ y Æ 1,
f (y) =
0 elsewhere.
Is f (y) a valid pdf?
The function 3y 2 is non-negative and continuous on [0, 1] and so we check to see that F (Œ) = 1. That is,
2
, ⁄ Œ ⁄ 1 -1
-
f (y)dy = 3y 2 dy = y 3 -- = 1 ∆ a valid pdf.
≠Œ 0 0
Calculating probabilities
Let Y be a random variable with pdf f (y), then
⁄ b
P (a Æ Y Æ b) = F (b) ≠ F (a) = f (y)dy.
a
Calculating probabilities
f (y)
P (a ≤ Y ≤ b)
a b y
Calculating probabilities
Consider the random variable Y with pdf
I
3y 2 for 0 Æ y Æ 1,
f (y) =
0 elsewhere.
What is P (1/4 < Y < 1/2)?
⁄ 1/2 -1/2
2
- 3-
F (1/2) ≠ F (1/4) = 3y dy = y -
1/4 1/4
1 1 7
= ≠ = .
8 64 64
Expectation of a continuous random variable
Let Y be a continuous random variable with pdf f (y), then the expected value of Y , E[Y ], is defined as
⁄ Œ
E[Y ] = y f (y)dy,
≠Œ
provided this integral is absolutely convergent. That is,
3
Chapter 3: Continuous random variables
Semester 1, 2021
Lecture 13
Motivation example
The time (in hours) a manager takes to interview a job applicant has an exponential distribution with ⁄ = 2.
The applicants are scheduled at quarter-hour intervals, beginning at 8:00 am.
The applicants arrive exactly on time.
When the applicant with an 8:15 am appointment arrives at the manager’s office, what is the probability that
he or she will have to wait before seeing the manager?
Continuous random variable
In many situations, the quantity we measure is not discrete, e.g. time until an event, yield of a crop, height of
students. How can we calculate probabilities for these cases?
Probability density function (pdf)
A continuous random variable Y has a probability density function f : Y æ [0, Œ), given by
⁄ b
f (y)dy = P (a Æ Y Æ b),
a
for some a, b œ Y .
Cumulative distribution function
Recall the definition of the cumulative probability distribution function (cdf):
F (y) = P (Y Æ y), ≠Œ < y < Œ.
Recall that for a discrete r.v., this is a step function as only a countable number of values are taken by a
discrete r.v., and so the cdf takes jumps at those values and remains flat between them.
In fact, the cdf of a discrete r.v. is a monotonic non-decreasing, right-continuous function.
Roughly speaking, a function is right-continuous if no jump occurs when the limit point is approached from
the right. That is, the limit as approached from above exists and is the function value at that point, written
lim F (t) = F (a).
tæa+
1
,Cumulative distribution function
This cumulative probability distribution function also enables us to consider the probability of an uncountable
number of values for an r.v. Y occurring in regions of the state space Y .
Properties of the cumulative distribution function
If F (y) is a cumulative distribution function, then the following properties hold:
• lim F (y) = 0.
yæ≠Œ
• lim F (y) = 1.
yæŒ
• F (y) is a non-decreasing function of y, i.e., if y1 and y2 are any values such that y1 < y2 , then
F (y1 ) Æ F (y2 ).
CDF of a continuous random variable
A random variable Y with cdf F (y) is said to be continuous if F (y) is continuous for all y.
To be mathematically precise, the first derivative of F (y) needs to exist and be continuous, except for at
most a finite number of points in any finite interval.
Probability density function
Let F (y) be the cumulative distribution function for a continuous random variable Y . Then, f (y) given by
dF (y)
f (y) = F Õ (y) =
dy
wherever the derivative exists, is called the probability density function (pdf) for the random variable Y .
Properties of the pdf
It follows from previous Definitions that the distribution function F (y) of a random variable Y can be written
as
⁄ y
F (y) = f (t)dt,
≠Œ
where f (·) is the probability density function of the r.v. Y .
If f (y) is the pdf of a continuous random variable Y , then to be valid the following must hold
• f (y) Ø 0 ⁄for all ≠Œ < y < Œ,
Œ
• F (Œ) = f (y)dy = 1.
≠Œ
Properties of the pdf
Consider the random variable Y with pdf
I
3y 2 for 0 Æ y Æ 1,
f (y) =
0 elsewhere.
Is f (y) a valid pdf?
The function 3y 2 is non-negative and continuous on [0, 1] and so we check to see that F (Œ) = 1. That is,
2
, ⁄ Œ ⁄ 1 -1
-
f (y)dy = 3y 2 dy = y 3 -- = 1 ∆ a valid pdf.
≠Œ 0 0
Calculating probabilities
Let Y be a random variable with pdf f (y), then
⁄ b
P (a Æ Y Æ b) = F (b) ≠ F (a) = f (y)dy.
a
Calculating probabilities
f (y)
P (a ≤ Y ≤ b)
a b y
Calculating probabilities
Consider the random variable Y with pdf
I
3y 2 for 0 Æ y Æ 1,
f (y) =
0 elsewhere.
What is P (1/4 < Y < 1/2)?
⁄ 1/2 -1/2
2
- 3-
F (1/2) ≠ F (1/4) = 3y dy = y -
1/4 1/4
1 1 7
= ≠ = .
8 64 64
Expectation of a continuous random variable
Let Y be a continuous random variable with pdf f (y), then the expected value of Y , E[Y ], is defined as
⁄ Œ
E[Y ] = y f (y)dy,
≠Œ
provided this integral is absolutely convergent. That is,
3