Discrete Distributions
Download
Report
Transcript Discrete Distributions
6-1
Chapter
6
Discrete Distributions
Probability Models
Discrete Distributions
Uniform Distribution
Bernoulli Distribution
Binomial Distribution
Poisson Distribution
McGraw-Hill/Irwin
© 2008 The McGraw-Hill Companies, Inc. All rights reserved.
6-3
Probability Models
Probability Models
•
A random (or stochastic) process is a repeatable
random experiment.
• For example, each call arriving at
the L.L. Bean order center is a
random experiment in which the
variable of interest is the amount
of the order.
• Probability can be used to analyze random (or
stochastic) processes and to understand business
processes.
6-4
Discrete Distributions
Random Variables
• A random variable is a function or rule that
assigns a numerical value to each outcome in
the sample space of a random experiment.
• Nomenclature:
- Capital letters are used to represent
random variables (e.g., X, Y).
- Lower case letters are used to represent
values of the random variable (e.g., x, y).
• A discrete random variable has a countable
number of distinct values.
6-5
Discrete Distributions
Probability Distributions
• A discrete probability distribution assigns a
probability to each value of a discrete random
variable X.
• To be a valid probability, each probability must be
between
0 P(x ) 1
i
• and the sum of all the probabilities for the values of
X must be equal to unity.
n
P( x ) 1
i 1
i
6-6
Discrete Distributions
Example: Coin Flips
When you flip a coin
three times, the
sample space has
eight equally likely
simple events.
They are:
1st Toss
H
H
H
H
T
T
T
T
2nd Toss
H
H
T
T
H
H
T
T
3rd Toss
H
T
H
T
H
T
H
T
6-7
Discrete Distributions
Example: Coin Flips
If X is the number of heads, then X is a random
variable whose probability distribution is as follows:
Possible Events
TTT
HTT, THT, TTH
HHT, HTH, THH
HHH
Total
x
0
1
2
3
P(x)
1/8
3/8
3/8
1/8
1
6-8
Discrete Distributions
Example: Coin Flips
Note also that a
discrete probability
distribution is defined
only at specific points
on the X-axis.
0.40
0.35
0.30
Probability
Note that the values of
X need not be equally
likely. However, they
must sum to unity.
0.25
0.20
0.15
0.10
0.05
0.00
0
1
2
Num ber of Heads (X)
3
6-9
Discrete Distributions
Expected Value
• The expected value E(X) of a discrete random
variable is the sum of all X-values weighted by
their respective probabilities.
• If there are n distinct values of X,
n
E ( X ) xi P( xi )
i 1
• The E(X) is a measure of central tendency.
6-10
Discrete Distributions
Example: Service Calls
The probability distribution of emergency service calls
on Sunday by Ace Appliance Repair is:
x
P(x)
0
0.05
1
0.10
2
0.30
3
0.25
4
0.20
5
0.10
Total
1.00
What is the average or expected
number of service calls?
6-11
Discrete Distributions
Example: Service Calls
First calculate xiP(xi):
x
P(x)
xP(x)
0
0.05
0.00
1
0.10
0.10
2
0.30
0.60
3
0.25
0.75
4
0.20
0.80
5
0.10
0.50
Total
1.00
2.75
The sum of the xP(x) column
is the expected value or
mean of the discrete
distribution.
5
E ( X ) xi P( xi )
i 1
6-12
Discrete Distributions
Example: Service Calls
This particular
probability distribution
is not symmetric
around the mean
= 2.75.
0.30
Probability
0.25
0.20
0.15
0.10
0.05
0.00
0
1
2
3
= 2.75
Num ber of Service Calls
4
5
However, the mean
is still the balancing
point, or fulcrum.
Because E(X) is an average, it does not have to be an
observable point.
6-13
Discrete Distributions
Application: Life Insurance
• Expected value is the basis of life insurance.
• For example, what is the probability that a 30-yearold white female will die within the next year?
• Based on mortality statistics, the probability is
.00059 and the probability of living another year is
1 - .00059 = .99941.
• What premium should a life insurance company
charge to break even on a $500,000 1-year term
policy?
6-14
Discrete Distributions
Application: Life Insurance
Let X be the amount paid by the company to settle
the policy.
Event
x
P(x)
xP(x)
The total expected
Live
0
.99941
0.00 payout is
Die
Total
500,000
.00059
295.00
1.00000
295.00
Source: Centers for Disease Control and Prevention, National
Vital Statistics Reports, 47, no. 28 (1999).
So, the premium should be $295 plus whatever
return the company needs to cover administrative
overhead and profit.
6-15
Discrete Distributions
Application: Raffle Tickets
• Expected value can be applied to raffles and
lotteries.
• If it costs $2 to buy a ticket in a raffle to win a new
car worth $55,000 and 29,346 raffle tickets are
sold, what is the expected value of a raffle ticket?
• If you buy 1 ticket, what is the chance you will
1
win =
29,346
29,345
lose =
29,346
6-16
Discrete Distributions
Application: Raffle Tickets
• Now, calculate the E(X):
E(X) = (value if you win)P(win) + (value if you lose)P(lose)
= (55,000)
1
+ (0) 29,345
29,346
29,346
= (55,000)(.000034076) + (0)(.999965924) = $1.87
• The raffle ticket is actually worth $1.87. Is it worth
spending $2.00 for it?
6-17
Discrete Distributions
Variance and Standard Deviation
• If there are n distinct values of X, then the variance
of a discrete random variable is:
n
V ( X ) s2 [ xi ]2 P( xi )
i 1
• The variance is a weighted average of the
dispersion about the mean and is denoted either
as s2 or V(X).
• The standard deviation is the square root of the
variance and is denoted s.
2
s s V (X )
6-18
Discrete Distributions
Example: Bed and Breakfast
The Bay Street Inn is a 7-room
bed-and-breakfast in Santa
Theresa, Ca.
The probability
distribution of room
rentals during
February is:
x
P(x)
0
0.05
1
0.05
2
0.06
3
0.10
4
0.13
5
0.20
6
0.15
7
0.26
Total
1.00
6-19
Discrete Distributions
Example: Bed and Breakfast
First find the expected value
7
E ( X ) xi P( xi )
i 1
= 4.71 rooms
x
P(x)
x P(x)
0
0.05
0.00
1
0.05
0.05
2
0.06
0.12
3
0.10
0.30
4
0.13
0.52
5
0.20
1.00
6
0.15
0.90
7
0.26
1.82
1.00
= 4.71
Total
6-20
Discrete Distributions
Example: Bed and Breakfast2
7
V ( X ) s [ xi ]2 P( xi )
The E(X) is then
used to find
x
the variance:
0
P(x)
x P(x)
[x]2
[x]2 P(x)
0.05
0.00
22.1841
1.109205
1
0.05
0.05
13.7641
0.688205
2
0.06
0.12
7.3441
0.440646
3
0.10
0.30
2.9241
0.292410
4
0.13
0.52
0.5041
0.065533
5
0.20
1.00
0.0841
0.016820
6
0.15
0.90
1.6641
0.249615
7
0.26
1.82
5.2441
1.363466
1.00
= 4.71
= 4.2259 rooms2
The standard
deviation is:
s = 4.2259
= 2.0577 rooms
Total
i 1
s2 = 4.225900
6-21
Discrete Distributions
Example: Bed and Breakfast
The histogram shows that the distribution is skewed
to the left and bimodal.
0.30
The mode is 7
rooms rented but
the average is only
4.71 room rentals.
Probability
0.25
0.20
0.15
0.10
0.05
0.00
0
1
2
3
4
5
6
7
Num ber of Room s Rented
s = 2.06 indicates considerable variation around .
6-22
Uniform Distribution
Characteristics of the Uniform Distribution
• The uniform distribution describes a random
variable with a finite number of integer values from
a to b (the only two parameters).
• Each value of the random variable is equally likely
to occur.
• Consider the following summary of the uniform
distribution:
6-23
Uniform Distribution
Parameters
PDF
Range
Mean
Std. Dev.
a = lower limit
b = upper limit
1
b a 1
axb
P( x)
ab
2
(b a) 12 1
12
Random data
generation in Excel
Comments
=a+INT((b-a+1)*RAND())
Used as a benchmark, to generate random
integers, or to create other distributions.
6-24
Uniform Distribution
Example: Rolling a Die
0.18
1.00
0.16
0.90
0.14
0.80
0.70
0.12
Probability
Probability
• The number of dots on the roll of a die form a
uniform random variable with six equally likely
integer values: 1, 2, 3, 4, 5, 6
• What is the probability of rolling any of these?
0.10
0.08
0.06
0.60
0.50
0.40
0.30
0.04
0.20
0.02
0.10
0.00
0.00
1
2
3
4
5
Num ber of Dots Show ing on the Die
PDF for one die
6
1
2
3
4
5
Num ber of Dots Show ing on the Die
CDF for one die
6
6-25
Uniform Distribution
Example: Rolling a Die
1
1
1
• The PDF for all x is: P( x)
b a 1 6 1 1 6
• Calculate the mean as:
a b 1 6
3.5
2
2
• Calculate the standard deviation as:
(b a) 1 1
2
12
(6 1) 1 1
2
12
1.708
6-26
Uniform Distribution
Application: Pumping Gas
On a gas pump, the last two digits (pennies)
displayed will be a uniform random integer
(assuming the pump stops automatically).
0.012
1.000
0.900
0.010
0.800
0.700
0.008
0.600
0.006
0.500
0.400
0.004
0.300
0.200
0.002
0.100
0.000
0.000
0
10
20
30
40
50
60
Pennies Digits on Pum p
70
80
90
0
10
20
30
40
50
60
Pennies Digits on Pum p
PDF
CDF
The parameters are: a = 00 and b = 99
70
80
90
6-27
Uniform Distribution
Application: Pumping Gas
• The PDF for all x is:
1
1
1
P( x)
.010
b a 1 99 0 1 100
• Calculate the mean as:
a b 0 99
49.5
2
2
• Calculate the standard deviation as:
(b a) 12 1 (99 0) 12 1 28.87
12
12
6-28
Bernoulli Distribution
Bernoulli Experiments
• A random experiment with only 2 outcomes is a
Bernoulli experiment.
• One outcome is arbitrarily labeled a
“success” (denoted X = 1) and the other a “failure”
(denoted X = 0).
p is the P(success), 1 – p is the P(failure).
• “Success” is usually defined as the less likely
outcome so that p < .5 for convenience.
• Note that P(0) + P(1) = (1 – p) + p = 1 and
0 < p < 1.
6-29
Bernoulli Distribution
Bernoulli Experiments
Consider the following Bernoulli experiments:
Bernoulli Experiment
Possible Outcomes
Probability of
“Success”
Flip a coin
1 = heads
0 = tails
p = .50
Inspect a jet turbine blade
1 = crack found
0 = no crack found
p = .001
Purchase a tank of gas
1 = pay by credit card
0 = do not pay by credit
card
p = .78
Do a mammogram test
1 = positive test
0 = negative test
p = .0004
6-30
Bernoulli Distribution
Bernoulli Experiments
• The expected value (mean) of a Bernoulli
experiment is2 calculated as:
E ( X ) x i P( xi ) (0)(1 p) (1)(p) p
i 1
• The variance of a Bernoulli experiment is
calculated as:
2
V ( X ) xi E ( X ) P( xi ) (0 p)2 (1 p) (1 p)2 (p) p(1 p)
2
i 1
• The mean and variance are useful in developing
the next model.
6-31
Binomial Distribution
Characteristics of the Binomial Distribution
• The binomial distribution arises when a Bernoulli
experiment is repeated n times.
• Each Bernoulli trial is independent so the
probability of success p remains constant on each
trial.
• In a binomial experiment, we are interested in X =
number of successes in n trials. So,
X = x1 + x2 + ... + xn
• The probability of a particular number of successes
P(X) is determined by parameters n and p.
6-32
Binomial Distribution
Characteristics of the Binomial Distribution
• The mean of a binomial distribution is found by
adding the means for each of the n Bernoulli
independent events: p + p + … + p = np
• The variance of a binomial distribution is found by
adding the variances for each of the n Bernoulli
independent events:
p(1-p)+ p(1-p) + … + p(1-p) = np(1-p)
• The standard deviation is
np(1-p)
6-33
Binomial Distribution
Parameters
PDF
n = number of trials
p = probability of success
P ( x)
n!
p x (1 p) n x
x !(n x)!
Excel function
=BINOMDIST(k,n,p,0)
Range
X = 0, 1, 2, . . ., n
Mean
np
Std. Dev.
np(1 p)
Random data generation
in Excel
Sum n values of =1+INT(2*RAND()) or use
Excel’s Tools | Data Analysis
Comments
Skewed right if p < .50, skewed left if
p > .50, and symmetric if p = .50.
6-34
Binomial Distribution
Application: Uninsured Patients
• On average, 20% of the emergency room patients
at Greenwood General Hospital lack health
insurance.
• In a random sample of 4 patients, what is the
probability that at least 2 will be uninsured?
• X = number of uninsured patients (“success”)
• P(uninsured) = p = 20% or .20
• P(insured) = 1 – p = 1 – .20 = .80
• n = 4 patients
• The range is X = 0, 1, 2, 3, 4 patients.
6-35
Binomial Distribution
Application: Uninsured Patients
• What is the mean and standard deviation of this
binomial distribution?
Mean = = np =
(4)(.20) = 0.8 patients
Standard deviation = s =
np(1 p)
= 4(.20(1-.20)
= 0.8 patients