You are on page 1of 34

Continuous Random Variable and

Their Probability Distributions:


Part I
Cyr Emile MLAN, Ph.D.
mlan@stat.uconn.edu
Continuous Random Variables: Part I

p. 1/34

Introduction
Text Reference: Introduction to Probability and Its
Application, Chapter 5.
Reading Assignment: Sections 5.1-5.2, 5.9, 5.10,
March 16 - March 18

As mentioned before, there are two types of random


variables: discrete and continuous. In this set of notes,
we study the second types of random variable that
arises in many applied problems.

Continuous Random Variables: Part I

p. 2/34

Continuous Random Variables


A random variable is continuous if the values it can
assumed cannot be enumerated (can be represented
by an interval).

Example 5.1:
If a chemical compound is randomly selected and its
pH X is determine, then X is a continuous random
variable because any pH value between 0 and 14 is
possible.
If in the study of the ecology of a lake, we make
depth measurements at randomly chosen locations,
then X = the depth at such location is a continuous
random variable.
Continuous Random Variables: Part I

p. 3/34

Continuous Random Variables


Unlike discrete random variables, it is impossible to
assign nonzero probabilities to all the possible values of
a continuous random variable.
Question: How do deal with this type of random
variable?
The idea is to find an alternative representation to the
probability mass function that will characterize
continuous distributions.
For, "discretize" the random variable. The resulting
discrete distribution can be pictured using a probability
histogram.
As one refines the discretization, a much smoother
curve appears on top of the histogram plot.

If we continue in this way, the sequence of histograms


Continuous Random Variables: Part I
p. 4/34
approaches a smooth curve.

Continuous Random Variables


Histogram of x

0.3
0.1
0.0

0.0

Histogram of x

Histogram of x

0.2
0.0

0.0

0.1

0.1

0.2

Density

0.3

0.3

0.4

0.4

Density

0.2

Density

0.2
0.1

Density

0.3

0.4

Histogram of x

0
x

4
2
0
2
4
Continuous
Random
Variables:
Part
I
x

p. 5/34

Continuous Random Variables


In any of these histograms, the area of all rectangles is
1. Thus, the total area under the smooth curve should
also be 1.
The probability that the random variable, X
 , falls
between two values a and b, P a X b , is
approximately equal to the sum of all rectangles that fall
in the interval [a, b]. Thus, the total area under the
smooth curve between a and b is just the probability that
the random variable falls in the interval [a, b].
The smooth curve is called a probability density
function and it is the quantity that is used to
characterize continuous distribution.

Continuous Random Variables: Part I

p. 6/34

Continuous Random Variables


Definition 5.1:
Let X be a continuous random variable. Then there exists a
mathematical function f (x) called the the probability density
function of the random variable. X satisfying
1. f (x) 0 for all < x < .
Z
2.
f (x) dx = 1.

For any two numbers a and b such that a b,




P aXb =

f (x) dx .

That is, the probability that X takes on a value in the interval


[a, b] is the area above this interval and under the graph of
the density function curve.
Continuous Random Variables: Part I

p. 7/34

Continuous Random Variables


All probability statements about X can be answered
with f (x).

Let b = a. Then

P (X = a) = P a X a =

f (x) dx = 0 .
a

In words, the probability that a continuous random


variable will assume any particular value is zero. (Note
that there is no area).
An important practical implication is: The probability
that X lies in some interval between a and b does not
depend on whether the lower limit a or the upper limit b
is included in the probability calculation:


P aX b =P a<X <b =P a<X b =P aX <b .


Continuous Random Variables: Part I

p. 8/34

Continuous Random Variables


Let a = .
P (X b) = P ( X b) =

f (x) dx .

Definition 5.2:
Let X be a continuous random variable. Then the cumulative
distribution function F (x) is defined for every number x by
Z x
F (b) = P (X x) =
f (y) dy

That is, for each x, F (x) is the area under the probability
density curve to the left of x.

Continuous Random Variables: Part I

p. 9/34

Continuous Random Variables


P (X > b) = 1 F (b)

For any two numbers a and b with a < b,


P (a X b) = F (b) F (a)
Theorem 5.1: Properties of a Distribution Function
Let F (y) be a distribution function, then
1. F () =
2. F (+) =

lim F (x) = 0 .

lim F (x) = 1 .

x+

3. F (x) is a nondecreasing function of x; i.e., if a <


b, F (a) F (b)
4. The distribution is right-hand
lim F (x + h) = F (x)
h0+

continuous;

Continuous Random Variables: Part I

i.e.,

p. 10/34

Continuous Random Variables


Definition 5.3:
A random variable X with probability distribution function
F (x) is said to be absolutely continuous if F (x) is left-hand
continuous.

If one differentiates both sides of the equation in


definition 5.1, one obtains
d
0
F (x) = F (x) = f (x) .
dy
Theorem 5.2:
Let X be a continuous random variable with probability density function f (x) and cumulative distribution function F (x),
then at every x at which the derivative F 0 (x) exists,
F 0 (x) = f (x) .
Continuous Random Variables: Part I

p. 11/34

Continuous Random Variables


Example 5.2:
An accounting firm that does not have its own computing
facilities rents time from a consulting company. The firm must
plan its computing budget carefully and hence has studied the
weekly use of CPU time quite thoroughly. The weekly use of
CPU time in hours, X, approximately follows the probability
density function given by

K x2 (4 x) , 0 x 4
f (x) =
0,
elsewhere
a).

Find the constant K.

b).

Find the cumulative distribution function F (x) for weekly


CPU time X.
Continuous Random Variables: Part I

p. 12/34

Continuous Random Variables


Solution:
a).

To get K, solve the equation 1 = K


Z

4
0

x2 (4 x) dx = K

4
0

x2 (4 x) dx. We have


4 3 1 4 x=4
64
x x
K.
=
3
4
3
x=0

3
Hence, K =
.
64
b). The cumulative distribution function F (x) for weekly CPU time x
between 0 and 4 is
Z x
Z
3 x 2
1 3
y (4 y) dy =
x (16 3x) .
F (x) =
f (y) dy =
64
256
0
0
Thus,
F (x) =

0,

1
256

1,

x<0
x3 (16 3x) , 0 x 4
4<x

Continuous Random Variables: Part I

p. 13/34

Continuous Random Variables


Example 5.3:
Suppose that the random variable X has a distribution
function
(
0,
x0
F (x) =
2
x
1e
, x>0
What is the probability that X exceeds 1?
b). Find the probability density function of X .
a).

Solution:

a). P X > 1 = 1 F (1) = e1 = .368 .

b). f (x) =

F 0 (x)

2
x
2x e

Continuous Random Variables: Part I

p. 14/34

Joke on statistics

What does a politician and


a drunken man has in
common?
A Politician uses statistics
as a drunken man uses the
lamp-posts for support
rather than illumination.
Continuous Random Variables: Part I

p. 15/34

Quantiles (or Percentiles) of a Continuous Distribution


When we say that an individuals test score was the
.85th quantile or 85th percentile of the population, we
mean that 85% of all population scores were below that
score and 15% were above.
Definition 4.4:
Let p be a number between 0 and 1. The the pth quantile
or the (100p)th percentile of the distribution of a continuous
random variable, X with distribution function F (x), denoted
by p , is the smallest value such that


p = F (p ) = P X p =

f (x) dx .

Continuous Random Variables: Part I

p. 16/34

Percentiles of a Continuous Distribution


Example 5.4:
Time headway" in traffic flow is the elapsed time between the time
that one car finishes passing a fixed point and the instant that the
next car begins to pass that point. Let X be the time headway for two
randomly chosen consecutive cars on a freeway during a period of
heavy flow. The following probability density is essentially the one
suggested in the Statistical Properties of Freeway Traffic" (Transp.
Res., vol. 11: 221-228):

.15 e.15(x.5) , y .5
f (x) =
0,
elsewhere
a).

Find the 50th percentile of this distribution.

b).

Find the 15th percentile of this distribution.

c).

Find the 85th percentile of this distribution.

Continuous Random Variables: Part I

p. 17/34

Percentiles of a Continuous Distribution


Solution:
The cumulative distribution function F (x) for any number x larger or
equal to .5 is given by
Z y
Z x
.15 e.15(y.5) dy = 1 e.15(x.5) .
f (y) dy =
F (x) =
0

Thus

1 e.15(x.5) , x .5
F (x) =
0,
elsewhere

The (100p)th percentile satisfies the equation:


p = F (p ) = 1 e.15(p .5) . Hence,
p = .5

ln(1 p)
.
.15

In particular,
a).

The median of this distribution is 5.12.

b).

The 15th percentile of this distribution is 1.58.

c).

The 85th percentile of this distribution is 13.15.

Continuous Random Variables: Part I

p. 18/34

Expected Value of a Continuous Distribution


As with discrete random variables, the expected value
of a continuous random variable is a measure of
location. That is, it gives information about what a
typical" value is. It is also regarded as the balancing
point of the distribution.
Definition 5.5:
If a continuous random variable X has for density f (x), then
the expected value is defined as:
Z
E(X) =
x f (x) dx .

provided that the integral


convergence).

|x| f (x) dx < (absolute

Continuous Random Variables: Part I

p. 19/34

Expected Value of a Continuous Distribution


Example 4.5:
The distribution of the amount of gravel (in tons) sold by a particular
construction supply company in a given week is a continuous random
variable Y with probability density function

3 (1 x2 ) , 0 x 1
2
f (x) =
0,
elsewhere
Find the expected value of X.

Solution:
E(X) =

3
3
2
x (1 x ) dy =
2
2

3
(x x ) dy = .
8
3

Hence, if gravel sales are determined week after week according to


the given probability density function, then the long run average
values of sales per week will be .375 ton.
Continuous Random Variables: Part I

p. 20/34

Joke on mean

Three statisticians went out hunting,


and came across a large deer. The
first statistician fired, but missed, by
a meter to the left. The second
statistician fired, but also missed, by
a meter to the right. The third
statistician didnt fire, but shouted in
triumph, On the average we got it!

Continuous Random Variables: Part I

p. 21/34

Expected Value of a Continuous Distribution

Theorem 5.4:
Let X be a continuous random variable with probability density function f (x) and let h(X) be any function of X. Then,
distribution function F (x).
Z


E h(X) =
h(x) f (x) dx .

In particular,
 2
E X =

x2 f (x) dx .

Continuous Random Variables: Part I

p. 22/34

Variance of a Continuous Distribution


Definition 5.6:
Let X be a continuous random variable with the probability
density function f (x) and mean E(X) = .
The variance, 2 , of the random variable X is defined as
Z


2 = V (X) = E (X )2 =
(x )2 f (x) dx .

2
In other words, V (X) = E(X ) E(X) .
The standard deviation, , of the random variable X is de
fined as = 2 .
2

Continuous Random Variables: Part I

p. 23/34

Variance of a Continuous Distribution


Example 5.6:
Example 5.5 revisited. Calculate the standard deviation
of X .

Solution:
We have
2

E(X ) =

1
0

3
2
2 3
x (1 x ) dx =
2
2

1
0

1
(x x ) dx = .
5
2

Thus,

2
1
2
V (X) = E(X ) E(X) =
5

 2
3
19
=
8
320

and = .244

Continuous Random Variables: Part I

p. 24/34

Expected Value and Variance of a Continuous Distribution

Example 5.7: Example 5.2 revisited


a).

The CPU time costs the firm $200 per hour. Find the expected
value and the standard deviation of the weekly cost for CPU time

b).

Would you expect the weekly cost to exceed $600 very often?
Why?

Solution:
a).

We have
E(X) =
2

E(X ) =

4
0
4
0

3 2
3
x. x (4 x) dx =
64
64

3
2 3 2
y . x (4 x) dx =
64
64
2

Thus, V (X) = E(X ) E(X)


=

4
5

2

4
0

32
=

12
(4x x ) dx =
5
3

4
0

32
(4x x ) dx =
.
5

12
5

2

16
=
and
25

Continuous Random Variables: Part I

p. 25/34

Expected Value and Variance of a Continuous Distribution


Let C = 200 X represents the weekly cost for CPU time. Hence,
E(C) = 200E(X) = $480
and
C = 200 = $160 .
b).

67
= 26.17% .
256
Yes it would exceed at least once in every 4 weeks on average.
P (C > 600) = 1 P (X < 3) =

Continuous Random Variables: Part I

p. 26/34

Reliability
Whenever we buy a product we do not want it to break
down or wear out for some definite period. An important
measure of the quality of a product is its reliability, or
the probability of it operating for a specified period
before it fails.
Definition 5.7:
If a component has lifetime X with distribution F, then the reliability
of the component is
R(t) = P (X > t) = 1 F (t)

Continuous Random Variables: Part I

p. 27/34

Hazard Rate Function


The hazard rate function associated with a continuous
random variable X is defined by
P (t X t + dt|X t)
r(t) = lim
dt0
dt
d
f (t)
= log R(t).
=
1 F (t)
dt

The hazard rate function is the probability of failure


during the time interval (t, t + dt) given that the
component has survived up to time t.
It can also be interpreted as the instantaneous death"
rate or rate of mortality" for subjects who have survived
up to time t if t > 0.
Continuous Random Variables: Part I

p. 28/34

Moment and Moment-Generating Functions


Moments for continuous random variables have
definitions analogous to those given for discrete random
variables.
Definition 5.8:
If X is a continuous random variable with probability density function f (x), then the kth moment about the origin of X is given by
k

k = E(X ) =

xk f (x) dx ,

k = 1, 2, . . .

Continuous Random Variables: Part I

p. 29/34

Moment and Moment-Generating Functions


Moment-Generating Function

Definition 5.9:
The moment-generating function m(t) for a continuous random
variable X with probability density function f (x) is defined to be
m(t) = E[etX ] =

etx f (x) dx .

We say that the moment-generating function for X exists if there


exists a positive constant b such that m(t) is finite for |t| b.

Continuous Random Variables: Part I

p. 30/34

Moment and Moment-Generating Functions


Two Properties
If the moment generating function of X exists, then
all moments of X existent and

n
d

(n)
n
E[X ] = MX (0) = n MX (t)
dt
t=0

The moment generating function uniquely


determines the distribution of X . In other words, if
random variables X and Y have the same moment
generating function, i.e., MX (t) = MY (t), X and Y
have the same distribution.

Continuous Random Variables: Part I

p. 31/34

Moment and Moment-Generating Functions


Theorem 5.5:
Let X be a random variable with density function f (x) and g(X)
be a function of x. Then the moment generating function for g(X)
is
tg(X)

E[e

]=

etg(x) f (x) dx .

Continuous Random Variables: Part I

p. 32/34

Joke

Never wave to your friends at an


auction.
If 75% of all accidents happen
within 5 miles of home, why not
move 10 miles away?

Continuous Random Variables: Part I

p. 33/34

Tchebysheffs Inequality
The following theorem can be used to determine the
bound for the probability that a continuous random
variable X fall in an interval k .
Theorem 5.6: Tchebysheffs Theorem
Let X be a continuous random variable with mean and finite
variance 2 . Then, for any constant k > 0,
1
P |X | < k 1 2
k


or

P |X | k

1
k2

This result applies to any probability distribution


whether it is skewed or not.
Continuous Random Variables: Part I

p. 34/34

You might also like