Upload
others
View
11
Download
0
Embed Size (px)
Citation preview
Continuous Random VariablesChapter 5 – Lecture 16
Yiren Ding
Shanghai Qibao Dwight High School
May 1, 2016
Yiren Ding Continuous Random Variables 1 / 24
Outline
1 Continuous Random VariableDefinitionInterpretation of density
2 Expected ValueDefinition
3 Substitution RuleProof of Substitution Rule
4 VarianceDefinition
Yiren Ding Continuous Random Variables 2 / 24
Continuous Random Variable
Introduction
The previous lecture gives an intuitive introduction to the basicconcept behind continuous random variables and their densities.
This chapter is to formally examine continuous random variables,which take on continuum of possible values rather than discrete.
The first notable property of a continuous random variable is that theprobability is zero at any particular value, so it only makes sense totalk about the probability in an interval of values.
We will also study the most important probability densities used inpractice. In particular, the normal density is treated in depth.
Finally we will be looking at the queen of all theorems in probabilitytheory, the central limit theorem! How exciting!
Yiren Ding Continuous Random Variables 3 / 24
Continuous Random Variable
Introduction
The previous lecture gives an intuitive introduction to the basicconcept behind continuous random variables and their densities.
This chapter is to formally examine continuous random variables,which take on continuum of possible values rather than discrete.
The first notable property of a continuous random variable is that theprobability is zero at any particular value, so it only makes sense totalk about the probability in an interval of values.
We will also study the most important probability densities used inpractice. In particular, the normal density is treated in depth.
Finally we will be looking at the queen of all theorems in probabilitytheory, the central limit theorem! How exciting!
Yiren Ding Continuous Random Variables 3 / 24
Continuous Random Variable
Introduction
The previous lecture gives an intuitive introduction to the basicconcept behind continuous random variables and their densities.
This chapter is to formally examine continuous random variables,which take on continuum of possible values rather than discrete.
The first notable property of a continuous random variable is that theprobability is zero at any particular value, so it only makes sense totalk about the probability in an interval of values.
We will also study the most important probability densities used inpractice. In particular, the normal density is treated in depth.
Finally we will be looking at the queen of all theorems in probabilitytheory, the central limit theorem! How exciting!
Yiren Ding Continuous Random Variables 3 / 24
Continuous Random Variable
Introduction
The previous lecture gives an intuitive introduction to the basicconcept behind continuous random variables and their densities.
This chapter is to formally examine continuous random variables,which take on continuum of possible values rather than discrete.
The first notable property of a continuous random variable is that theprobability is zero at any particular value, so it only makes sense totalk about the probability in an interval of values.
We will also study the most important probability densities used inpractice. In particular, the normal density is treated in depth.
Finally we will be looking at the queen of all theorems in probabilitytheory, the central limit theorem! How exciting!
Yiren Ding Continuous Random Variables 3 / 24
Continuous Random Variable
Introduction
The previous lecture gives an intuitive introduction to the basicconcept behind continuous random variables and their densities.
This chapter is to formally examine continuous random variables,which take on continuum of possible values rather than discrete.
The first notable property of a continuous random variable is that theprobability is zero at any particular value, so it only makes sense totalk about the probability in an interval of values.
We will also study the most important probability densities used inpractice. In particular, the normal density is treated in depth.
Finally we will be looking at the queen of all theorems in probabilitytheory, the central limit theorem! How exciting!
Yiren Ding Continuous Random Variables 3 / 24
Continuous Random Variable Definition
Definition 1 (Continuous Random Variable).
The random variable X is said to be continuously distributed if anintegrable a function f (x) exists such that
P(X ≤ a) =
∫ a
−∞f (x) dx for each a ∈ R (1)
where the function f (x) satisfies
f (x) ≥ 0 for all x and
∫ ∞−∞
f (x) dx = 1. (2)
The function P(X ≤ x) is the cumulative distribution function (CDF),and the function f (x) is the probability density function (PDF) of X .
aRiemann integrability is good enough
Yiren Ding Continuous Random Variables 4 / 24
Continuous Random Variable Definition
Continuous Random Variable
Unlike the CDF of a discrete random variable, the CDF of acontinuous random variable must be continuous because
limx→a
∫ x
−∞f (t) dt =
∫ a
−∞f (t) dt,
by the convergence of the Riemann sum since there can only be one“area” from −∞ to a if f (x) is an integrable function.
Moreover, f (t) does not even have to be Riemann integrable. Thecondition can even be relaxed to Lebesgue integrability, but it is oflittle practical importance for now.
So it suffices to remember that the CDF is always increasing andcontinuous but not necessary differentiable everywhere it is defined,and the PDF can have countably many jump discontinuities.
Yiren Ding Continuous Random Variables 5 / 24
Continuous Random Variable Definition
Continuous Random Variable
Unlike the CDF of a discrete random variable, the CDF of acontinuous random variable must be continuous because
limx→a
∫ x
−∞f (t) dt =
∫ a
−∞f (t) dt,
by the convergence of the Riemann sum since there can only be one“area” from −∞ to a if f (x) is an integrable function.
Moreover, f (t) does not even have to be Riemann integrable. Thecondition can even be relaxed to Lebesgue integrability, but it is oflittle practical importance for now.
So it suffices to remember that the CDF is always increasing andcontinuous but not necessary differentiable everywhere it is defined,and the PDF can have countably many jump discontinuities.
Yiren Ding Continuous Random Variables 5 / 24
Continuous Random Variable Definition
Continuous Random Variable
Unlike the CDF of a discrete random variable, the CDF of acontinuous random variable must be continuous because
limx→a
∫ x
−∞f (t) dt =
∫ a
−∞f (t) dt,
by the convergence of the Riemann sum since there can only be one“area” from −∞ to a if f (x) is an integrable function.
Moreover, f (t) does not even have to be Riemann integrable. Thecondition can even be relaxed to Lebesgue integrability, but it is oflittle practical importance for now.
So it suffices to remember that the CDF is always increasing andcontinuous but not necessary differentiable everywhere it is defined,and the PDF can have countably many jump discontinuities.
Yiren Ding Continuous Random Variables 5 / 24
Continuous Random Variable Definition
Example 1.
Show that X is continuously distributed and find its PDF, if
P(X ≤ x) =
0 for x < 012x
2 for 0 ≤ x < 1,12x for 1 ≤ x ≤ 2
1 for x > 2
x
P
P(X ≤ x)
1 2 3
1
Yiren Ding Continuous Random Variables 6 / 24
Continuous Random Variable Definition
Example 1 solution
The CDF is a continuous function and its derivative is defined for allx except at x = 1 and x = 2, so the derivative must be integrable.
By the FTC, the derivative of the CDF must be the PDF:
f (x) =
{x for 0 ≤ x < 1,12 for 1 < x < 2
You may wonder: What about f (x) when x = 1 or x = 2?
At every countably many points where the CDF is not differentiable(where f (x) is not defined), it does not matter what value we assignto f (x) since these values do not affect
∫ a−∞ f (x) dx . These countably
many points really has no size compared with the uncountable!
Usually we give f (x) the value of 0 at any of these discontinuities.
Yiren Ding Continuous Random Variables 7 / 24
Continuous Random Variable Definition
Example 1 solution
The CDF is a continuous function and its derivative is defined for allx except at x = 1 and x = 2, so the derivative must be integrable.
By the FTC, the derivative of the CDF must be the PDF:
f (x) =
{x for 0 ≤ x < 1,12 for 1 < x < 2
You may wonder: What about f (x) when x = 1 or x = 2?
At every countably many points where the CDF is not differentiable(where f (x) is not defined), it does not matter what value we assignto f (x) since these values do not affect
∫ a−∞ f (x) dx . These countably
many points really has no size compared with the uncountable!
Usually we give f (x) the value of 0 at any of these discontinuities.
Yiren Ding Continuous Random Variables 7 / 24
Continuous Random Variable Definition
Example 1 solution
The CDF is a continuous function and its derivative is defined for allx except at x = 1 and x = 2, so the derivative must be integrable.
By the FTC, the derivative of the CDF must be the PDF:
f (x) =
{x for 0 ≤ x < 1,12 for 1 < x < 2
You may wonder: What about f (x) when x = 1 or x = 2?
At every countably many points where the CDF is not differentiable(where f (x) is not defined), it does not matter what value we assignto f (x) since these values do not affect
∫ a−∞ f (x) dx . These countably
many points really has no size compared with the uncountable!
Usually we give f (x) the value of 0 at any of these discontinuities.
Yiren Ding Continuous Random Variables 7 / 24
Continuous Random Variable Definition
Example 1 solution
The CDF is a continuous function and its derivative is defined for allx except at x = 1 and x = 2, so the derivative must be integrable.
By the FTC, the derivative of the CDF must be the PDF:
f (x) =
{x for 0 ≤ x < 1,12 for 1 < x < 2
You may wonder: What about f (x) when x = 1 or x = 2?
At every countably many points where the CDF is not differentiable(where f (x) is not defined), it does not matter what value we assignto f (x) since these values do not affect
∫ a−∞ f (x) dx . These countably
many points really has no size compared with the uncountable!
Usually we give f (x) the value of 0 at any of these discontinuities.
Yiren Ding Continuous Random Variables 7 / 24
Continuous Random Variable Definition
Example 1 solution
The CDF is a continuous function and its derivative is defined for allx except at x = 1 and x = 2, so the derivative must be integrable.
By the FTC, the derivative of the CDF must be the PDF:
f (x) =
{x for 0 ≤ x < 1,12 for 1 < x < 2
You may wonder: What about f (x) when x = 1 or x = 2?
At every countably many points where the CDF is not differentiable(where f (x) is not defined), it does not matter what value we assignto f (x) since these values do not affect
∫ a−∞ f (x) dx . These countably
many points really has no size compared with the uncountable!
Usually we give f (x) the value of 0 at any of these discontinuities.
Yiren Ding Continuous Random Variables 7 / 24
Continuous Random Variable Definition
Example 2.
A continuous random variable X has a probability density f (x) of the formf (x) = ax + b for 0 < x < 1 and f (x) = 0 otherwise. What conditions onthe constants a and b must be satisfied? What is the CDF of X?
Solution. The requirements of a continuous random variable is thatax + b ≥ 0 for 0 < x < 1 and
∫ 10 (ax + b) dx = 1.
The first requirement gives a + b ≥ 0 and b ≥ 0.
The second requirement gives 12a + b = 1.
The cumulative distribution function is
F (x) =
∫ x
0(at + b) dt =
1
2ax2 + bx for 0 ≤ x ≤ 1.
Note that F (x) = 0 for x < 0 and F (x) = 1 for x > 1.
Yiren Ding Continuous Random Variables 8 / 24
Continuous Random Variable Definition
Example 2.
A continuous random variable X has a probability density f (x) of the formf (x) = ax + b for 0 < x < 1 and f (x) = 0 otherwise. What conditions onthe constants a and b must be satisfied? What is the CDF of X?
Solution. The requirements of a continuous random variable is thatax + b ≥ 0 for 0 < x < 1 and
∫ 10 (ax + b) dx = 1.
The first requirement gives a + b ≥ 0 and b ≥ 0.
The second requirement gives 12a + b = 1.
The cumulative distribution function is
F (x) =
∫ x
0(at + b) dt =
1
2ax2 + bx for 0 ≤ x ≤ 1.
Note that F (x) = 0 for x < 0 and F (x) = 1 for x > 1.
Yiren Ding Continuous Random Variables 8 / 24
Continuous Random Variable Definition
Example 2.
A continuous random variable X has a probability density f (x) of the formf (x) = ax + b for 0 < x < 1 and f (x) = 0 otherwise. What conditions onthe constants a and b must be satisfied? What is the CDF of X?
Solution. The requirements of a continuous random variable is thatax + b ≥ 0 for 0 < x < 1 and
∫ 10 (ax + b) dx = 1.
The first requirement gives a + b ≥ 0 and b ≥ 0.
The second requirement gives 12a + b = 1.
The cumulative distribution function is
F (x) =
∫ x
0(at + b) dt =
1
2ax2 + bx for 0 ≤ x ≤ 1.
Note that F (x) = 0 for x < 0 and F (x) = 1 for x > 1.
Yiren Ding Continuous Random Variables 8 / 24
Continuous Random Variable Definition
Example 2.
A continuous random variable X has a probability density f (x) of the formf (x) = ax + b for 0 < x < 1 and f (x) = 0 otherwise. What conditions onthe constants a and b must be satisfied? What is the CDF of X?
Solution. The requirements of a continuous random variable is thatax + b ≥ 0 for 0 < x < 1 and
∫ 10 (ax + b) dx = 1.
The first requirement gives a + b ≥ 0 and b ≥ 0.
The second requirement gives 12a + b = 1.
The cumulative distribution function is
F (x) =
∫ x
0(at + b) dt =
1
2ax2 + bx for 0 ≤ x ≤ 1.
Note that F (x) = 0 for x < 0 and F (x) = 1 for x > 1.
Yiren Ding Continuous Random Variables 8 / 24
Continuous Random Variable Definition
Example 2.
A continuous random variable X has a probability density f (x) of the formf (x) = ax + b for 0 < x < 1 and f (x) = 0 otherwise. What conditions onthe constants a and b must be satisfied? What is the CDF of X?
Solution. The requirements of a continuous random variable is thatax + b ≥ 0 for 0 < x < 1 and
∫ 10 (ax + b) dx = 1.
The first requirement gives a + b ≥ 0 and b ≥ 0.
The second requirement gives 12a + b = 1.
The cumulative distribution function is
F (x) =
∫ x
0(at + b) dt =
1
2ax2 + bx for 0 ≤ x ≤ 1.
Note that F (x) = 0 for x < 0 and F (x) = 1 for x > 1.
Yiren Ding Continuous Random Variables 8 / 24
Continuous Random Variable Definition
Example 2.
A continuous random variable X has a probability density f (x) of the formf (x) = ax + b for 0 < x < 1 and f (x) = 0 otherwise. What conditions onthe constants a and b must be satisfied? What is the CDF of X?
Solution. The requirements of a continuous random variable is thatax + b ≥ 0 for 0 < x < 1 and
∫ 10 (ax + b) dx = 1.
The first requirement gives a + b ≥ 0 and b ≥ 0.
The second requirement gives 12a + b = 1.
The cumulative distribution function is
F (x) =
∫ x
0(at + b) dt =
1
2ax2 + bx for 0 ≤ x ≤ 1.
Note that F (x) = 0 for x < 0 and F (x) = 1 for x > 1.
Yiren Ding Continuous Random Variables 8 / 24
Continuous Random Variable Interpretation of density
Interpretation of the probability density
Continuous random variables X have the following properties
A P(a < X ≤ b) =
∫ b
a
f (x) dx for a < b.
B P(X = a) = 0 for each real number a
C P
(a− 1
2∆a ≤ X ≤ a +
1
2∆a
)≈ f (a)∆a
Properties A and C should be intuitively clear from Riemann sum.
Property B follows from the continuity property of probability:
P(X = a) = limn→∞
∫ a
a− 1n
f (x) dx =
∫ a
af (x) dx = 0.
Property C gives the best interpretation of the density function: Thehigher the probability density at a, the more likely the random variablewill take values close to a. So think of density also as likelihood!
Yiren Ding Continuous Random Variables 9 / 24
Continuous Random Variable Interpretation of density
Interpretation of the probability density
Continuous random variables X have the following properties
A P(a < X ≤ b) =
∫ b
a
f (x) dx for a < b.
B P(X = a) = 0 for each real number a
C P
(a− 1
2∆a ≤ X ≤ a +
1
2∆a
)≈ f (a)∆a
Properties A and C should be intuitively clear from Riemann sum.
Property B follows from the continuity property of probability:
P(X = a) = limn→∞
∫ a
a− 1n
f (x) dx =
∫ a
af (x) dx = 0.
Property C gives the best interpretation of the density function: Thehigher the probability density at a, the more likely the random variablewill take values close to a. So think of density also as likelihood!
Yiren Ding Continuous Random Variables 9 / 24
Continuous Random Variable Interpretation of density
Interpretation of the probability density
Continuous random variables X have the following properties
A P(a < X ≤ b) =
∫ b
a
f (x) dx for a < b.
B P(X = a) = 0 for each real number a
C P
(a− 1
2∆a ≤ X ≤ a +
1
2∆a
)≈ f (a)∆a
Properties A and C should be intuitively clear from Riemann sum.
Property B follows from the continuity property of probability:
P(X = a) = limn→∞
∫ a
a− 1n
f (x) dx =
∫ a
af (x) dx = 0.
Property C gives the best interpretation of the density function: Thehigher the probability density at a, the more likely the random variablewill take values close to a. So think of density also as likelihood!
Yiren Ding Continuous Random Variables 9 / 24
Continuous Random Variable Interpretation of density
Interpretation of the probability density
Continuous random variables X have the following properties
A P(a < X ≤ b) =
∫ b
a
f (x) dx for a < b.
B P(X = a) = 0 for each real number a
C P
(a− 1
2∆a ≤ X ≤ a +
1
2∆a
)≈ f (a)∆a
Properties A and C should be intuitively clear from Riemann sum.
Property B follows from the continuity property of probability:
P(X = a) = limn→∞
∫ a
a− 1n
f (x) dx =
∫ a
af (x) dx = 0.
Property C gives the best interpretation of the density function: Thehigher the probability density at a, the more likely the random variablewill take values close to a. So think of density also as likelihood!
Yiren Ding Continuous Random Variables 9 / 24
Continuous Random Variable Interpretation of density
Interpretation of the probability density
Continuous random variables X have the following properties
A P(a < X ≤ b) =
∫ b
a
f (x) dx for a < b.
B P(X = a) = 0 for each real number a
C P
(a− 1
2∆a ≤ X ≤ a +
1
2∆a
)≈ f (a)∆a
Properties A and C should be intuitively clear from Riemann sum.
Property B follows from the continuity property of probability:
P(X = a) = limn→∞
∫ a
a− 1n
f (x) dx =
∫ a
af (x) dx = 0.
Property C gives the best interpretation of the density function: Thehigher the probability density at a, the more likely the random variablewill take values close to a. So think of density also as likelihood!
Yiren Ding Continuous Random Variables 9 / 24
Continuous Random Variable Interpretation of density
Interpretation of the probability density
Continuous random variables X have the following properties
A P(a < X ≤ b) =
∫ b
a
f (x) dx for a < b.
B P(X = a) = 0 for each real number a
C P
(a− 1
2∆a ≤ X ≤ a +
1
2∆a
)≈ f (a)∆a
Properties A and C should be intuitively clear from Riemann sum.
Property B follows from the continuity property of probability:
P(X = a) = limn→∞
∫ a
a− 1n
f (x) dx =
∫ a
af (x) dx = 0.
Property C gives the best interpretation of the density function: Thehigher the probability density at a, the more likely the random variablewill take values close to a. So think of density also as likelihood!
Yiren Ding Continuous Random Variables 9 / 24
Continuous Random Variable Interpretation of density
Interpretation of the probability density
Continuous random variables X have the following properties
A P(a < X ≤ b) =
∫ b
a
f (x) dx for a < b.
B P(X = a) = 0 for each real number a
C P
(a− 1
2∆a ≤ X ≤ a +
1
2∆a
)≈ f (a)∆a
Properties A and C should be intuitively clear from Riemann sum.
Property B follows from the continuity property of probability:
P(X = a) = limn→∞
∫ a
a− 1n
f (x) dx =
∫ a
af (x) dx = 0.
Property C gives the best interpretation of the density function: Thehigher the probability density at a, the more likely the random variablewill take values close to a. So think of density also as likelihood!
Yiren Ding Continuous Random Variables 9 / 24
Continuous Random Variable
Uniform Density Revisited
Previously we defined the uniform density in (a, b) to be
f (x) =1
b − a, for a < x < b (3)
Since the density is constant, the random variable X is just as likelyto be near any value in (a, b) as any other value.
Note that we assign f (x) = 0 for all x 6∈ (a, b). Hence for any valueof x less than a, F (x) = 0. And for a ≤ x ≤ b,
F (x) =
∫ x
a
1
b − adt =
x − a
b − a. (4)
If x > b, then F (x) =
∫ b
af (t) dt +
∫ x
bf (t) dt =
b − a
b − a+ 0 = 1.
Yiren Ding Continuous Random Variables 10 / 24
Continuous Random Variable
Uniform Density Revisited
Previously we defined the uniform density in (a, b) to be
f (x) =1
b − a, for a < x < b (3)
Since the density is constant, the random variable X is just as likelyto be near any value in (a, b) as any other value.
Note that we assign f (x) = 0 for all x 6∈ (a, b). Hence for any valueof x less than a, F (x) = 0. And for a ≤ x ≤ b,
F (x) =
∫ x
a
1
b − adt =
x − a
b − a. (4)
If x > b, then F (x) =
∫ b
af (t) dt +
∫ x
bf (t) dt =
b − a
b − a+ 0 = 1.
Yiren Ding Continuous Random Variables 10 / 24
Continuous Random Variable
Uniform Density Revisited
Previously we defined the uniform density in (a, b) to be
f (x) =1
b − a, for a < x < b (3)
Since the density is constant, the random variable X is just as likelyto be near any value in (a, b) as any other value.
Note that we assign f (x) = 0 for all x 6∈ (a, b). Hence for any valueof x less than a, F (x) = 0. And for a ≤ x ≤ b,
F (x) =
∫ x
a
1
b − adt =
x − a
b − a. (4)
If x > b, then F (x) =
∫ b
af (t) dt +
∫ x
bf (t) dt =
b − a
b − a+ 0 = 1.
Yiren Ding Continuous Random Variables 10 / 24
Continuous Random Variable
Uniform Density Revisited
Previously we defined the uniform density in (a, b) to be
f (x) =1
b − a, for a < x < b (3)
Since the density is constant, the random variable X is just as likelyto be near any value in (a, b) as any other value.
Note that we assign f (x) = 0 for all x 6∈ (a, b). Hence for any valueof x less than a, F (x) = 0. And for a ≤ x ≤ b,
F (x) =
∫ x
a
1
b − adt =
x − a
b − a. (4)
If x > b, then F (x) =
∫ b
af (t) dt +
∫ x
bf (t) dt =
b − a
b − a+ 0 = 1.
Yiren Ding Continuous Random Variables 10 / 24
Continuous Random Variable
Exponential Density Revisited
Recall the CDF of an exponential distribution with intensity α is
F (t) = P(T ≤ t) = 1− e−αt , for t ≥ 0. (5)
Note that F (t) = 0 for t < 0, and F (t) is continuous at every point tand is differentiable everywhere except at t = 0.
By the FTC, the derivative of F (t) must be the density function:
f (t) = F ′(t) = αe−αt for t > 0. (6)
For t ≤ 0, f (t) = 0. (We conveniently assign f (t) = 0 for t = 0.)
This justifies the exponential density, which describes the likelihoodof the waiting time between rare events that occur according to thePoisson process, with an average rate of α times per unit time.
Yiren Ding Continuous Random Variables 11 / 24
Continuous Random Variable
Exponential Density Revisited
Recall the CDF of an exponential distribution with intensity α is
F (t) = P(T ≤ t) = 1− e−αt , for t ≥ 0. (5)
Note that F (t) = 0 for t < 0, and F (t) is continuous at every point tand is differentiable everywhere except at t = 0.
By the FTC, the derivative of F (t) must be the density function:
f (t) = F ′(t) = αe−αt for t > 0. (6)
For t ≤ 0, f (t) = 0. (We conveniently assign f (t) = 0 for t = 0.)
This justifies the exponential density, which describes the likelihoodof the waiting time between rare events that occur according to thePoisson process, with an average rate of α times per unit time.
Yiren Ding Continuous Random Variables 11 / 24
Continuous Random Variable
Exponential Density Revisited
Recall the CDF of an exponential distribution with intensity α is
F (t) = P(T ≤ t) = 1− e−αt , for t ≥ 0. (5)
Note that F (t) = 0 for t < 0, and F (t) is continuous at every point tand is differentiable everywhere except at t = 0.
By the FTC, the derivative of F (t) must be the density function:
f (t) = F ′(t) = αe−αt for t > 0. (6)
For t ≤ 0, f (t) = 0. (We conveniently assign f (t) = 0 for t = 0.)
This justifies the exponential density, which describes the likelihoodof the waiting time between rare events that occur according to thePoisson process, with an average rate of α times per unit time.
Yiren Ding Continuous Random Variables 11 / 24
Continuous Random Variable
Exponential Density Revisited
Recall the CDF of an exponential distribution with intensity α is
F (t) = P(T ≤ t) = 1− e−αt , for t ≥ 0. (5)
Note that F (t) = 0 for t < 0, and F (t) is continuous at every point tand is differentiable everywhere except at t = 0.
By the FTC, the derivative of F (t) must be the density function:
f (t) = F ′(t) = αe−αt for t > 0. (6)
For t ≤ 0, f (t) = 0. (We conveniently assign f (t) = 0 for t = 0.)
This justifies the exponential density, which describes the likelihoodof the waiting time between rare events that occur according to thePoisson process, with an average rate of α times per unit time.
Yiren Ding Continuous Random Variables 11 / 24
Continuous Random Variable
Exponential Density Revisited
Recall the CDF of an exponential distribution with intensity α is
F (t) = P(T ≤ t) = 1− e−αt , for t ≥ 0. (5)
Note that F (t) = 0 for t < 0, and F (t) is continuous at every point tand is differentiable everywhere except at t = 0.
By the FTC, the derivative of F (t) must be the density function:
f (t) = F ′(t) = αe−αt for t > 0. (6)
For t ≤ 0, f (t) = 0. (We conveniently assign f (t) = 0 for t = 0.)
This justifies the exponential density, which describes the likelihoodof the waiting time between rare events that occur according to thePoisson process, with an average rate of α times per unit time.
Yiren Ding Continuous Random Variables 11 / 24
Continuous Random Variable
Example 3.
A point is picked at random in the inside of a circular disk with radius r .Let the random variable X denote the distance from the center of the diskto this point. Does the random variable X have a probability densityfunction and, if so, what is its form?
Solution. Taken as the set of all points (x , y) such that x2 + y2 ≤ r2
the sample space of this chance experiment.
Define the probability measure on any event A as
P(A) =area of region A
πr2.
To find the PDF, we first need to find the CDF:
P(X ≤ x) =πx2
πr2=
x2
r2for 0 ≤ x ≤ r .
Note that P(X ≤ x) = 0 for x < 0 and P(X ≤ x) = 1 for x > r .
Yiren Ding Continuous Random Variables 12 / 24
Continuous Random Variable
Example 3.
A point is picked at random in the inside of a circular disk with radius r .Let the random variable X denote the distance from the center of the diskto this point. Does the random variable X have a probability densityfunction and, if so, what is its form?
Solution. Taken as the set of all points (x , y) such that x2 + y2 ≤ r2
the sample space of this chance experiment.
Define the probability measure on any event A as
P(A) =area of region A
πr2.
To find the PDF, we first need to find the CDF:
P(X ≤ x) =πx2
πr2=
x2
r2for 0 ≤ x ≤ r .
Note that P(X ≤ x) = 0 for x < 0 and P(X ≤ x) = 1 for x > r .
Yiren Ding Continuous Random Variables 12 / 24
Continuous Random Variable
Example 3.
A point is picked at random in the inside of a circular disk with radius r .Let the random variable X denote the distance from the center of the diskto this point. Does the random variable X have a probability densityfunction and, if so, what is its form?
Solution. Taken as the set of all points (x , y) such that x2 + y2 ≤ r2
the sample space of this chance experiment.
Define the probability measure on any event A as
P(A) =area of region A
πr2.
To find the PDF, we first need to find the CDF:
P(X ≤ x) =πx2
πr2=
x2
r2for 0 ≤ x ≤ r .
Note that P(X ≤ x) = 0 for x < 0 and P(X ≤ x) = 1 for x > r .
Yiren Ding Continuous Random Variables 12 / 24
Continuous Random Variable
Example 3.
A point is picked at random in the inside of a circular disk with radius r .Let the random variable X denote the distance from the center of the diskto this point. Does the random variable X have a probability densityfunction and, if so, what is its form?
Solution. Taken as the set of all points (x , y) such that x2 + y2 ≤ r2
the sample space of this chance experiment.
Define the probability measure on any event A as
P(A) =area of region A
πr2.
To find the PDF, we first need to find the CDF:
P(X ≤ x) =πx2
πr2=
x2
r2for 0 ≤ x ≤ r .
Note that P(X ≤ x) = 0 for x < 0 and P(X ≤ x) = 1 for x > r .
Yiren Ding Continuous Random Variables 12 / 24
Continuous Random Variable
Example 3.
A point is picked at random in the inside of a circular disk with radius r .Let the random variable X denote the distance from the center of the diskto this point. Does the random variable X have a probability densityfunction and, if so, what is its form?
Solution. Taken as the set of all points (x , y) such that x2 + y2 ≤ r2
the sample space of this chance experiment.
Define the probability measure on any event A as
P(A) =area of region A
πr2.
To find the PDF, we first need to find the CDF:
P(X ≤ x) =πx2
πr2=
x2
r2for 0 ≤ x ≤ r .
Note that P(X ≤ x) = 0 for x < 0 and P(X ≤ x) = 1 for x > r .
Yiren Ding Continuous Random Variables 12 / 24
Continuous Random Variable
Example 3 solution
The CDF is differentiable at every point x except at x = r . This is nobig deal since we can assign f (r) = 0. By differentiating, we have
f (x) =2x
r2for 0 < x < r , ( and = 0 otherwise.1)
How do we interpret this density? Recall the value of the probabilitydensity at any point a shows the likelihood that the random variablewill take on a value in the immediate neighborhood of a.
Consider making a bet on the distance from a randomly chosen pointto the center of an unit disk. Should your guess be closer to 0 or 1?
The probability density function in this case is f (x) = 2x for 0 < x< 1, so you guess should be close to 1.
1From now on this will be assumed unless otherwise stated.Yiren Ding Continuous Random Variables 13 / 24
Continuous Random Variable
Example 3 solution
The CDF is differentiable at every point x except at x = r . This is nobig deal since we can assign f (r) = 0. By differentiating, we have
f (x) =2x
r2for 0 < x < r , ( and = 0 otherwise.1)
How do we interpret this density? Recall the value of the probabilitydensity at any point a shows the likelihood that the random variablewill take on a value in the immediate neighborhood of a.
Consider making a bet on the distance from a randomly chosen pointto the center of an unit disk. Should your guess be closer to 0 or 1?
The probability density function in this case is f (x) = 2x for 0 < x< 1, so you guess should be close to 1.
1From now on this will be assumed unless otherwise stated.Yiren Ding Continuous Random Variables 13 / 24
Continuous Random Variable
Example 3 solution
The CDF is differentiable at every point x except at x = r . This is nobig deal since we can assign f (r) = 0. By differentiating, we have
f (x) =2x
r2for 0 < x < r , ( and = 0 otherwise.1)
How do we interpret this density? Recall the value of the probabilitydensity at any point a shows the likelihood that the random variablewill take on a value in the immediate neighborhood of a.
Consider making a bet on the distance from a randomly chosen pointto the center of an unit disk. Should your guess be closer to 0 or 1?
The probability density function in this case is f (x) = 2x for 0 < x< 1, so you guess should be close to 1.
1From now on this will be assumed unless otherwise stated.Yiren Ding Continuous Random Variables 13 / 24
Continuous Random Variable
Example 3 solution
The CDF is differentiable at every point x except at x = r . This is nobig deal since we can assign f (r) = 0. By differentiating, we have
f (x) =2x
r2for 0 < x < r , ( and = 0 otherwise.1)
How do we interpret this density? Recall the value of the probabilitydensity at any point a shows the likelihood that the random variablewill take on a value in the immediate neighborhood of a.
Consider making a bet on the distance from a randomly chosen pointto the center of an unit disk. Should your guess be closer to 0 or 1?
The probability density function in this case is f (x) = 2x for 0 < x< 1, so you guess should be close to 1.
1From now on this will be assumed unless otherwise stated.Yiren Ding Continuous Random Variables 13 / 24
Expected Value Definition
Definition 2 (Expected Value).
The expected value of a continuous random variable X with probabilitydensity function f (x) is defined by
E (X ) =
∫ ∞−∞
xf (x) dx , (7)
provided that∫∞−∞ |x |f (x) dx is finite.
This parallels with the discrete case, where
E (X ) =∑
xip(xi ), where p(xi ) = P(X = xi ).
For example, if U is uniformly distributed in (a, b), then
E (U) =
∫ b
a
x
b − adx =
x2
2(b − a)
]ba
=b − a
2
Yiren Ding Continuous Random Variables 14 / 24
Expected Value Definition
Definition 2 (Expected Value).
The expected value of a continuous random variable X with probabilitydensity function f (x) is defined by
E (X ) =
∫ ∞−∞
xf (x) dx , (7)
provided that∫∞−∞ |x |f (x) dx is finite.
This parallels with the discrete case, where
E (X ) =∑
xip(xi ), where p(xi ) = P(X = xi ).
For example, if U is uniformly distributed in (a, b), then
E (U) =
∫ b
a
x
b − adx =
x2
2(b − a)
]ba
=b − a
2
Yiren Ding Continuous Random Variables 14 / 24
Expected Value Definition
Definition 2 (Expected Value).
The expected value of a continuous random variable X with probabilitydensity function f (x) is defined by
E (X ) =
∫ ∞−∞
xf (x) dx , (7)
provided that∫∞−∞ |x |f (x) dx is finite.
This parallels with the discrete case, where
E (X ) =∑
xip(xi ), where p(xi ) = P(X = xi ).
For example, if U is uniformly distributed in (a, b), then
E (U) =
∫ b
a
x
b − adx =
x2
2(b − a)
]ba
=b − a
2
Yiren Ding Continuous Random Variables 14 / 24
Expected Value
Example 4 (continue in Example 6 ).
A stick of unit length is broken at random into two pieces. What is theexpected value of the ratio of the length of the shorter piece to that of thelonger piece? What is the expected value of the ratio of the length of thelonger piece to that of the shorter piece?
Solution. Denote by X the ratio of the shorter piece to the longerpiece. The CDF is FX (x) = 2x
x+1 . (See figure below.) The PDF is
obtained by differentiation to be f (x) = 2(x+1)2
for 0 < x < 1.
0
xx+1
xx+1
1x+1
1
Yiren Ding Continuous Random Variables 15 / 24
Expected Value
Example 4 (continue in Example 6 ).
A stick of unit length is broken at random into two pieces. What is theexpected value of the ratio of the length of the shorter piece to that of thelonger piece? What is the expected value of the ratio of the length of thelonger piece to that of the shorter piece?
Solution. Denote by X the ratio of the shorter piece to the longerpiece. The CDF is FX (x) = 2x
x+1 . (See figure below.) The PDF is
obtained by differentiation to be f (x) = 2(x+1)2
for 0 < x < 1.
0
xx+1
xx+1
1x+1
1
Yiren Ding Continuous Random Variables 15 / 24
Expected Value
Example 4 solution
You should verify that∫ x−∞
2 dt(t+1)2
= 2xx+1 . Hence,
E (X ) =
∫ 1
0x
2 dx
(x + 1)2= 2
∫ 1
0
dx
x + 1− 2
∫ 1
0
dx
(x + 1)2
=
[2 ln(x + 1) + 2
1
x + 1
]10
= 2 ln 2− 1
Denote by Y the ratio of the longer piece to the shorter piece. Notethat Y = 1
X . Hence, FY (y) = P(Y ≤ y) = P(X ≥ 1Y ) for y > 1.
Hence FY (y) = 1− 2y+1 , and f (y) = 2
(y+1)2for y > 1, and
E (Y ) =
∫ ∞1
y2 dy
(y + 1)2=
[2 ln(y + 1) + 2
1
y + 1
]∞1
=∞.
Yiren Ding Continuous Random Variables 16 / 24
Expected Value
Example 4 solution
You should verify that∫ x−∞
2 dt(t+1)2
= 2xx+1 . Hence,
E (X ) =
∫ 1
0x
2 dx
(x + 1)2= 2
∫ 1
0
dx
x + 1− 2
∫ 1
0
dx
(x + 1)2
=
[2 ln(x + 1) + 2
1
x + 1
]10
= 2 ln 2− 1
Denote by Y the ratio of the longer piece to the shorter piece. Notethat Y = 1
X . Hence, FY (y) = P(Y ≤ y) = P(X ≥ 1Y ) for y > 1.
Hence FY (y) = 1− 2y+1 , and f (y) = 2
(y+1)2for y > 1, and
E (Y ) =
∫ ∞1
y2 dy
(y + 1)2=
[2 ln(y + 1) + 2
1
y + 1
]∞1
=∞.
Yiren Ding Continuous Random Variables 16 / 24
Expected Value
Example 4 solution
You should verify that∫ x−∞
2 dt(t+1)2
= 2xx+1 . Hence,
E (X ) =
∫ 1
0x
2 dx
(x + 1)2= 2
∫ 1
0
dx
x + 1− 2
∫ 1
0
dx
(x + 1)2
=
[2 ln(x + 1) + 2
1
x + 1
]10
= 2 ln 2− 1
Denote by Y the ratio of the longer piece to the shorter piece. Notethat Y = 1
X . Hence, FY (y) = P(Y ≤ y) = P(X ≥ 1Y ) for y > 1.
Hence FY (y) = 1− 2y+1 , and f (y) = 2
(y+1)2for y > 1, and
E (Y ) =
∫ ∞1
y2 dy
(y + 1)2=
[2 ln(y + 1) + 2
1
y + 1
]∞1
=∞.
Yiren Ding Continuous Random Variables 16 / 24
Substitution Rule
Theorem 1 (Substitution Rule).
Let X be a continuous random variable with probability density f (x).Then, for any given function g(x), the expected value of the randomvariable g(X ) can be calculated from
E (g(X )) =
∫ ∞−∞
g(x)f (x) dx , if it exists. (8)
Again this is similar to the discrete case where,
E (g(X )) =∑x∈I
g(x)p(x), where p(x) = P(X = x).
We can loosely view (8) as the convergence of a Riemann sum,
limn→∞
n∑i=1
g(x∗i )p(x∗i )
∆xi∆xi =
∫ ∞−∞
g(x)f (x) dx .
Yiren Ding Continuous Random Variables 17 / 24
Substitution Rule
Theorem 1 (Substitution Rule).
Let X be a continuous random variable with probability density f (x).Then, for any given function g(x), the expected value of the randomvariable g(X ) can be calculated from
E (g(X )) =
∫ ∞−∞
g(x)f (x) dx , if it exists. (8)
Again this is similar to the discrete case where,
E (g(X )) =∑x∈I
g(x)p(x), where p(x) = P(X = x).
We can loosely view (8) as the convergence of a Riemann sum,
limn→∞
n∑i=1
g(x∗i )p(x∗i )
∆xi∆xi =
∫ ∞−∞
g(x)f (x) dx .
Yiren Ding Continuous Random Variables 17 / 24
Substitution Rule
Theorem 1 (Substitution Rule).
Let X be a continuous random variable with probability density f (x).Then, for any given function g(x), the expected value of the randomvariable g(X ) can be calculated from
E (g(X )) =
∫ ∞−∞
g(x)f (x) dx , if it exists. (8)
Again this is similar to the discrete case where,
E (g(X )) =∑x∈I
g(x)p(x), where p(x) = P(X = x).
We can loosely view (8) as the convergence of a Riemann sum,
limn→∞
n∑i=1
g(x∗i )p(x∗i )
∆xi∆xi =
∫ ∞−∞
g(x)f (x) dx .
Yiren Ding Continuous Random Variables 17 / 24
Substitution Rule Proof of Substitution Rule
Lemma 1.
If Y is a nonnegative random variable, then
E (Y ) =
∫ ∞0
P(Y > y) dy (9)
Recall a similar result in the discrete case. (Problem Set 4, Problem5) If X is nonnegative and integer-valued, E (X ) =
∑∞k=0 P(X > k).
Proof of Lemma.
E (Y ) =
∫ ∞0
P(Y > y) dy =
∫ ∞0
∫ ∞y
f (x) dx dy
=x
R
f (x) dA
where R : 0 ≤ y ≤ ∞, y ≤ x ≤ ∞ and dA = dx dy .
Yiren Ding Continuous Random Variables 18 / 24
Substitution Rule Proof of Substitution Rule
Lemma 1.
If Y is a nonnegative random variable, then
E (Y ) =
∫ ∞0
P(Y > y) dy (9)
Recall a similar result in the discrete case. (Problem Set 4, Problem5) If X is nonnegative and integer-valued, E (X ) =
∑∞k=0 P(X > k).
Proof of Lemma.
E (Y ) =
∫ ∞0
P(Y > y) dy =
∫ ∞0
∫ ∞y
f (x) dx dy
=x
R
f (x) dA
where R : 0 ≤ y ≤ ∞, y ≤ x ≤ ∞ and dA = dx dy .
Yiren Ding Continuous Random Variables 18 / 24
Substitution Rule Proof of Substitution Rule
Lemma 1.
If Y is a nonnegative random variable, then
E (Y ) =
∫ ∞0
P(Y > y) dy (9)
Recall a similar result in the discrete case. (Problem Set 4, Problem5) If X is nonnegative and integer-valued, E (X ) =
∑∞k=0 P(X > k).
Proof of Lemma.
E (Y ) =
∫ ∞0
P(Y > y) dy =
∫ ∞0
∫ ∞y
f (x) dx dy
=x
R
f (x) dA
where R : 0 ≤ y ≤ ∞, y ≤ x ≤ ∞ and dA = dx dy .
Yiren Ding Continuous Random Variables 18 / 24
Substitution Rule Proof of Substitution Rule
Lemma 1.
If Y is a nonnegative random variable, then
E (Y ) =
∫ ∞0
P(Y > y) dy (9)
Recall a similar result in the discrete case. (Problem Set 4, Problem5) If X is nonnegative and integer-valued, E (X ) =
∑∞k=0 P(X > k).
Proof of Lemma.
E (Y ) =
∫ ∞0
P(Y > y) dy =
∫ ∞0
∫ ∞y
f (x) dx dy
=x
R
f (x) dA
where R : 0 ≤ y ≤ ∞, y ≤ x ≤ ∞ and dA = dx dy .
Yiren Ding Continuous Random Variables 18 / 24
Substitution Rule Proof of Substitution Rule
Lemma 1 proof
By Fubini’s Theorem (Lecture A1),x
R
f (x) dA =
∫ ∞0
∫ ∞y
f (x) dx dy =
∫ ∞0
∫ x
0f (x) dy dx
=
∫ ∞0
[f (x)y
]y=x
y=0
dx =
∫ ∞0
xf (x) dx = E (Y )
x
yy = x
R
y0
∫ ∞y0
f (x) dx
x
yy = x
R
x0
∫ x0
0f (x) dy
Yiren Ding Continuous Random Variables 19 / 24
Substitution Rule Proof of Substitution Rule
Lemma 1 proof
By Fubini’s Theorem (Lecture A1),x
R
f (x) dA =
∫ ∞0
∫ ∞y
f (x) dx dy =
∫ ∞0
∫ x
0f (x) dy dx
=
∫ ∞0
[f (x)y
]y=x
y=0
dx =
∫ ∞0
xf (x) dx = E (Y )
x
yy = x
R
y0
∫ ∞y0
f (x) dx
x
yy = x
R
x0
∫ x0
0f (x) dy
Yiren Ding Continuous Random Variables 19 / 24
Substitution Rule Proof of Substitution Rule
Lemma 1 proof
By Fubini’s Theorem (Lecture A1),x
R
f (x) dA =
∫ ∞0
∫ ∞y
f (x) dx dy =
∫ ∞0
∫ x
0f (x) dy dx
=
∫ ∞0
[f (x)y
]y=x
y=0
dx =
∫ ∞0
xf (x) dx = E (Y )
x
yy = x
R
y0
∫ ∞y0
f (x) dx
x
yy = x
R
x0
∫ x0
0f (x) dy
Yiren Ding Continuous Random Variables 19 / 24
Substitution Rule Proof of Substitution Rule
Lemma 1 proof
By Fubini’s Theorem (Lecture A1),x
R
f (x) dA =
∫ ∞0
∫ ∞y
f (x) dx dy =
∫ ∞0
∫ x
0f (x) dy dx
=
∫ ∞0
[f (x)y
]y=x
y=0
dx =
∫ ∞0
xf (x) dx = E (Y )
x
yy = x
R
y0
∫ ∞y0
f (x) dx
x
yy = x
R
x0
∫ x0
0f (x) dy
Yiren Ding Continuous Random Variables 19 / 24
Substitution Rule Proof of Substitution Rule
Theorem 1 Proof
Proof of Theorem. First, assuming that g(X ) is nonnegative, byLemma 1, and Fubini’s Theorem, we have
E (g(X )) =
∫ ∞0
P(g(X ) > y) dy =
∫ ∞0
∫x :g(x)>y
f (x) dx dy
=
∫ ∞−∞
∫ g(x)
0f (x) dy dx =
∫ ∞−∞
g(x)f (x) dx .
The proof of the general case follows by writing g(X ) as thedifference of max(g(X ), 0) and −min(g(X ), 0).
x
y
g(x)y0R
Yiren Ding Continuous Random Variables 20 / 24
Substitution Rule Proof of Substitution Rule
Theorem 1 Proof
Proof of Theorem. First, assuming that g(X ) is nonnegative, byLemma 1, and Fubini’s Theorem, we have
E (g(X )) =
∫ ∞0
P(g(X ) > y) dy =
∫ ∞0
∫x :g(x)>y
f (x) dx dy
=
∫ ∞−∞
∫ g(x)
0f (x) dy dx =
∫ ∞−∞
g(x)f (x) dx .
The proof of the general case follows by writing g(X ) as thedifference of max(g(X ), 0) and −min(g(X ), 0).
x
y
g(x)y0R
Yiren Ding Continuous Random Variables 20 / 24
Substitution Rule Proof of Substitution Rule
Example 5.
A warranty on an appliance specifies that an amount of $250 will bereimbursed if the appliance fails during the first year, an amount of $125 ifit fails during the second year, and nothing if it fails after the second year.The time, measured in years, until the appliance fails has the probabilitydensity f (x) = 0.2e−0.2x for x > 0. What is the expected value of thewarranty reimbursement?
Solution. Denote by X the time until the failure of the appliance.Define g(x) by g(x) = 250 for 0 ≤ x ≤ 1, g(x) = 125 for 1 < x ≤ 2,and g(x) = 0 for x > 2.
Then g(X ) is the warranty payment, with expected value,
E (g(X )) =
∫ 1
0250× 0.2e−0.2x dx +
∫ 2
1125× 0.2e−0.2x dx
= 250(1− e−0.2) + 125(e−0.2 − e−0.4) = $63.87.
Yiren Ding Continuous Random Variables 21 / 24
Substitution Rule Proof of Substitution Rule
Example 5.
A warranty on an appliance specifies that an amount of $250 will bereimbursed if the appliance fails during the first year, an amount of $125 ifit fails during the second year, and nothing if it fails after the second year.The time, measured in years, until the appliance fails has the probabilitydensity f (x) = 0.2e−0.2x for x > 0. What is the expected value of thewarranty reimbursement?
Solution. Denote by X the time until the failure of the appliance.Define g(x) by g(x) = 250 for 0 ≤ x ≤ 1, g(x) = 125 for 1 < x ≤ 2,and g(x) = 0 for x > 2.
Then g(X ) is the warranty payment, with expected value,
E (g(X )) =
∫ 1
0250× 0.2e−0.2x dx +
∫ 2
1125× 0.2e−0.2x dx
= 250(1− e−0.2) + 125(e−0.2 − e−0.4) = $63.87.
Yiren Ding Continuous Random Variables 21 / 24
Substitution Rule Proof of Substitution Rule
Example 5.
A warranty on an appliance specifies that an amount of $250 will bereimbursed if the appliance fails during the first year, an amount of $125 ifit fails during the second year, and nothing if it fails after the second year.The time, measured in years, until the appliance fails has the probabilitydensity f (x) = 0.2e−0.2x for x > 0. What is the expected value of thewarranty reimbursement?
Solution. Denote by X the time until the failure of the appliance.Define g(x) by g(x) = 250 for 0 ≤ x ≤ 1, g(x) = 125 for 1 < x ≤ 2,and g(x) = 0 for x > 2.
Then g(X ) is the warranty payment, with expected value,
E (g(X )) =
∫ 1
0250× 0.2e−0.2x dx +
∫ 2
1125× 0.2e−0.2x dx
= 250(1− e−0.2) + 125(e−0.2 − e−0.4) = $63.87.
Yiren Ding Continuous Random Variables 21 / 24
Substitution Rule
Example 6 ( Example 4 cont’d).
A stick of unit length is broken at random into two pieces. The randomvariable V represents the ratio of the length of the shorter piece to that ofthe longer piece. Find E (V ) using the substitution rule.
Solution. Previously we found E (V ) by determining the densityfunction of V and applying the definition of E (V ).
Now we let V = g(U), where U is uniformly distributed in (0, 1) andg(u) is given by g(u) = u/(1− u) for 0 < u ≤ 1
2 andg(u) = (1− u)/u for 1
2 < u < 1. This gives,
E (V ) =
∫ 1/2
0
u
1− udu +
∫ 1
1/2
1− u
udu = 2
∫ 1
1/2
1− u
udu
= 2 ln u − 2u
]11/2
= 2 ln 2− 1.
Yiren Ding Continuous Random Variables 22 / 24
Substitution Rule
Example 6 ( Example 4 cont’d).
A stick of unit length is broken at random into two pieces. The randomvariable V represents the ratio of the length of the shorter piece to that ofthe longer piece. Find E (V ) using the substitution rule.
Solution. Previously we found E (V ) by determining the densityfunction of V and applying the definition of E (V ).
Now we let V = g(U), where U is uniformly distributed in (0, 1) andg(u) is given by g(u) = u/(1− u) for 0 < u ≤ 1
2 andg(u) = (1− u)/u for 1
2 < u < 1. This gives,
E (V ) =
∫ 1/2
0
u
1− udu +
∫ 1
1/2
1− u
udu = 2
∫ 1
1/2
1− u
udu
= 2 ln u − 2u
]11/2
= 2 ln 2− 1.
Yiren Ding Continuous Random Variables 22 / 24
Substitution Rule
Example 6 ( Example 4 cont’d).
A stick of unit length is broken at random into two pieces. The randomvariable V represents the ratio of the length of the shorter piece to that ofthe longer piece. Find E (V ) using the substitution rule.
Solution. Previously we found E (V ) by determining the densityfunction of V and applying the definition of E (V ).
Now we let V = g(U), where U is uniformly distributed in (0, 1) andg(u) is given by g(u) = u/(1− u) for 0 < u ≤ 1
2 andg(u) = (1− u)/u for 1
2 < u < 1. This gives,
E (V ) =
∫ 1/2
0
u
1− udu +
∫ 1
1/2
1− u
udu = 2
∫ 1
1/2
1− u
udu
= 2 ln u − 2u
]11/2
= 2 ln 2− 1.
Yiren Ding Continuous Random Variables 22 / 24
Variance Definition
Definition 3 (Variance).
If X is a continuous random variable with probability density f (x), andexpected value E (X ) = µ, then the variance of X is
var(X ) = E ((X − µ)2) =
∫ ∞−∞
(x − µ)2f (x) dx . (10)
This is completely analogous to the discrete case.
The alternative formula var(X ) = E (X 2)− µ2 follows from:
var(X ) =
∫ ∞−∞
x2f (x) dx − 2µ
∫ ∞−∞
xf (x) dx + µ2∫ ∞−∞
f (x) dx
=
∫ ∞−∞
x2f (x) dx − 2µ2 + µ2 =
∫ ∞−∞
x2f (x) dx − µ2 .
It is no surprise that σ(X ) =√
var(X ).
Yiren Ding Continuous Random Variables 23 / 24
Variance Definition
Definition 3 (Variance).
If X is a continuous random variable with probability density f (x), andexpected value E (X ) = µ, then the variance of X is
var(X ) = E ((X − µ)2) =
∫ ∞−∞
(x − µ)2f (x) dx . (10)
This is completely analogous to the discrete case.
The alternative formula var(X ) = E (X 2)− µ2 follows from:
var(X ) =
∫ ∞−∞
x2f (x) dx − 2µ
∫ ∞−∞
xf (x) dx + µ2∫ ∞−∞
f (x) dx
=
∫ ∞−∞
x2f (x) dx − 2µ2 + µ2 =
∫ ∞−∞
x2f (x) dx − µ2 .
It is no surprise that σ(X ) =√
var(X ).
Yiren Ding Continuous Random Variables 23 / 24
Variance Definition
Definition 3 (Variance).
If X is a continuous random variable with probability density f (x), andexpected value E (X ) = µ, then the variance of X is
var(X ) = E ((X − µ)2) =
∫ ∞−∞
(x − µ)2f (x) dx . (10)
This is completely analogous to the discrete case.
The alternative formula var(X ) = E (X 2)− µ2 follows from:
var(X ) =
∫ ∞−∞
x2f (x) dx − 2µ
∫ ∞−∞
xf (x) dx + µ2∫ ∞−∞
f (x) dx
=
∫ ∞−∞
x2f (x) dx − 2µ2 + µ2 =
∫ ∞−∞
x2f (x) dx − µ2 .
It is no surprise that σ(X ) =√
var(X ).
Yiren Ding Continuous Random Variables 23 / 24
Variance Definition
Definition 3 (Variance).
If X is a continuous random variable with probability density f (x), andexpected value E (X ) = µ, then the variance of X is
var(X ) = E ((X − µ)2) =
∫ ∞−∞
(x − µ)2f (x) dx . (10)
This is completely analogous to the discrete case.
The alternative formula var(X ) = E (X 2)− µ2 follows from:
var(X ) =
∫ ∞−∞
x2f (x) dx − 2µ
∫ ∞−∞
xf (x) dx + µ2∫ ∞−∞
f (x) dx
=
∫ ∞−∞
x2f (x) dx − 2µ2 + µ2 =
∫ ∞−∞
x2f (x) dx − µ2 .
It is no surprise that σ(X ) =√
var(X ).
Yiren Ding Continuous Random Variables 23 / 24
Variance
Example 7.
Let the random variable X represent a number drawn at random from theinterval (a, b). What are the expected value and the variance of X?
From geometry we know that P(X ≤ x) = x−ab−a for a ≤ x ≤ b and so
the density function f (x) of X is f (x) = 1b−a for a < x < b. Hence,
E (X ) =
∫ b
ax
dx
b − a=
1
2
x2
b − a
]ba
=1
2
b2 − a2
b − a=
a + b
2.
To find the variance, we first find
E (X 2) =
∫ b
ax2
dx
b − a=
1
3
x3
b − a
]ba
=1
3
b3 − a3
b − a=
a2 − ab + b2
3.
Thus the variance is var(X ) = E (X 2)− (E (X ))2 = (b − a)2/12.
Yiren Ding Continuous Random Variables 24 / 24
Variance
Example 7.
Let the random variable X represent a number drawn at random from theinterval (a, b). What are the expected value and the variance of X?
From geometry we know that P(X ≤ x) = x−ab−a for a ≤ x ≤ b and so
the density function f (x) of X is f (x) = 1b−a for a < x < b. Hence,
E (X ) =
∫ b
ax
dx
b − a=
1
2
x2
b − a
]ba
=1
2
b2 − a2
b − a=
a + b
2.
To find the variance, we first find
E (X 2) =
∫ b
ax2
dx
b − a=
1
3
x3
b − a
]ba
=1
3
b3 − a3
b − a=
a2 − ab + b2
3.
Thus the variance is var(X ) = E (X 2)− (E (X ))2 = (b − a)2/12.
Yiren Ding Continuous Random Variables 24 / 24
Variance
Example 7.
Let the random variable X represent a number drawn at random from theinterval (a, b). What are the expected value and the variance of X?
From geometry we know that P(X ≤ x) = x−ab−a for a ≤ x ≤ b and so
the density function f (x) of X is f (x) = 1b−a for a < x < b. Hence,
E (X ) =
∫ b
ax
dx
b − a=
1
2
x2
b − a
]ba
=1
2
b2 − a2
b − a=
a + b
2.
To find the variance, we first find
E (X 2) =
∫ b
ax2
dx
b − a=
1
3
x3
b − a
]ba
=1
3
b3 − a3
b − a=
a2 − ab + b2
3.
Thus the variance is var(X ) = E (X 2)− (E (X ))2 = (b − a)2/12.
Yiren Ding Continuous Random Variables 24 / 24
Variance
Example 7.
Let the random variable X represent a number drawn at random from theinterval (a, b). What are the expected value and the variance of X?
From geometry we know that P(X ≤ x) = x−ab−a for a ≤ x ≤ b and so
the density function f (x) of X is f (x) = 1b−a for a < x < b. Hence,
E (X ) =
∫ b
ax
dx
b − a=
1
2
x2
b − a
]ba
=1
2
b2 − a2
b − a=
a + b
2.
To find the variance, we first find
E (X 2) =
∫ b
ax2
dx
b − a=
1
3
x3
b − a
]ba
=1
3
b3 − a3
b − a=
a2 − ab + b2
3.
Thus the variance is var(X ) = E (X 2)− (E (X ))2 = (b − a)2/12.
Yiren Ding Continuous Random Variables 24 / 24