Download No Slide Title

Document related concepts

Central limit theorem wikipedia , lookup

Transcript
Lesson 5:
Continuous Probability
Distributions
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-1
Outline
Continuous probability distributions
Features of univariate probability distribution
Features of bivariate probability distribution
Marginal density and Conditional density
Expectation, Variance, Covariance and Correlation Coefficient
Importance of normal distribution
The normal approximation to the binomial
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-2
Types of Probability Distributions
Probability distribution may be classified according to the
number of random variables it describes.
Number of random variables
Ka-fu Wong © 2007
Joint distribution
1
Univariate probability distribution
2
Bivariate probability distribution
3
Trivariate probability distribution
…
…
n
Multivariate probability distribution
ECON1003: Analysis of Economic Data
Lesson5-3
Continuous Probability Distributions
 A continuous random variable is a variable that can assume
any value in an interval
 thickness of an item
 time required to complete a task
 temperature of a solution
 height, in inches
 These can potentially take on any value, depending only on
the ability to measure accurately.
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-4
Cumulative Distribution Function
 The cumulative distribution function, F(x), for a continuous
random variable X expresses the probability that X does not
exceed the value of x
F(x)  P(X  x)
 Let a and b be two possible values of X, with a < b. The
probability that X lies between a and b is
P(a  X  b)  F(b)  F(a)
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-5
Probability Density Function
 Let X be a random variable that takes any real values in an
interval between a and b. The number of possible outcomes are
by definition infinite.
 The main features of a probability density function f(x) are:
 P(X  (-, +)) = P(X  (a,b)) = 1.
 P(X = x) = 0.
 f(x)  0 for all x and may be larger than 1.
 The probability that X falls into an subinterval (c,d) is
d
P ( X  (c, d ))   f ( x )dx
c
and lies between 0 and 1.
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-6
The probability concepts for the discrete
case is not readily applicable….
What is the probability that a dart randomly thrown will end up
exactly in segment A (which lies on a straight line)?
Suppose the dart has equal chance to land on any point of the line.
1.
b
a
A
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-7
The probability concepts for the discrete
case is not readily applicable….
What is the probability that a dart randomly thrown will end up
exactly in segment A (which lies on a straight line)?
Suppose the dart has equal chance to land on any point of the line.
0.5.
1/2
a
b
A
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-8
The probability concepts for the discrete
case is not readily applicable….
What is the probability that a dart randomly thrown will end up
exactly in segment A (which lies on a straight line)?
Suppose the dart has equal chance to land on any point of the line.
0.25.
1/4
a
1/2
b
A
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-9
The probability concepts for the discrete
case is not readily applicable….
What is the probability that a dart randomly thrown will end up
exactly in segment A (which lies on a straight line)?
Suppose the dart has equal chance to land on any point of the line.
0.125.
1/8
a
1/4
1/2
b
A
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-10
The probability concepts for the discrete
case is not readily applicable….
What is the probability that a dart randomly thrown will end up
exactly at a point A (which lies on a straight line)?
Suppose the dart has equal chance to land on any point of the line.
0!!
a
1/8
1/4
1/2
b
A
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-11
The probability concepts for the discrete
case is not readily applicable….
What is the probability that a dart randomly thrown will end up
exactly at a point A or a point B (which lie on a straight line)?
Suppose the dart has equal chance to land on any point of the line.
0!!
Since A & B are mutually exclusive, P(A or B) = P(A) + P(B) =0.
a
A
Ka-fu Wong © 2007
1/8
1/4
1/2
b
B
ECON1003: Analysis of Economic Data
Lesson5-12
The probability concepts for the discrete
case is not readily applicable….
What is the probability that a dart randomly thrown will end up
exactly at one of the single point on the line?
Suppose the dart has equal chance to land on any point of the line.
0!!
Since for distinct points A & B are mutually exclusive, P(A or B) =
P(A) + P(B) =0.
P (one of the single point on the line) = 0 ?????
a
A
Ka-fu Wong © 2007
1/8
1/4
1/2
b
B
ECON1003: Analysis of Economic Data
Lesson5-13
The probability concepts for the discrete
case is not readily applicable….
 Would like to modify the concept of discrete probability to fit into
the case of continuous random variable!
 What do we know?
 P(X<k) should be proportional to (k-0)
 Try
 P(X<k) = (k-a)*c
 P(X<b) = (b-a)*c
Ka-fu Wong © 2007
where c is a constant.
implies
c= 1/(b-a)
ECON1003: Analysis of Economic Data
Lesson5-14
The probability concepts for the discrete
case is not readily applicable….
What is the probability that a dart randomly thrown will end up
exactly in segment A (which lies on a straight line)?
Suppose the dart has equal chance to land on any point of the line.
0.5 = (b-a)/2 * c = 1/2.
Probability is simply the area
C=1/(b-a)
1/2
a
b
A
c is called the probability density.
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-15
The probability concepts for the discrete
case is not readily applicable….
In discrete case, E(X) = ∑X X P(X).
In continuous case, P(X) =0 for any point of X. How do we
compute E(X) then?
Split the domain into n equal parts, so that the width of these n interval
is dx=(b-a)/n. In each of these n intervals, the probability is well define.
Then, take the left boundary value of each of this n intervals, multiply
by the probability for the interval. Then, we have a weighted average
similar to the discrete case.
E(X)= a*dx*c + (a+dx)*dx*c+ (a+2dx)*dx*c+ … +(a+(n-1)dx)*dx*c
c
a
Ka-fu Wong © 2007
b
dx
ECON1003: Analysis of Economic Data
Lesson5-16
The probability concepts for the discrete
case is not readily applicable….
E(X)= a*dx*c + (a+dx)*dx*c+ (a+2dx)*dx*c+ … +(a+(n-1)dx)*dx*c
However, it is an approximation because a is only an approximate
of the points within the interval (a, a+dx).
Approximation improves if dx is made smaller, or n larger. That is,
when dx is very very very closed to zero (but still positive),
E(X)= limn-> [a*dx*c + (a+dx)*dx*c +… +(a+(n-1)dx)*dx*c]
= limn-> ∑i [xi*dx*c ]
b
=limdx->0 ∑i [xi*dx*c ]
E(X)   x[cdx]
a
c
a
Ka-fu Wong © 2007
xi
dx
xi+dx
ECON1003: Analysis of Economic Data
b
Lesson5-17
The probability concepts for the discrete
case is not readily applicable….
 What if we want to allow it more likely for the dart to end up in
some segment of the line (say, the middle segment)?
c2
c1
c1
a
1/4
3/4
b
We can do it as long as we have the areas added up to 1:
¼*c1 + ½*c2 + ¼*c1 = 1.
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-18
The probability concepts for the discrete
case is not readily applicable….
 What is we want to allow it is more likely for the dart to end up in some
segment of the line (say, the middle segment)?
c2
c1
c1
b
a
3/4
1/4
It is better to define the density “function” to allow the density to vary
with x in a general way.
b
f(x) = c1 if x in (a, a+1/4)
E(X)   x[ f ( x)dx]
= c2 if x in (a+1/4, a+3/4)
a
= c3 if x in (a+3/4, b)
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-19
Probability as an area
Shaded area under the curve is the probability that X is
between c and d
d
P(c  x  d )   f(x)dx
f(x)
c

E( X ) 
 xf(x)dx

c
Ka-fu Wong © 2007
d
ECON1003: Analysis of Economic Data
x
Lesson5-20
Probability Density Function
 The cumulative density function F(x0) is the area under the
probability density function f(x) from the minimum x value (a)
up to x0
F(x0 ) 
Ka-fu Wong © 2007
x0
x0
a

 f(x)dx   f(x)dx
ECON1003: Analysis of Economic Data
Lesson5-21
Expectations for Continuous Random
Variables

The mean of X, denoted μX , is defined as the expected value of
X

μ X  E(X) 
 xf(x)dx
-

The variance of X, denoted σX2 , is defined as the expectation of
the squared deviation, (X - μX)2, of a random variable from its
mean

σ X2  E[(X  μ X )2 ]   (x  μ X )2 f(x)dx

Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-22
Linear Functions of Variables
 Let W = a + bX , where X has mean μX and variance σX2 , and
a and b are constants
 Then the mean of W is
E(W) = E(a+bX) = a + bE(X) = a + b μX
 the variance is
Var(W) = Var(a+bX) = b2Var(X) = b2σX2
 the standard deviation of W is
|b|σX
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-23
Linear Functions of Variables
 An important special case of the previous results is the
standardized random variable
Z =( X- μX ) /σX
which has a mean 0 and variance 1
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-24
The Univariate Uniform Distribution
If c and d are numbers on the real line, the random variable X
~ U(c,d), i.e., has a univariate uniform distribution if
 1

f(x) =  d - c
0
for c  x  d
otherwise
The mean and standard deviation of a uniform random variable
x are
X 
Ka-fu Wong © 2007
cd
2
and  X 
d c
12
ECON1003: Analysis of Economic Data
Lesson5-25
The Uniform Density
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-26
Learning exercise 4:
Part-time Work on Campus
8
 A student has been offered part-time work in a laboratory.
The professor says that the work will vary from week to
week. The number of hours will be between 10 and 20
with a uniform probability density function, represented
as follows:
 How tall is the rectangle?
 What is the probability of
getting less than 15 hours
in a week?
 Given that the student gets
at least 15 hours in a week,
what is the probability that
more than 17.5 hours will
10
12
14
16
18
20
22
be available?
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-27
Learning exercise 4:
Part-time Work on Campus
8
10
12
14
16
18
20
P(hour>17.5)/P(hour>15)
Ka-fu Wong © 2007
22
 How tall is the rectangle?
 (20-10)*h = 1
 h=0.1
 What is the probability of
getting less than 15 hours in
a week?
 0.1*(15-10) = 0.5
 Given that the student gets
at least 15 hours in a week,
what is the probability that
more than 17.5 hours will
be available?
 0.1*(20-17.5) = 0.25
 0.25/0.5 = 0.5
ECON1003: Analysis of Economic Data
Lesson5-28
The Normal Distribution
Probability
Distributions
Continuous
Probability
Distributions
Uniform
Normal
Exponential
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-29
Normal Distribution N(,2)
 ‘Bell Shaped’
f(x)
 Symmetrical
 Mean, Median and Mode
are Equal
Location is determined by the mean,
μ
Spread is determined by the
standard deviation, σ
The random variable has an infinite
theoretical range:
+  to  
σ
x
μ
Mean
= Median
= Mode
The normal probability distribution is asymptotic. That is the
curve gets closer and closer to the X-axis but never actually
touches it.
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-30
The Normal Distribution N(,2)

The normal distribution closely approximates the probability
distributions of a wide range of random variables

Distributions of sample means approach a normal distribution
given a “large” sample size

Computations of probabilities are direct and elegant

The normal probability distribution has led to good business
decisions for a number of applications

Sum of normal random variables remain normal.

Normal distribution is completely characterized by two
parameters, mean and variance.
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-31
N(,2)
Changing  shifts the location of the distribution.
Changing 2 changes the dispersion.
x
(a)
x
(b)
Ka-fu Wong © 2007
(c)
ECON1003: Analysis of Economic Data
x
Lesson5-32
The Normal Probability Distribution
The random variable X ~ N(,2), i.e., has a univariate
normal distribution if for all x on the real line (-,+ )
1
f(x) =
e
 2
1 x - 
2 





2
 and  are the mean and standard deviation,  = 3.14159 …
and e = 2.71828 is the base of natural or Naperian
logarithms.
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-33
Normal Distribution Probability
Probability is the area
under the curve!
A table may be
constructed to help us find
the probability
f(X)
c
Ka-fu Wong © 2007
d
X
ECON1003: Analysis of Economic Data
Lesson5-34
Moments of Standard Normal Random
Variables N(0, 1)





Mean=0
Variance =1
Skewness = 0
Kurtosis = 3
Excess kurtosis =0
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-35
Infinite Number of Normal Distribution
Tables
Normal distributions differ by mean &
standard deviation.
f(X)
Each distribution would require
its own table.
X
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-36
The Standard Normal Probability
Distribution -- N(0,1)
 The standard normal distribution is a normal distribution with a
mean of 0 and a standard deviation of 1.
 It is also called the z distribution.
 A z-value is the distance between a selected value, designated X,
and the population mean , divided by the population standard
deviation, . The formula is:
Z 
X 

1
 X   1
E (Z )  E
  E( X   )  [E( X )   ]  0

   
1
 X   1
Var ( Z )  Var 
  2 Var ( X   )  2 Var ( X )  1

   
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
The Standard Normal Probability
Distribution
 Any normal random variable can be transformed to a standard
normal random variable
 Suppose X ~ N(µ, 2)
 Z=(X-µ)/  ~ N(0,1)
 P(X<k) = P [(X-µ)/  < (k-µ)/  ]
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Standardize the Normal Distribution
Z  X 
Normal
Distribution



Standardized Normal
Distribution
X
 =1
0
Z
Because we can transform any normal random variable into
standard normal random variable, we need only one table!
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-39
Standardizing Example
Normal distribution
N(5,100)
 = 5,  = 10
5
6.2
Standardized Normal
Distribution N(0,1)
 = 0,  = 1
X
Z  X    5 5  0

10
0
.12
Z
Z  X    6.25  0.12

10
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-40
Obtaining the Probability
Standardized Normal Probability
Table (Portion)
Z
.00
.01
 =1
.02
0.0 .0000 .0040 .0080
0.0478
0.1 .0398 .0438 .0478
0.2 .0793 .0832 .0871
0
0.3 .1179 .1217 .1255
Probabilities
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
0.12
Z
Shaded Area
Exaggerated
Lesson5-41
Example P(3.8  X  5)
Z  X    3.85  0.12

10
Normal
Distribution

Standardized Normal
Distribution
= 10
0.0478
3.8

=5
X
-0.12
0
Z
Shaded Area Exaggerated
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-42
Example (2.9  X  7.1)
Z  X    2.95 0.21

10
Z  X    7.15 0.21

10
Normal
Distribution

Standardized Normal
Distribution
= 10
.1664
.0832 .0832
2.9
5
7.1
X
-.21
0
.21
Z
Shaded Area Exaggerated
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-43
Example P(X  8)
Normal
Distribution

Z  X    85 0.30

10
Standardized Normal
Distribution
= 10
.5000
.3821
.1179
 =5
8
X
0
.30
Z
Shaded Area Exaggerated
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-44
Example P(7.1  X  8)
Normal
Distribution

Z  X    7.15 0.21

10
Z  X    85 0.3

10
Standardized Normal
Distribution
= 10
.1179
.0347
.0832
 =5
7.1
8 X
0
.21 .30 Z
Shaded Area Exaggerated
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-45
Normal Distribution Thinking Challenge
 You work in Quality Control for GE. Light bulb life has a
normal distribution with µ= 2000 hours &  = 200 hours.
What’s the probability that a bulb will last
 between 2000 & 2400 hours?
 less than 1470 hours?
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-46
Solution P(2000  X  2400)
P(2000<X<2400)
= P [(2000-µ)/  <(X-µ)/  < (2400-µ)/  ]
= P[(X-µ)/  < (2400-µ)/  ] – P [(X-µ)/  < (2000-µ)/  ]
= P[(X-µ)/  < (2400-µ)/  ] – 0.5
Normal
Distribution

Z  X μ  2400 20002.0
σ
200
Standardized Normal
Distribution
= 200
.4772
 = 2000
2400
X
0
2.0
Z
Shaded Area Exaggerated
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-47
Solution P(X  1470)
P(X<1470) = P [(X-µ)/  < (1470-µ)/  ]
Normal
Distribution

Z  X μ 1470 2000 2.65
σ
Standardized Normal
200
Distribution
= 200
.5000
.4960
.0040
1470
 = 2000
X
-2.65
0
Z
Shaded Area Exaggerated
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-48
Finding Z Values for Known Probabilities
What Is Z Given
P(Z) = 0.1217?

.1217

Z
=0
Z
.31
Standardized Normal Probability
Table (Portion)
=1
Z
Z
.00
.01
.02
0.0
.0000
.0040
.0080
0.1 .0398
.0438
.0478
0.2 .0793
.0832
.0871
.1179
.1217
.1255
0.3
Shaded Area Exaggerated
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-49
Finding X Values for Known Probabilities
Normal Distribution
Standardized Normal Distribution
 = 10
Z =1
.1217

=5
?
X
.1217
Z =0
.31
Z
X    Z  5(0.31)108.1
Shaded Area Exaggerated
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-50
EXAMPLE 1
 The bi-monthly starting salaries of recent MBA graduates follows
the normal distribution with a mean of $20,000 and a standard
deviation of $2,000. What is the z-value for a salary of $24,000?
z

Ka-fu Wong © 2007
X 

$24,000  $20,000
 2.00
$2000
ECON1003: Analysis of Economic Data
Lesson5-51
EXAMPLE 1
continued
 What is the z-value of $17,000 ?
z
X 

$17,000  $20,000

 1.50
$2000
 A z-value of 2 indicates that the value of $24,000 is 2
standard deviation above the mean of $20,000.
 A z-value of –1.50 indicates that $17,000 is 1.5 standard
deviation below the mean of $20,000.
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-52
Areas Under the Normal Curve
 About 68 percent of the area under the normal curve is
within one standard deviation of the mean.  ± 
 P( -  < X <  + ) = 0.6826
 About 95 percent is within two standard deviations of the
mean.
±2
 P( - 2  < X <  + 2 ) = 0.9544
 Practically all is within three standard deviations of the
mean.
±3
 P( - 3  < X <  + 3 ) = 0.9974
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-53
EXAMPLE 2
 The daily water usage per person in New Providence, New
Jersey is normally distributed with a mean of 20 gallons
and a standard deviation of 5 gallons.
 About 68 percent of those living in New Providence will use
how many gallons of water?
 About 68% of the daily water usage will lie between 15
and 25 gallons.
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-54
EXAMPLE 2
continued
 What is the probability that a person from New
Providence selected at random will use between 20
and 24 gallons per day?
X  
20  20
z 

 0.00

5
z 
X 


24  20
 0.80
5
P(20<X<24)
=P[(20-20)/5 < (X-20)/5 < (24-20)/5 ] =P[ 0<Z<0.8 ]
The area under a normal curve between a z-value of 0
and a z-value of 0.80 is 0.2881.
We conclude that 28.81 percent of the residents use
between 20 and 24 gallons of water per day.
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-55
How do we find P(0<z<0.8)
P(0<z<c)
P(z<c)
c
P(0<z<0.8)
= P(z<0.8) – P(z<0)
=0.7881 – 0.5
=0.2881
Ka-fu Wong © 2007
0
c
P(0<z<0.8)
= 0.2881
ECON1003: Analysis of Economic Data
Lesson5-56
EXAMPLE 2
continued
 What percent of the population use between 18 and 26
gallons of water per day?
z 
z 
X 
18  20

 0.40
5
X 
26  20

 1.20
5


 Suppose X ~ N(µ,  2)
 Z=(X-µ)/  ~ N(0,1)
 P(X<k) = P [(X-µ)/  < (k-µ)/  ]
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-57
How do we find P(-0.4<z<1.2)
P(0<z<c)
P(z<c)
c
P(-0.4<z<1.2)
= P(z<1.2) - P(z<-0.4)
= P(z<1.2) - P(z>0.4)
= P(z<1.2) – [1- P(z<0.4)]
=0.8849 – [1- 0.6554]
=0.5403
0
c
P(-0.4<z<1.2)
= P(-0.4<z<0) + P(0<z<1.2)
=P(0<z<0.4) + P(0<z<1.2)
=0.1554+0.3849
=0.5403
P(-0.4<z<0) =P(0<z<0.4) because of symmetry of the z distribution.
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-58
Finding the X value for a Known Probability
 Steps to find the X value for a known probability:
1. Find the Z value for the known probability
2. Convert to X units using the formula:
X  μ  Zσ
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-59
Finding the X value for a Known Probability
Example:
 Suppose X is normal with mean 8.0 and standard deviation 5.0.
 Now find the X value so that only 20% of all values are below this
X
.20
?
?
Ka-fu Wong © 2007
8.0
0
ECON1003: Analysis of Economic Data
X
Z
Lesson5-60
Find the Z value for
20% in the Lower Tail
1. Find the Z value for the known probability
Standardized Normal Probability  20% area in the lower tail is
consistent with a Z value of Table (Portion)
0.84
z
F(z)
.82
.7939
.83
.7967
.84
.7995
.85
Ka-fu Wong © 2007
.8023
.80
.20
?
8.0
-0.84 0
ECON1003: Analysis of Economic Data
X
Z
Lesson5-61
Finding the X value
2. Convert to X units using the formula:
X  μ  Zσ
 8.0  (  0.84 )5.0
 3.80
So 20% of the values from a distribution with mean 8.0 and
standard deviation 5.0 are less than 3.80
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-62
EXAMPLE 3
 Professor Mann has determined that the scores in his
statistics course are approximately normally distributed
with a mean of 72 and a standard deviation of 5. He
announces to the class that the top 15 percent of the
scores will earn an A.
 What is the lowest score a student can earn and still
receive an A?
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-63
Example 3
continued
 To begin let k be the score that separates an A from a B.
 15 percent of the students score more than k, then 35
percent must score between the mean of 72 and k.
 Write down the relation between k and the probability:
 P(X>k) = 0.15 and P(X<k) =1-P(X>k) = 0.85
 Transform X into z:
 P[(X-72)/5) < (k-72)/5 ] = P[z < (k-72)/5]
 P[0<z < s] =0.85 -0.5 = 0.35
0.35
0.15
Ka-fu Wong © 2007
72
0
ECON1003: Analysis of Economic Data
k
X
?
Z
Lesson5-64
Example 3
continued
 Find s from table:
 P[0<z<1.04]=0.35
 Compute k:
 (k-72)/5=1.04 implies K=77.2
0.35
72
0
0.15
77.2
X
1.04
Z
Those with a score of 77.2 or more earn an A.
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-65
How do we know that the data are likely
drawn from normal?
1. Check the moments
 Skewness =0
 Excess Kurtosis = 0
(For instance, refer to section 16.7 “Tests for Skewness and Excess
Kurtosis”, p.567 of Estimation and Inference in Econometrics by
Davidson and MacKinnon)
2. Normal probability plot
1. Suppose we have n observations in the sample.
 Sort them in ascending order.
 Compute the empirical z value (i.e., (x-mx)/sx)
2. Generate a column 0.5, 1.5, …..,[ 0.5+(n-1)]. Call this column U.
3. Generate another column p(z) = U/n.
4. Generate another column theoretical z = NORMSINV(p(z))
5. Plot empirical z against the theoretical z.
6. If the data has normal distribution, the plot should be a straight line.
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-66
Normal Probability Plot
(The data are generated from a normal distribution.)
3.5
3
2.5
2
z value from data
1.5
1
0.5
0
-0.5
-1
-1.5
-2
-2.5
-3
-3.5
-3.5
-3
-2.5
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
2.5
3
3.5
Theoretical z value
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-67
Normal Probability Plot
(The data are generated from a uniform distribution.)
3.5
3
2.5
2
z value from data
1.5
1
0.5
0
-0.5
-1
-1.5
-2
-2.5
-3
-3.5
-3.5
-3
-2.5
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
2.5
3
3.5
Theoretical z value
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-68
The Normal Approximation to the
Binomial
 The normal distribution (a continuous distribution) yields a
good approximation of the binomial distribution (a discrete
distribution) for large values of n (number of trials).
 The normal probability distribution is generally a good
approximation to the binomial probability distribution
when n  and n(1-  ) are both greater than 5.
Why can we approximate binomial by normal?
Because of the Central Limit Theorem.
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-69
Normal Distribution Approximation for
Binomial Distribution
 Recall the binomial distribution:
 n independent trials
 probability of success on any given trial = P
 Random variable X:
 Xi =1 if the ith trial is “success”
 Xi =0 if the ith trial is “failure”
E(X)  μ  nP
Var(X)  σ 2  nP(1- P)
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-70
Normal Distribution Approximation for
Binomial Distribution
 The shape of the binomial distribution is approximately normal
if n is large
 The normal is a good approximation to the binomial when
nP(1 – P) > 9
 Standardize to Z from a binomial distribution:
Z
Ka-fu Wong © 2007
X  E(X)
X  np

Var(X)
nP(1  P)
ECON1003: Analysis of Economic Data
Lesson5-71
Normal Distribution Approximation for
Binomial Distribution
 Let X be the number of successes from n independent trials, each
with probability of success P.
 If nP(1 - P) > 9,
 a  nP

b

nP

P(a  X  b)  P
Z
 nP(1  P)

nP(1

P)


Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-72
Binomial Approximation Example
 40% of all voters support ballot proposition A. What is the probability
that between 76 and 80 voters indicate support in a sample of n =
200 ?
 E(X) = µ = nP = 200(0.40) = 80
 Var(X) = σ2 = nP(1 – P) = 200(0.40)(1 – 0.40) = 48
( note: nP(1 – P) = 48 > 9 )


76  80
80  80

P(76  X  80)  P
Z
200(0.4)(1  0.4) 
 200(0.4)(1  0.4)
 P(0.58  Z  0)
 F(0)  F(0.58)
 0.5000  0.2810  0.2190
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-73
The Exponential Distribution
 Used to model the length of time between two occurrences of an
event (the time between arrivals)
 Examples:
Time between trucks arriving at an unloading dock
Time between transactions at an ATM Machine
Time between phone calls to the main operator
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-74
The Exponential Distribution
 The exponential random variable T (t>0) has a probability density function
f(t)  λe  λt for t  0
 Where
  is the mean number of occurrences per unit time
 t is the length of time until the next occurrence
 e = 2.71828
 T is said to follow an exponential probability distribution
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-75
The Exponential Distribution
 Defined by a single parameter, its mean  (lambda)
 The cumulative distribution function (the probability that an arrival
time is less than some specified time t) is
F(t)  1  e  λt
where e = mathematical constant approximated by 2.71828
 = the population mean number of arrivals per unit
t = any value of the continuous variable where t > 0
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-76
Exponential Distribution
Example
Example: Customers arrive at the service counter at the rate of 15
per hour. What is the probability that the arrival time between
consecutive customers is less than three minutes?

The mean number of arrivals per hour is 15, so  = 15

Three minutes is .05 hours

P(arrival time < .05) = 1 – e- X = 1 – e-(15)(.05) = 0.5276

So there is a 52.76% probability that the arrival time between
successive customers is less than three minutes
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-77
Joint Cumulative Distribution Functions

Let X1, X2, . . .Xk be continuous random variables

Their joint cumulative distribution function,
F(x1, x2, . . .xk)
defines the probability that simultaneously X1 is less than x1, X2
is less than x2, and so on; that is
F(x1 , x 2 ,..., x k )  P(X1  x1, X2  x 2 ,..., Xk  x k )
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-78
Joint Cumulative Distribution Functions

The cumulative distribution functions
F(x1), F(x2), . . .,F(xk)
of the individual random variables are called their marginal
distribution functions

The random variables are independent if and only if
F(x1 , x 2 ,..., x k )  F(x1 )F(x 2 )...F(x k )
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-79
Features of a Bivariate Continuous
Distribution
 Let X1 and X2 be a random variables that takes any real values in a
region (rectangle) of (a,b,c,d). The number of possible outcomes
are by definition infinite.
 The main features of a probability density function f(x1,x2) are:
 f(x1,x2)  0 for all (x1,x2) and may be larger than 1.
 The probability that (X1,X2) falls into a region (rectangle) or
(p,q,r,s) is
s
q
r
p
P (( X 1, X 2 )  ( p, q, r , s ))    f ( x1, x 2 )dx1dx2
and lies between 0 and 1.
 P((X1,X2)  (a,b,c,d)) = 1.
 P((X1,X2) = (x1,x2) ) = 0.
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-80
The Bivariate Uniform Distribution
If a, b, c and d are numbers on the real line, , the
random variable (X1,X2) ~ U(a,b,c,d), i.e., has a
bivariate uniform distribution if
1

for a  x1  b and c  x 2  d

f(x1, x 2 ) = (b - a)(d - c)
0
otherwise

Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-81
The Marginal Density
 The marginal density functions are:

f(y) 
 f(x,y)dx


f(x) 
 f(x,y)dy

Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-82
The Conditional Density
 The conditional density functions are:
f(x|y)  f(x,y)/f(y)
f(y|x)  f(x,y)/f(x)
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-83
The Expectation (Mean) of Continuous
Probability Distribution
 For univariate probability distribution, the expectation or
mean E(X) is computed by the formula:

E(X) 
 xf(x)dx

 For bivariate probability distribution, the the expectation
or mean E(X) is computed by the formula:
E(X) 
Ka-fu Wong © 2007




  xf(x,y)dx dy
ECON1003: Analysis of Economic Data
Lesson5-84
Conditional Mean of Bivariate Discrete
Probability Distribution
 For bivariate probability distribution, the conditional
expectation or conditional mean E(X|Y) is computed by
the formula:

E(X|Y  y) 
 xf(x|y)dx

 Unconditional expectation or mean of X, E(X)

E(X) 

  xf(x|y)dx f(y)dy
 
 E[E(X|Y)]
 E[μ X ]
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-85
Expectation of a linear transformed
random variable
 If a and b are constants and X is a random variable, then
E(a) = a
E(bX) = bE(X)
E(a+bX) = a+bE(X)

E(a  bx)   (a  bx) f(a  bx) dx



 (a  bx) f(x) dx






 a f(x) dx   bx f(x) dx




 a  f(x) dx  b  x f(x) dx
 a  bE(x)
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-86
The Variance of a Continuous Probability
Distribution
 For univariate continuous probability distribution

Var(X)  E[(X  μ)2 ] 
2
(X

μ)
f(x)dx

-
 If a and b are constants and X is a random variable, then
Var(a) = 0
Var(bX) = b2Var(X)
Var(a+bX) = b2Var(X)
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-87
The Covariance of a Bivariate Discrete
Probability Distribution
Covariance measures how two random variables co-vary.
 
Cov(X,Y)  E[(X  μ X )(Y  μY )] 
  (X  μ
X
)(Y  μY )f ( x, y )dxdy
 
 If a and b are constants and X is a random variable, then
Cov(a,b) = 0
Cov(a,bX) = 0
Cov(a+bX,Y) = bCov(X,Y)
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-88
Correlation coefficient
 The strength of the dependence between X and Y is
measured by the correlation coefficient:
Cov(X,Y)
Corr(X,Y) 
Var(X)Var(Y)
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-89
Variance of a sum of random variables
 If a and b are constants and X and Y are random variables,
then
Var(X+Y) = Var(X) + Var(Y) + 2Cov(X,Y)
Var(X  Y)  E[ X  Y  (μ X  μY ) ] 2
 E[ (X  μ X )  (Y  μY )] 2
 E[ (X  μ X ) 2  (Y  μY )2  2(X  μ X )(Y  μY )]
 E[ (X  μ X ) 2 ]  E[(Y  μY )2  2 E[(X  μ X )(Y  μY )]
 Var(X)  Var(Y)  2Cov(X,Y)
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-90
Variance of a sum of random variables
 If a and b are constants and X and Y are random variables,
then
Var(aX+bY) =a2Var(X) + b2Var(Y) + 2abCov(X,Y)
Var(aX  bY)  E[ aX  bY  (aμ X  bμY ) ] 2
 E[ (aX  aμ X )  (bY  bμY )] 2
 E[ a 2 (X  μ X ) 2  b 2 (Y  μY )2  2(aX  aμ X )(bY  bμY )]
 a 2 E[ (X  μ X ) 2 ]  b 2 E[(Y  μY )2  2abE[(X  μ X )(Y  μY )]
 a 2Var(X)  b 2Var(Y)  2abCov(X,Y)
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-91
Sums of Random Variables


Let X1, X2, . . .Xk be k random variables with
 means μ1, μ2,. . . μk and
 variances σ12, σ22,. . ., σk2.
Then, the mean of their sum is the sum of their means
E(X 1  X 2  ...  X k )  μ1  μ2  ...  μk
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-92
Sums of Random Variables


Let X1, X2, . . .Xk be k random variables with
 means μ1, μ2,. . . μk and
 variances σ12, σ22,. . ., σk2.
Then:

If the covariance between every pair of these random variables is 0,
then the variance of their sum is the sum of their variances
Var(X 1  X 2  ...  X k )  σ12  σ 22  ...  σ 2k

However, if the covariances between pairs of random variables are
not 0, the variance of their sum is
K 1 K
Var(X 1  X 2  ...  X k )  σ  σ  ...  σ  2  Cov(X i , X j )
2
1
Ka-fu Wong © 2007
2
2
ECON1003: Analysis of Economic Data
2
k
i 1 ji 1
Lesson5-93
Differences Between Two Random Variables
For two random variables, X and Y

The mean of their difference is the difference of their means; that is
E(X  Y)  μX  μY

If the covariance between X and Y is 0, then the variance of their
difference is
Var(X  Y)  σ 2X  σ 2Y

If the covariance between X and Y is not 0, then the variance of their
difference is
Var(X  Y)  σ 2X  σ 2Y  2Cov(X, Y)
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-94
Linear Combinations of Random Variables
 A linear combination of two random variables, X and Y, (where a
and b are constants) is
W  aX  bY
 The mean of W is
μW  E[W]  E[aX  bY]  aμX  bμY
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-95
Linear Combinations of Random Variables
 The variance of W is
σ 2W  a2σ 2X  b2σ 2Y  2abCov(X, Y)
 Or using the correlation,
σ 2W  a2σ 2X  b2σ 2Y  2abCorr(X, Y)σ Xσ Y
 If both X and Y are joint normally distributed random variables
then the linear combination, W, is also normally distributed
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-96
Example
 Two tasks must be performed by the same worker.
 X = minutes to complete task 1; μx = 20, σx = 5
 Y = minutes to complete task 2; μy = 20, σy = 5
 X and Y are normally distributed and independent
 What is the mean and standard deviation of the time to complete both tasks?
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-97
Example
 X = minutes to complete task 1; μx = 20, σx = 5
 Y = minutes to complete task 2; μy = 30, σy = 8
 What are the mean and standard deviation for the time to complete
both tasks?
W  XY
μW  μX  μY  20  30  50
 Since X and Y are independent, Cov(X,Y) = 0, so
σ 2W  σ 2X  σ 2Y  2Cov(X, Y)  (5)2  (8)2  89
 The standard deviation is
σW 
Ka-fu Wong © 2007
89  9.434
ECON1003: Analysis of Economic Data
Lesson5-98
Lesson 5:
Continuous Probability Distributions
- END -
Ka-fu Wong © 2007
ECON1003: Analysis of Economic Data
Lesson5-99