STAT 430/510 Lecture 10
STAT 430/510 Probability
Lecture 10: Continuous Random Variable
Pengyuan (Penelope) Wang
June 13, 2011
STAT 430/510 Lecture 10
Introduction
The set of possible values for discrete random variable is
discrete.
However, there also exist random variables who can take
values on a whole interval.
STAT 430/510 Lecture 10
Definition of Continuous Random Variable
X is a continuous random variable if it take continuous
values.
STAT 430/510 Lecture 10
Definition of Continuous Random Variable
X is a continuous random variable if it take continuous
values.
There exists a nonnegative function f , having the property
that, for any set B of real numbers
P(X ∈ B) =
f (x)dx
B
for example, for set B = (a, b), P(X ∈ B) =
b
a
f (x)dx
The function f is called the probability density function of
random variable X .
STAT 430/510 Lecture 10
Definition of Continuous Random Variable
X is a continuous random variable if it take continuous
values.
There exists a nonnegative function f , having the property
that, for any set B of real numbers
P(X ∈ B) =
f (x)dx
B
for example, for set B = (a, b), P(X ∈ B) =
b
a
f (x)dx
The function f is called the probability density function of
random variable X .
f must satisfy: f ≥ 0,
f (x)dx = 1.
Important: how to interpret f ?
STAT 430/510 Lecture 10
How to represent the probability distribution of such random
variables?
Think of PMF.
It is sort of like the continuous version of PMF.
For any set B of real numbers
P(X ∈ B) =
f (x)dx
B
for example, for set B = (a, b), P(X ∈ B) =
b
a
f (x)dx
STAT 430/510 Lecture 10
Example
The amount of time in hours that a computer functions
before breaking down is a continuous random variable with
probability density function given by
f (x) =
1 −x/100
,
100 e
x ≥0
0, x < 0
Confirm that it is a density function.
STAT 430/510 Lecture 10
Probability on an interval
P(a ≤ X ≤ b) =
b
a
f (x)dx
The amount of time in hours that a computer functions
before breaking down is a continuous random variable with
probability density function given by
f (x) =
1 −x/100
,
100 e
x ≥0
0, x < 0
What is the probability that
(a) it will function for 100 - 150 hours?
STAT 430/510 Lecture 10
The probability that a continuous random variable would take
exactly one number is 0.
P(a ≤ X ≤ b) =
b
a
f (x)dx
Then for any value u,
P(X = u) = (u ≤ X ≤ u) =
u
u
f (x)dx = 0
The probability that the computer would function for exactly
100 hours is 0.
STAT 430/510 Lecture 10
Cumulative Probability Function
Cumulative Probability Function:
F (x) = P(X < x) = P(X ≤ x) =
x
∞ f (u)du
The amount of time in hours that a computer functions
before breaking down is a continuous random variable with
probability density function given by
f (x) =
1 −x/100
,
100 e
x ≥0
0, x < 0
What is the probability that
(b) it will function for fewer than 100 hours?
STAT 430/510 Lecture 10
Summary of Properties of Continuous Random Variable
1 = P(X ∈ (−∞, ∞)) =
P(a ≤ X ≤ b) =
b
a
∞
−∞ f (x)dx
f (x)dx
P(X = u) = 0
Cumulative Probability Function:
F (x) = P(X < x) = P(X ≤ x) =
x
−∞ f (u)du
STAT 430/510 Lecture 10
Expected Value
If X is a continuous random variable with probability
density function f (x), then its expected value is,
∞
E[X ] =
xf (x)dx
−∞
And, for any function g,
∞
E[g(X )] =
g(x)f (x)dx
−∞
It is totally analogous to the discrete case.
STAT 430/510 Lecture 10
Expected Value and Variance of Continuous R.V.
For continuous random variable X with pdf f (x),
∞
−∞ xf (x)dx
∞
E[X 2 ] = −∞ x 2 f (x)dx
∞
Var (X ) = −∞ (x − µ)2 f (x)dx
E[X ] =
µ = EX .
SD(X ) =
Var (X )
= E[X 2 ] − (E[X ])2 , where
STAT 430/510 Lecture 10
Properties of Expected Value and Variance: totally the same as the
discrete case
E[aX + b] = aE[X ] + b, where a and b are constants
Var (aX + b) = a2 Var (X ) , where a and b are constants.
E[X + Y ] = E[X ] + E[Y ], where X and Y are random
variables.
Var [aX + bY ] = a2 Var [X ] + b2 Var [Y ], if X and Y are
independent.
They are the same as the discrete case.
STAT 430/510 Lecture 10
Example
Find E[X ] and Var(X) when the density function X is
f (x) =
1
0 x2xdx = 2/3
1
E[X 2 ] = 0 x 2 2xdx = 1/2
Var (X ) = E[X 2 ] − (E[X ])2
2x, 0 ≤ x ≤ 1
0, otherwise
E[X ] =
= 1/18
STAT 430/510 Lecture 10
Example
The density function X is given by
f (x) =
Find E[eX ].
E[eX ] =
1 x
0 e 1dx
=e−1
1, 0 ≤ x ≤ 1
0, otherwise
STAT 430/510 Lecture 10
Uniform Random Variable
A continuous random variable X is said to have a uniform
distribution on the interval [A, B], if X can take any value
in [A, B] and the distribution is flat on every points.
Probability density function:
f (x) =
1
B−A ,
A≤x ≤B
0, otherwise
STAT 430/510 Lecture 10
cdf
For uniform r.v. X on [A, B], the cdf is
0, m < A
x−A
, A≤x ≤B
F (x) =
B−A
1, x > B
STAT 430/510 Lecture 10
Expected Value and Variance
X is uniform random variable on [A, B].
E[X ] =
Var (X )
A+B
2
2
= (B−A)
12
STAT 430/510 Lecture 10
Example
If X is uniformly distributed over (0,10), calculate the
probability that
(a) X < 3
(b) X > 6
(c) 3 < X < 8
P(X < 3) =
3 1
0 10 dx
=
3
10
STAT 430/510 Lecture 10
Example
If X is uniformly distributed over (0,10), calculate the
probability that
(a) X < 3
(b) X > 6
(c) 3 < X < 8
P(X < 3) =
P(X > 6) =
3 1
3
0 10 dx = 10
10 1
2
6 10 dx = 5
STAT 430/510 Lecture 10
Example
If X is uniformly distributed over (0,10), calculate the
probability that
(a) X < 3
(b) X > 6
(c) 3 < X < 8
3 1
3
0 10 dx = 10
10 1
dx = 25
P(X > 6) = 6 10
8 1
P(3 < X < 8) = 3 10
dx = 12
P(X < 3) =
STAT 430/510 Lecture 10
Example
Buses arrive at a specific stop at 15-minute interval
starting at 7 A.M. That is, they arrive at 7, 7:15, 7:30, 7:45,
and so on. If a passenger arrives at the stop at a time that
is uniformly distributed between 7 and 7:30, find the
probability that he waits
(a) less than 5 minutes for a bus
(b) more than 10 minutes for a bus
STAT 430/510 Lecture 10
Example: Solution
Let X denote the number of minutes past 7 that the
passenger arrives at the stop.
{waiting for < 5min} = {10 < X < 15} ∪ {25 < X < 30}
P(10 < X < 15) + P(25 < X < 30) =
15 1
30 1
1
10 30 dx + 25 30 dx = 3
{waiting for > 10min} = {0 < X < 5} ∪ {15 < X < 20}
5 1
20 1
P(0 < X < 5) + P(15 < X < 20) = 0 30
dx + 15 30
dx =
1
3
STAT 430/510 Lecture 10
last Example
A stick of length 1 is split at a point U that is uniformly
distributed over (0,1). Determine the expected length of the
piece that contains the mid point.