Prob 3160 CH 7
Prob 3160 CH 7
Continuous distributions
Example
7.1. Suppose we are given that f (x) = c/x3 for x>1 and 0 otherwise. Since
∞
f (x)dx = 1 and
−∞ ∞ ∞
1 c
c f (x)dx = c 3
dx = ,
−∞ 1 x 2
we have c = 2.
PMF or PDF?
Probability mass function (PMF) and (probability) density function (PDF) are two
names for the same notion in the case of discrete random variables. We say PDF or
simply a density function for a general random variable, and we use PMF only for
discrete random variables.
97
98 7. CONTINUOUS DISTRIBUTIONS
We can dene CDF for any random variable, not just continuous ones, by setting F (y) :=
P(X 6 y). Recall that we introduced it in Denition 5.3 for discrete random variables. In
that case it is not particularly useful, although it does serve to unify discrete and continuous
random variables. In the continuous case, the fundamental theorem of calculus tells us,
provided f satises some conditions, that
f (y) = F 0 (y) .
By analogy with the discrete case, we dene the expectation of a continuous random variable.
∞
|x|f (x)dx < ∞.
−∞
In the example above,
∞ ∞
2
EX = x 3 dx = 2 x−2 dx = 2.
1 x 1
Later in Example 10.1 we will see that a continuous random variable with Cauchy distribution
has innite expectation.
Proof. First observe that if a continuous random variable X is nonnegative, then its
density f (x) = 0 x < 0. In particular, F (y) = 0 for y 6 0, thought the latter is not needed
for our proof. Thus for such a random variable
∞
EX = xf (x)dx.
0
Suppose n ∈ N, then we dene Xn (ω) to be k/2n if k/2n 6 X(ω) < (k+1)/2n , for k ∈ N∪{0}.
−n
This means that we are approximating X from below by the largest multiple of 2 that is
still below the value of X . Each Xn is discrete, and Xn increase to X for each ω ∈ S .
7.1. BASIC THEORY 99
∞
X k k
EXn = P Xn = n
k=1
2n 2
∞
X k k k+1
= P n 6X<
k=1
2n 2 2n
∞ (k+1)/2n
X k
= n
f (x)dx
k=1
2 k/2n
∞ (k+1)/2n
X k
= f (x)dx.
k=1 k/2n 2n
If x ∈ [k/2n , (k + 1)/2n ), then x diers from k/2n by at most 1/2n , and therefore
(k+1)/2n (k+1)/2n
k
06 xf (x)dx − f (x)dx
k/2n k/2n 2n
(k+1)/2n (k+1)/2n
k 1
= x − n f (x)dx 6 n f (x)dx
k/2n 2 2 k/2n
Note that
∞
X (k+1)/2n ∞
xf (x)dx = xf (x)dx
k=1 k/2n 0
and
∞ (k+1)/2n ∞ n ∞
X 1 1 X (k+1)/2 1 1
n
f (x)dx = n f (x)dx = n f (x)dx = n .
k=1
2 k/2n 2 k=1 k/2n 2 0 2
Therefore
100 7. CONTINUOUS DISTRIBUTIONS
∞ ∞ (k+1)/2n
X k
0 6 EX − EXn = xf (x)dx − f (x)dx
0 k=1 k/2n 2n
∞ (k+1)/2n ∞ (k+1)/2n
X X k
= xf (x)dx − f (x)dx
k=1 k/2n k=1 k/2n 2n
∞ (k+1)/2n (k+1)/2n
!
X k
= xf (x)dx − f (x)dx
k=1 k/2n k/2n 2n
∞ (k+1)/2n
X 1 1
6 f (x)dx = −−→ 0.
k=1
2n k/2n 2n n→0
We will not prove the following, but it is an interesting exercise: if Xm is any sequence of
discrete random variables that increase up to X , then limm→∞ EXm will have the same value
EX .
This fact is useful to show linearity, if X and Y are positive random variables with nite
expectations, then we can take Xm discrete increasing up to X and Ym discrete increasing
up to Y. Then Xm + Ym is discrete and increases up to X + Y , so we have
Note that we can not easily use the approximations to X, Y and X+Y we used in the
previous proof to use in this argument, since Xm + Ym might not be an approximation of the
same kind.
If X is not necessarily positive, we can show a similar result; we will not do the details.
Proposition 7.2
Suppose X is a continuous random variable with density fX and g is a real-valued
function, then
∞
Eg(X) = g(x)f (x)dx
−∞
as long as the expectation of the random variable g (X) makes sense.
As in the discrete case, this allows us to dene moments, and in particular the variance
Var X := E[X − EX]2 .
As an example of these calculations, let us look at the uniform distribution.
7.1. BASIC THEORY 101
Uniform distribution
We say that a random variable X has a uniform distribution on [a, b] if fX (x) = 1
b−a
if a6x6b and 0 otherwise.
∞ b
1
EX = xfX (x)dx = x dx
−∞ a b−a
b
1
= x dx
b−a a
1 b 2 a2 a + b
= − = .
b−a 2 2 2
This is what one would expect. To calculate the variance, we rst calculate
∞ b
2 2 1 a2 + ab + b2
EX = x fX (x)dx = x2 dx = .
−∞ a b−a 3
We then do some algebra to obtain
(b − a)2
Var X = EX 2 − (EX)2 = .
12
102 7. CONTINUOUS DISTRIBUTIONS
P (3 6 X 6 4) = P (X 6 4) − P (X < 3)
1 1 7
= FX (4) − FX (3) = 1 − 2 − 1 − 2 = .
4 3 144
Find EX .
© Copyright 2017 Phanuel Mariano, Patricia Alonso Ruiz, Copyright 2020 Masha Gordina.
7.2. FURTHER EXAMPLES AND APPLICATIONS 103
Find Var(X).
Solution : in Example 7.3 we found E [X] = 2
3
. Now
1 1
2 2 1
x3 dx = .
E X = x · 2xdx = 2
0 0 2
Thus 2
1 2 1
Var(X) = − = .
2 3 18
1
and that E [X 2 ] = 6
. Find the values of a and b.
∞
Solution : We need to use the fact that
−∞
f (x)dx = 1 and E [X 2 ] = 1
6
. The rst one gives
us 1
a
1= (ax + b) dx = + b,
0 2
and the second one give us
1
1 a b
= x2 (ax + b) dx = + .
6 0 4 3
Solving these equations gives us
a = −2, and b = 2.
104 7. CONTINUOUS DISTRIBUTIONS
7.3. Exercises
Exercise 7.1. Let X be a random variable with probability density function
(
cx (5 − x) 0 6 x 6 5,
f (x) =
0 otherwise.
Exercise 7.2. UConn students have designed the new U-phone. They have determined
that the lifetime of a U-Phone is given by the random variable X (measured in hours), with
probability density function
(
10
x2
x > 10,
f (x) =
0 x ≤ 10.
(A) Find the probability that the u-phone will last more than 20 hours.
(B) What is the cumulative distribution function of X? That is, nd FX (x) = P (X 6 x).
(C) Use part (b) to help you nd P (X > 35)?
Compute E [X].
Exercise 7.4. An insurance company insures a large number of homes. The insured value,
X, of a randomly selected home is assumed to follow a distribution with density function
(
3
x4
x > 1,
f (x) =
0 otherwise.
Given that a randomly selected home is insured for at least 1.5, calculate the probability
that it is insured for less than 2.
7
If E [X] = 10
, nd the values of a and b.
7.3. EXERCISES 105
Exercise 7.7. Suppose you order a pizza from your favorite pizzeria at 7:00 pm, knowing
that the time it takes for your pizza to be ready is uniformly distributed between 7:00 pm
and 7:30 pm.
(A) What is the probability that you will have to wait longer than 10 minutes for your
pizza?
(B) If at 7:15pm, the pizza has not yet arrived, what is the probability that you will have
to wait at least an additional 10 minutes?
Exercise 7.8. The grade of deterioration X of a machine part has a continuous distribution
on the interval (0, 10) with probability density function fX (x), where fX (x) is proportional
x
to on the interval. The reparation costs of this part are modeled by a random variable Y
5
2
that is given by Y = 3X . Compute the expected cost of reparation of the machine part.
Exercise 7.9. A bus arrives at some (random) time uniformly distributed between 10 : 00
and 10 : 20, and you arrive at a bus stop at 10 : 05.
(A) What is the probability that you have to wait at least 5 minutes until the bus comes?
(B) What is the probability that you have to wait at least 5 minutes, given that when you
arrive today to the station the bus was not there yet (you are lucky today)?
Exercise∗ 7.1. For a continuous random variable X with nite rst and second moments
prove that
E (aX + b) = aEX + b,
Var (aX + b) = a2 Var X.
for any a, b ∈ R.
Exercise∗ 7.2. Let X be a continuous random variable with probability density function
1
fX (x) = xe− 2 1[0,∞) (x) ,
x
4
where the indicator function is dened as
1, 0 6 x < ∞;
1[0,∞) (x) =
0,
otherwise.
Check that fX is a valid probability density function, and nd E (X) if it exists.
106 7. CONTINUOUS DISTRIBUTIONS
Exercise∗ 7.3. Let X be a continuous random variable with probability density function
4 ln x
fX (x) = 1[1,∞) (x) ,
x3
where the indicator function is dened as
1, 1 6 x < ∞;
1[1,∞) (x) =
0,
otherwise.
Check that fX is a valid probability density function, and nd E (X) if it exists.
7.4. SELECTED SOLUTIONS 107
5 5
5x2 x3
1= cx(5 − x)dx = c −
0 2 3 0
and so we must have that c = 6/125.
Solution to Exercise 7.1(B): We have that
x
FX (x) = P (X 6 x) = f (y)dy
−∞
x x
5y 2 y 3
6 6
= y (5 − y) dx = −
0 125 125 2 3 0
2 3
6 5x x
= − .
125 2 3
2
P(X > 10) = .
3
Solution to Exercise 7.7(B): Note that X is uniformly distributed over (0, 30). Then
Since 10
x
c dx = 10c,
0 5
1
we have c= 10
. Now, applying Proposition 7.2 we get
10
3 3
EY = x dx = 150.
0 50
Solution to Exercise 7.9(A): The probability that you have to wait at least 5 minutes
1 1
until the bus comes is . Note that with probability you have to wait less than 5 minutes,
2 4
1
and with probability you already missed the bus.
4