5 Continuous Probabilities

You might also like

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

DAO1704/DSC1007 Lecture 5

Continuous Probability Distributions


Continuous Probability Distributions

• Continuous Random Variables


• Probability Density Function
• Uniform Distribution
• Cumulative Distribution Function
• Exponential Distribution
• Normal Distribution
• Computing Probabilities for Normal Distribution
• Sum of Normally Distributed R.V.s
• Central Limit Theorem
• Normal Approximation to Binomial
In a class of 50 students, Mike said his height was 1.70m.
You randomly select a
student from the
class. What is the
probability that his or
her height is exactly
1.70m?
Continuous Random Variables

A continuous random variable can take any value in


some interval.

Examples : Temperature, Weight, Time


Continuous Random Variables

X P(X)
0 0.343
How to count the
1 0.441
probabilities for continuous
random variables?
2 0.189
3 0.027
Discrete Probability Distribution
You randomly select a
student from the
class. What is the
probability that his or
her height is exactly
1.70m?

Concept 1: For a continuous random variable x,


the probability for x to be a particular value is
nearly zero.
You randomly select a
student from the
class. What is the
probability that his or
her height is between
1.69m and 1.71m?
Concept 2: It makes sense to measure the
probability of a random variable over a range of
values.
You randomly select
an adult. Is he or she
more likely to have a
height of exactly 2m
or have a height of
exactly 1.7m?

Concept 3: It is still possible to compare the


likelihood of the probabilities of a random
variables taking different values.
PDF and CDF
Histogram
Probability Density Function

We can describe the probability distribution of a


continuous r.v. X by its probability density function
(pdf), usually denoted by f ( x ) .

f (x)

-5.0 -4.0 -3.0 -2.0 -1.0 0.0 1.0 2.0 3.0 4.0 5.0
x
Probability Density Function
The probability density function (pdf) of a r.v. X has the
following characteristics:
– Area under the pdf curve is equal to 1
– Probability that X lies between values a and b is equal to the
area under the curve between a and b

f (x)

area = P(a  X  b)

-5.0 -4.0 -3.0 -2.0


a
-1.0 0.0
b 1.0 2.0 3.0 4.0 5.0
x
Probability Density Function

Q1 : Given the pdf f(x), how do we compute the area


under the curve between a and b?

In general, we will have to evaluate the integral


𝑏
𝑓 𝑥 𝑑𝑥
𝑎

f (x)

area = P(a  X  b)

-5.0 -4.0 -3.0 -2.0


a
-1.0 0.0
b 1.0 2.0 3.0 4.0 5.0
x
PDF for a woman’s height in
US

PDF for a man’s height in US

http://www.johndcook.com/blog/2008/07/20/why-heights-are-normally-distributed/
Probability Density Function

Q2 : Given the pdf f(x), how do we compute the


mean and variance of X ?


Mean = 𝝁 = −∞
𝑥 𝑓 𝑥 𝑑𝑥

Variance = 𝝈𝟐 = −∞
(𝑥 − 𝝁) 2
𝑓 𝑥 𝑑𝑥

f (x)

-5.0 -4.0 -3.0 -2.0 -1.0 0.0 1.0 2.0 3.0 4.0 5.0
x
Discrete vs Continuous
Discrete Continuous

Probability x1 p1
distribution x2 p2 pdf f(x)

xn pn
𝑛 ∞
𝑝𝑖 = 1 𝑓 𝑥 𝑑𝑥 = 1
𝑖=1 −∞


Mean  𝑛
𝑥𝑖 𝑝𝑖 𝑥 𝑓 𝑥 𝑑𝑥
𝑖=1 −∞

𝑛 ∞
Variance 2
(𝑥𝑖 − 𝝁)2 𝑝𝑖 (𝑥 − 𝝁)2 𝑓 𝑥 𝑑𝑥
𝑖=1 −∞
Cumulative Distribution Function

For a given t, the cumulative distribution function


(cdf) F(t) of a continuous r.v. X is defined by
𝑡
𝐹 𝑡 = 𝑃 𝑿≤𝑡 = 𝑓 𝑠 𝑑𝑠
−∞

F(t) is the probability that X does not exceed t.

f (t) By definition :
• 0 ≤ F(t) ≤ 1
• F(t) is a non-decreasing
function of t
P(X  t)
-5.0 -4.0 -3.0 -2.0 -1.0 0.0

t
1.0 2.0 3.0 4.0 5.0
Cumulative Distribution Function

For a given t, the cumulative distribution function


(cdf) F(t) of a continuous r.v. X is defined by
𝑡
𝐹 𝑡 = 𝑃 𝑿≤𝑡 = 𝑓 𝑠 𝑑𝑠
−∞

It is also easy to see that :


• P(X > t) = 1 – F(t)
• P(c  X  d) = F(d) – F(c)

Note: P(X  t) = P(X < t)


Uniform Distribution
Uniform Distribution

Uniform Distribution
X is “uniform” on [a,b] if X is equally likely to take any value in
the range from a to b.

f (t)

a b t
Example
• Suppose that travel time (by bus) between Clementi and NUS is uniformly distributed between 12 and 20 minutes.

1. What is the mean travel time?

2. What is the probability that the travel time exceeds 14 minutes?

3. What is the probability that the travel time is between 14 and 18 minutes?
Uniform Distribution

If the r.v. X is equally likely to take any value in the range


from a to b (where b > a), then we say that X obeys a
uniform distribution over [a,b]. We write : X  U[a,b]

PDF of X
Equation of f(t) ?
f (t)
1
𝑖𝑓 𝑎 ≤ 𝑡 ≤ 𝑏
𝑓 𝑡 = 𝑏−𝑎
1/(b–a)
0 otherwise
area = 1

a b t
CDF of Uniform Distribution

1
𝑖𝑓 𝑎 ≤ 𝑡 ≤ 𝑏
PDF of X 𝑓 𝑡 = 𝑏−𝑎
0 otherwise

CDF of X ?
f (t)
F(t) = P(X  t)
1/(b–a)

a b t
CDF of Uniform Distribution

CDF of X Equation of F(t) ?

F(t) = P(X  t) 0 𝑖𝑓 𝑡 < 𝑎


𝑡−𝑎
𝐹 𝑡 = 𝑖𝑓 𝑎 ≤ 𝑡 ≤ 𝑏
𝑏−𝑎
1 𝑖𝑓 𝑡 > 𝑏
F (t)

a b t
Mean & Variance of Uniform Distribution

X  U[a,b]

E (X) = ?(a+b)/2

(𝑏 − 𝑎)2
Var (X) = ?
12
PDF f (t)

1
1/(b–a) 𝑖𝑓 𝑎 ≤ 𝑡 ≤ 𝑏
𝑓 𝑡 = 𝑏−𝑎
0 otherwise

a b t
Example
• The men’s 100 meter sprint at the 1996 Olympic Games in Atlanta was a hotly contested event between
three athletes.

Donovan Bailey Frankie Fredericks Ato Boldon


(Canada) (Namibia) (Trinidad)
Example
• Assume that the probability distribution of the time to run the race is the same for
the three, and that this time obeys a uniform distribution between 9.75 seconds and
9.95 seconds.
– What is the probability that Donovan’s time will beat the previous record of 9.86 seconds?

– What is the probability that the winning time will beat the previous records of 9.86 seconds?
Exponential Distribution
Exponential Distribution
Exponential Distribution
Often arises as the distribution of amount of time until an event occurs.
Useful for waiting line problems.

A random variable X is said to be an exponential r.v. with rate


parameter  ( > 0) if it has the pdf

f ( x ) =  e −x for x > 0


Exponential Distribution

It can be shown that It can be shown that


1 X has the cdf
Mean E ( X) =
𝝀
1 𝐹 𝒙 = 1 − 𝑒 −𝝀𝒙
Variance Va r ( X ) =
𝝀2
Poisson and Exponential

There is a close relationship between the two distributions.

N is Poisson r.v. with parameter  (>0):


𝑒 −𝝀 𝝀𝑖
𝑃 𝐍=𝑖 = for 𝑖 = 0, 1, 2, . . .
𝑖!

X is exponential r.v. with parameter  ( > 0) :


f(x) =  e−x for x > 0
Poisson and Exponential

Parameter Poisson Exponential


1
Mean  𝝀
Exponential Distribution
X is exponential r.v. with parameter  ( > 0)

PDF f(x) =  e−x for x> 0

CDF 𝐹 𝒙 = 1 − 𝑒 −𝝀𝒙

Example:
Suppose the usage duration of a particular ATM is an exponential r.v.
with a mean of 3 mins. If someone arrives at the ATM immediately
ahead of you, find the probability that you have to wait (a) more than
2 minutes, and (b) between 2 and 3 minutes

X = usage duration (in mins) of ATM is exponential r.v. with parameter  = 1/3.

(a) P ( X > 2 ) = 1 − P(X<2) = 1 − F ( 2 ) = e − 2   0.51342

(b) P ( 2 < X < 3 ) = P(X<3) − P(X<2) = ( 1 − e −3) − ( 1 − e −2)


Exponential Distribution
X is exponential r.v. with parameter  ( > 0)

PDF f(x) =  e−x for x> 0

CDF 𝐹 𝒙 = 1 − 𝑒 −𝝀𝒙

Example:
Suppose the usage duration of a particular ATM is an exponential r.v.
with a mean of 3 mins. If someone arrives at the ATM immediately
ahead of you, find the probability that you have to wait (a) more than 2
minutes, and (b) between 2 and 3 minutes

X = usage duration (in mins) of ATM is exponential r.v. with parameter  = 1/3.

(a) P ( X > 2 ) = 1 − P(X<2) = 1 − F ( 2 ) = e − 2   0.51342

(b) P ( 2 < X < 3 ) = P ( X < 3 ) − P ( X < 2 ) = ( 1 − e −3) − ( 1 − e −2)


Exponential Distribution
X is exponential r.v. with parameter  ( > 0)

PDF f(x) =  e−x for x> 0

CDF 𝐹𝐹 𝒙𝒙 = − 𝑒𝑒−𝝀𝒙
= 11 − −𝝀𝒙

Excel Function : EXPONDIST (x, , cumulative)

cumulative = 0  f(x)
1  F(x)
Exponential Distribution

Excel Function : EXPONDIST (x, , cumulative)

Example
Suppose the usage duration of a particular ATM is an exponential r.v. with a
mean of 3 mins. If someone arrives at the ATM immediately ahead of you,
find the probability that you have to wait
(a) more than 2 minutes, and  = 1/3
(b) between 2 and 3 minutes

P (X > 2) = 1 - EXPONDIST (2, 1/3, 1)

P (2 < X < 3) = EXPONDIST (3, 1/3, 1) - EXPONDIST (2, 1/3, 1)


Exponential Distribution

Excel Function : EXPONDIST (x, , cumulative)

Example
Suppose the usage duration of a particular ATM is an exponential r.v. with a
mean of 3 mins. If someone arrives at the ATM immediately ahead of you,
find the probability that you have to wait
(a) more than 2 minutes, and  = 1/3
(b) between 2 and 3 minutes

P (X > 2) = 1 - EXPONDIST (2, 1/3, 1)

P (2 < X < 3) = EXPONDIST (3, 1/3, 1) - EXPONDIST (2, 1/3, 1)


Normal Distribution
Normal Distribution
Density function is the familiar bell-shaped curve

f(t)
1 (𝒕−𝜇 )2

𝑓 𝒕 = 𝑒 2𝜎 2
2𝜋𝜎 2

t

A r.v. X that obeys a Normal distribution is completely described by


two parameters : mean µ and standard deviation .

We write : X  N(µ,  ).
Note: f(t) is symmetric around the mean
f(t) is highest at its mean
Normal Distribution

PDFs of 4 Normally distributed r.v’s


Normal Distribution
Many phenomena obey the Normal distribution:
• PSLE scores
• Height of a group of people (e.g., DSC1007 students)
• Stock return over short periods of time
• Width of steel plate from a production process
• Consumer demand for a product on a given day

But ... some phenomena are not Normally distributed:


• Stock returns over longer periods of time
• Income distributions
Computing Probabilities for Normal Distributions

1 (𝒕−𝜇 )2

Suppose : X  N(µ,  ) 𝑓 𝒕 = 𝑒 2𝜎 2
2𝜋𝜎 2

How do we compute probabilities such as : P ( a  X  b ) ?

Let’s first look at the standard Normal case: Z  N ( 0 , 1 )

How do we compute : P ( a  Z  b ) ?
Computing Probabilities for Standard Normal Distributions

Consider the standard Normal random variable Z ~ N(0,1)

Determine the following:

P(Z  1.55) = ?

P(−0.55  Z  0.50) = ?
Computing Probabilities for Normal Distributions

We have seen how to use a standard Normal table to


compute probabilities for a r.v.
Z  N(0,1).
Next :
We can use the same table to compute probabilities for any
r.v. that obeys a Normal distribution :
X  N(µ,  ).
Computing Probabilities for Normal Distributions

Because :
There is a special relationship between N(0,1) and N(µ,  ).

If X  N(µ,  ), then the r.v. Z defined by


𝑿− 𝜇
𝒁=
𝜎
obeys a standard Normal distribution.

In other words :

𝑿− 𝜇
𝑿 ~ 𝑁 𝜇, 𝜎 ⇒ ~ 𝑁(0,1)
𝜎
Application of Normal Distribution
Normal Distribution

99.72%
95.44%
68.26%

x
 – 3 –   +  + 3
 – 2  + 2
Are you normal?

The IQ of famous people

Mean = 100 & SD = 15


Example
• The personnel department of Ztel, a large communications company, is reconsidering its
hiring policy. Each applicant for a job must take a standard exam, and the hire or no-hire
decision depends at least in part on the result of the exam. The scores of all applicants have
been examined closely. They are approximately normally distributed with mean 525 and
standard deviation 55.
• The current hiring policy occurs in two phases. The first phase separates all applicants into
three categories:
– automatic accepts – test scores 600 or above
– automatic rejects – test scores 425 or below
– maybe – the rest
• All the maybes are passed on to a second phase where their previous job experience,
special talents, and other factors are used as hiring criteria.
Questions

• What is the percentage of applicants who are


automatic accepts or rejects?
• If ZTel wants to automatically accept 15% of
applicants and automatically reject 10% of them,
how should the standards be changed?
Sums of Normal RVs

Suppose that X and Y are jointly Normal random variables, and

W = aX + bY

(a) What is E(W)? = a E(X) + b E(Y) = a µX + b µY

(b) What is Var(W)? = a2 Var (X ) + b2 Var (Y ) +2 ab X Y Corr(X ,Y )

(c) What is SD(W)?

(d) What is the distribution of W?

A weighted sum of jointly Normal r.v.’s


is a Normal r.v.
Sums of Normal RVs

Suppose that COURTS and Challenger are considering a merger


(or just a merger of their warehousing operations).

Q4 : What is the distribution of the demand for iPads from


the combined company?

Q5 : How many iPads would the combined warehouse need to


stock per day in order to achieve the 98% customer
service requirement?

You might also like