Expected Value - Continuous Variables Uniform and Normal

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Continuous Random Variables and Probability Distributions

Let X be a continuous rv. Then a probability distribution or probability den-


sity function (pdf) of X is a function f(x) such that for any two numbers a and
b with a # b,
b
P(a # X # b) 5 # f(x)dx
a

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, as illustrated
in Figure. The graph of f(x) is often referred to as the density curve.

f(x)

x
a b

P (a # X # b) 5 the area under the density curve between a and b

Suppose X is a continuous random variable if there exists a nonnegative function


f (x), defined for all real x ∈ (−∞, ∞), having the property that for any set B of real
numbers


P {X ∈ B} = f (x) dx
B

The function f (x) is called the probability density function of the random variable X.
In words, we state that the probability that X will be in B may be obtained by
integrating the probability density function over the set B.

Note that:

 ∞  a
1 = P {X ∈ (−∞, ∞)} = f (x) dx P {X = a} = f (x) dx = 0
−∞ a

DEFINITION The cumulative distribution function F(x) for a continuous rv X is defined


for every number x by
x
F(x) 5 P(X # x) 5 #
2`
f(y) dy

For each x, F(x) is the area under the density curve to the left of x.
PROPOSITION Let X be a continuous rv with pdf f (x) and cdf F(x). Then for any number a,
P(X . a) 5 1 2 F(a)
and for any two numbers a and b with a , b,
P(a # X # b) 5 F(b) 2 F(a)

f (x) F (x)
F(8) 1
F(8)

.5

x x
5 10 5 10
8 8

EXAMPLE The direction of an imperfection with respect to a reference line on a circular object
such as a tire, brake rotor, or flywheel is, in general, subject to uncertainty. Consider
the reference line connecting the valve stem on a tire to the center point, and let X
be the angle measured clockwise to the location of an imperfection. One possible
pdf for X is

1
f(x) 5
5 360
0
0 # x , 360

otherwise

Clearly f(x) $ 0. The area under the density curve is just the area of a rectangle:
(height)(base) 5 (1/360)(360) 5 1.
The probability that the angle is between 908 and 1808 is
180 x5180
1 x 1
P(90 # X # 180) 5 # 90 360
dx 5
360 u x590
5
4
5 .25

The probability that the angle of occurrence is within 908 of the reference line is
P(0 # X # 90) 1 P(270 # X , 360) 5 .25 1 .25 5 .50

f(x) f(x)

Shaded area 5 P(90 # X #180)


1
360

x x
0 360 90 180 270 360
The Uniform Random Variable
X is a uniform random variable on the interval (α, β) if its probability density
function is given by


1 ⎨
, if α < x < β
f (x) = β − α

0, otherwise

To calculate the cumulative distribution function of a random variable uniformly


distributed over (α, β):
a
F (a) = −∞ f (x) dx

⎪ 0, a≤α

⎨a −α
F (a) = , α<a<β

⎪ β −α

1, a≥β

Expectation of a Uniform Random Variable: Calculate the expectation of a random


variable uniformly distributed over (α, β).

β 2 − α2
β
E[X] =
x β +α
β −α
dx = =
α 2(β − α) 2

Or, in other words, the expected value of a uniform [α, β] random variable is equal to the
midpoint of the interval [α, β], which is clearly what one would expect. (Why?)
The variance is computed as follows.
 β
2 1
E [X ] = x 2 dx
β −α α
β −α
3 3
=
3(β − α)
β 2 + αβ + α 2
=
3
and so
 2
β 2 + αβ + α 2 α+β
Var(X ) = −
3 2
α 2 + β 2 − 2αβ
=
12
(β − α)2
=
12
EXAMPLE “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 5 the time headway for two randomly chosen consecutive cars on a
freeway during a period of heavy flow. The following pdf of X is essentially the one
suggested in “The Statistical Properties of Freeway Traffic” (Transp. Res., vol.
11: 221–228):

.15e 2.15(x2.5) x $ .5
f(x) 5 5 0 otherwise
Normal Random Variables
We say that X is a normal random variable (or simply that X is normally distributed)
with parameters μ and σ 2 if the density of X is given by

1 2 /2σ 2
f (x) = √ e−(x−μ) , −∞ < x < ∞
2π σ
This density function is a bell-shaped curve that is symmetric around μ.

Expectation of a Normal Random Variable. Calculate E[X] when X is normally


distributed with parameters μ and σ 2.

 ∞
1 2 /2σ 2
E[X] = √ xe−(x−μ) dx
2πσ −∞

Writing x as (x − μ) + μ yields
 ∞  ∞
1 2 /2σ 2 1 2 /2σ 2
E[X] = √ (x − μ)e−(x−μ) dx + μ √ e−(x−μ) dx
2πσ −∞ 2πσ −∞

Letting y = x − μ leads to
 ∞  ∞
1 −y 2 /2σ 2
E[X] = √ ye dy + μ f (x) dx
2πσ −∞ −∞

where f (x) is the normal density. By symmetry, the first integral must be 0, and so
 ∞
E[X] = μ f (x) dx = μ
−∞
Variance of the Normal Random Variable. Let X be normally distributed with
parameters μ and σ 2. Find Var(X).

Recalling that E[X] = μ, we have that

Var(X) = E[(X − μ)2 ]


 ∞
1 2 2
=√ (x − μ)2 e−(x−μ) /2σ dx
2πσ −∞
Substituting y = (x − μ)/σ yields
 ∞
σ2 2
Var(X) = √ y 2 e−y /2 dy
2π −∞

2 /2
Integrating by parts (u = y, dv = ye−y dy) gives
   ∞ 
σ2 2 ∞ 2
Var(X) = √ −ye−y /2  + e−y /2 dy
2π −∞ −∞
2  ∞
σ 2
=√ e−y /2 dy
2π −∞
=σ2
Suppose that X is continuous with density f, and let E[X] = μ. 

Then,
Var(X) = E[(X − μ)2 ]
= E [X 2 − 2μX + μ2 ]
 ∞
= (x 2 − 2μx + μ2 )f (x) dx
−∞
 ∞  ∞  ∞
= x 2 f (x) dx − 2μ xf (x) dx + μ2 f (x) dx
−∞ −∞ −∞
= E[X ] − 2μμ + μ2
2

= E[X 2 ] − μ2

A similar proof holds in the discrete case, and so we obtain the useful identity

Var(X) = E[X 2 ] − (E[X])2

Shaded area 5 F(z)

Standard normal (z) curve

0 z
EXAMPLE Let’s determine the following standard normal probabilities: (a) P(Z # 1.25),
(b) P(Z . 1.25), (c) P(Z # 21.25), (d) P(2.38 # Z # 1.25), and (e) P(Z # 5).

EXAMPLE The time that it takes a driver to react to the brake lights on a decelerating vehi cle
is critical in helping to avoid rear-end collisions. The article “Fast-Rise Brake
Lamp as a Collision-Prevention Device” (Ergonomics, 1993: 391–395) sug-
gests that reaction time for an in-traffic response to a brake signal from stand-
ard brake lights can be modeled with a normal distribution having mean value
1.25 sec and standard deviation of .46 sec. What is the probability that reaction
time is between 1.00 sec and 1.75 sec?
Continuous Probability density function, Moment Mean Variance
probability f (x) generating
distribution function, φ(t)

⎨ 1 etb − eta a+b (b − a)2
, a<x<b
Uniform f (x) = b − a
⎩0, otherwise t (b − a) 2 12
over (a, b)

λe−λx , x ≥ 0 λ 1 1
Exponential f (x) =
0, x<0 λ−t λ λ2
with
parameter
λ>0
⎧ −λx
⎨ λe (λx)n−1  n
, x≥0 λ n n
Gamma f (x) = (n − 1)!
⎩ λ−t λ λ2
with 0, x<0
parameters
(n, λ), λ > 0  
1 σ 2t 2
Normal with f (x) = √ exp μt + μ σ2
2πσ 2
parameters
(μ, σ 2 ) × exp{−(x − μ)2 /2σ 2 },
−∞ < x < ∞

You might also like