Transcript Document

Chapter 11
Probability Models for
Counts
Copyright © 2011 Pearson Education, Inc.
11.1 Random Variables for Counts
How many doctors should management
expect a pharmaceutical rep to meet in a
day if only 40% of visits reach a doctor? Is
a rep who meets 8 or more doctors in a day
doing exceptionally well?

Need a discrete random variable to model counts
and provide a method for finding probabilities
3 of 30
Copyright © 2011 Pearson Education, Inc.
11.1 Random Variables for Counts
Bernoulli Random Variable
Bernoulli trials are random events with three
characteristics:



Two possible outcomes (success, failure)
Fixed probability of success (p)
Independence
4 of 30
Copyright © 2011 Pearson Education, Inc.
11.1 Random Variables for Counts
Bernoulli Random Variable - Definition
A random variable B with two possible values,
1 = success and 0 = failure, as determined
in a Bernoulli trial.
E(B) = p
Var(B) = p(1-p)
5 of 30
Copyright © 2011 Pearson Education, Inc.
11.1 Random Variables for Counts
Counting Successes (Binomial)



Y, the sum of iid Bernoulli random variables,
is a binomial random variable
Y = number of success in n Bernoulli trials
(each trial with probability of success = p)
Defined by two parameters: n and p
6 of 30
Copyright © 2011 Pearson Education, Inc.
Binomial Distribution
Number of ‘successes’ in a sample of n
observations (trials)
• Number of reds in 15 spins of roulette wheel
• Number of defective items in a batch of 5
items
• Number correct on a 33 question exam
• Number of customers who purchase out of
100 customers who enter store
11.1 Random Variables for Counts
Counting Successes (Binomial)


We can define the number of doctors seen
by a pharmaceutical rep in 10 visits as a
binomial random variable
This random variable, Y, is defined by
n = 10 visits and p = 0.40 (40% success in
reaching a doctor)
7 of 30
Copyright © 2011 Pearson Education, Inc.
11.2 Binomial Model
Assumptions


Using a binomial random variable to
describe a real phenomenon
10% Condition: if trials are selected at
random, it is OK to ignore dependence
caused by sampling from a finite population
if the selected trials make up less than 10%
of the population
8 of 30
Copyright © 2011 Pearson Education, Inc.
11.3 Properties of Binomial Random
Variables
Mean and Variance
E(Y) = np
Var(Y) = np(1 - p)
9 of 30
Copyright © 2011 Pearson Education, Inc.
Binomial Distribution
Characteristics
n = 5 p = 0.1
Mean
  E ( x)  n p
Standard Deviation
P(X)
1.0
.5
.0
X
0
1
  n p (1  p )
2
3
4
5
n = 5 p = 0.5
.6
.4
.2
.0
P(X)
X
0
1
2
3
4
5
11.3 Properties of Binomial Random
Variables
Pharmaceutical Rep Example
E(Y) = np = (10)(0.40) = 4
We expect a rep to see 4 doctors in 10 visits.
Var(Y) = np(1 - p) = (1)(0.40)(0.60) = 2.4
SD(Y) = 1.55
A rep who has seen 8 doctors has performed 2.6
standard deviations above the mean.
10 of 30
Copyright © 2011 Pearson Education, Inc.
11.3 Properties of Binomial Random
Variables
Binomial Probabilities
Consist of two parts:
 The probability of a specific sequence of
Bernoulli trials with y success in n attempts
 The number of sequences that have y
successes in n attempts (binomial
coefficient)
11 of 30
Copyright © 2011 Pearson Education, Inc.
11.3 Properties of Binomial Random
Variables
Binomial Probabilities
Binomial probability for y success in n trials
PY  y   n C y p 1  p 
y
n y
12 of 30
Copyright © 2011 Pearson Education, Inc.
Binomial Probability Distribution
Function
 n  x n x
n!
x
n x
p( x)    p q 
p (1  p )
x ! ( n  x )!
 x
p(x) = Probability of x ‘Successes’
n = Sample Size
p = Probability of ‘Success’
x = Number of ‘Successes’ in Sample
(x = 0, 1, 2, ..., n)
Binomial Probability Distribution
Example
Experiment: Toss 1 coin 5 times in a row. Note number of
tails. What’s the probability of 3 tails?
n!
p( x) 
p x (1  p ) n  x
x !(n  x)!
5!
p (3) 
.53 (1  .5)53
3!(5  3)!
 .3125
© 1984-1994 T/Maker Co.
11.3 Properties of Binomial Random
Variables
Pharmaceutical Rep Example
P(Y = 8) = 10C8(0.4)8(0.6)2 = 0.011
The probability of seeing 8 doctors in 10
visits is only about 1%.
13 of 30
Copyright © 2011 Pearson Education, Inc.
11.3 Properties of Binomial Random
Variables
Probability Distribution for Rep Example
14 of 30
Copyright © 2011 Pearson Education, Inc.
11.3 Properties of Binomial Random
Variables
Pharmaceutical Rep Example
P(Y ≥ 8)= P(Y = 8) + P(Y = 9) + P(Y = 10)
= 0.01062 + 0.00157 + 0.00010
= 0.01229
The probability of seeing 8 or more doctors in
10 visits is only slightly above 1%. This
rep is doing exceptionally well!
15 of 30
Copyright © 2011 Pearson Education, Inc.
4M Example 11.1: FOCUS ON SALES
Motivation
A focus group with nine randomly chosen
participants was shown a prototype of a new
product and asked if they would buy it at a price
of $99.95. Six of them said yes. The
development team claimed that 80% of
customers would buy the new product at that
price. If the claim is correct, what results would
we expect from the focus group?
16 of 30
Copyright © 2011 Pearson Education, Inc.
4M Example 11.1: FOCUS ON SALES
Method
Use the binomial model for this situation.
Each focus group member has two
possible responses: yes, no. We can use
X ~ Bi(n = 9, p = 0.8) to represent the
number of yes responses out of nine.
17 of 30
Copyright © 2011 Pearson Education, Inc.
4M Example 11.1: FOCUS ON SALES
Mechanics – Find E(X) and SD(X)
E(X) = np = (9)(0.8) = 7.2
Var(X) = np(1-p) = (9)(0.8)(0.2) = 1.44
SD(X) = 1.2
The expected number is higher than the
observed number of 6.
18 of 30
Copyright © 2011 Pearson Education, Inc.
4M Example 11.1: FOCUS ON SALES
Mechanics – Probability Distribution
While 6 is not the most likely outcome,
it is still common.
19 of 30
Copyright © 2011 Pearson Education, Inc.
4M Example 11.1: FOCUS ON SALES
Message
The results of the focus group are in line
with what we would expect to see if
the development team’s claim is
correct.
20 of 30
Copyright © 2011 Pearson Education, Inc.
11.4 Poisson Model
A Poisson Random Variable



Describes the number of events
determined by a random process during an
interval of time or space
Is not finite (possible values are infinite)
Is defined by λ (lambda), the rate of events
21 of 30
Copyright © 2011 Pearson Education, Inc.
Poisson Process
1.
Constant event
probability
• Average of 60/hr is
1/min for 60 1-minute
intervals
2.
One event per interval
• Don’t arrive together
3.
Independent events
• Arrival of 1 person does
not affect another’s
arrival
© 1984-1994 T/Maker Co.
11.4 Poisson Model
The Poisson Probability Distribution
P X  x   e


x
x!
x  0, 1, 2, ...
E(X) = λ
Var(X) = λ
22 of 30
Copyright © 2011 Pearson Education, Inc.
Poisson Probability Distribution
Function
p (x ) 
xe -
x!
p(x) = Probability of x given 
 = Expected (mean) number of ‘successes’
e = 2.71828 (base of natural logarithm)
x = Number of ‘successes’ per unit
Poisson Distribution Characteristics
= 0.5
Mean
0
1
2
i 1
4
5
= 6
X
4
0
.3
.2
.1
.0
P(X)
2
Standard Deviation
 
3
10
  x p( x)
X
8
N
6
  E ( x)  
.8
.6
.4
.2
.0
P(X)
補上平均數和變異數的證明過程
30 of <30>
Copyright © 2011 Pearson Education, Inc.
Binomial Distribution Thinking
Challenge
You’re a telemarketer selling
service contracts for Macy’s.
You’ve sold 20 in your last 100
calls (p = .20). If you
call 12 people tonight, what’s the
probability of
A. No sales?
B. Exactly 2 sales?
C. At most 2 sales?
D. At least 2 sales?
Binomial Distribution Solution*
n = 12, p = .20
A. p(0) = .0687
B. p(2) = .2835
C. p(at most 2) = p(0) + p(1) + p(2)
= .0687 + .2062 + .2835
= .5584
D. p(at least 2) = p(2) + p(3)...+ p(12)
= 1 – [p(0) + p(1)]
= 1 – .0687 – .2062
= .7251
11.4 Poisson Model
The Poisson Model


Uses a Poisson random variable to
describe counts of data
Is appropriate for situations like
• The number of calls arriving at the help desk in
a 10-minute interval
• The number of imperfections per square meter
of glass panel
23 of 30
Copyright © 2011 Pearson Education, Inc.
4M Example 11.2: DEFECTS IN
SEMICONDUCTORS
Motivation
A supplier claims that its wafers have 1
defect per 400 cm2. Each wafer is 20 cm in
diameter, so the area is 314 cm2. What is
the mean number of defects and the
standard deviation?
24 of 30
Copyright © 2011 Pearson Education, Inc.
4M Example 11.2: DEFECTS IN
SEMICONDUCTORS
Method
The random variable is the number of
defects on a randomly selected wafer.
The Poisson model applies.
25 of 30
Copyright © 2011 Pearson Education, Inc.
4M Example 11.2: DEFECTS IN
SEMICONDUCTORS
Mechanics – Find λ
The assumed defect rate is 1 per 400 cm2.
Since a wafer has an area of 314 cm2,
λ = 314/400 = 0.785
E(X) = 0.785
SD(X) = 0.886
P(X = 0) = 0.456
26 of 30
Copyright © 2011 Pearson Education, Inc.
Poisson Distribution Example
Customers arrive at a
rate of 72 per hour. What
is the probability of 4
customers arriving in 3
minutes?
© 1995 Corel Corp.
Poisson Distribution Solution
72 Per Hr. = 1.2 Per Min. = 3.6 Per 3 Min. Interval
p( x) 
 e
x
-
x!
3.6 

p (4) 
4
4!
e
-3.6
 .1912
Poisson Probability Table (Portion)

.02
:
3.4
3.6
3.8
:
0
.980
:
.033
.027
.022
:
…
…
:
…
…
…
:
x
3
4
:
:
.558 .744
.515 .706
.473 .668
:
:
Cumulative Probabilities
p(x ≤ 4) – p(x ≤ 3) = .706 – .515 = .191
…
9
:
…
…
…
:
:
.997
.996
.994
:
Thinking Challenge
You work in Quality
Assurance for an investment
firm. A clerk enters 75
words per minute with 6
errors per hour. What is the
probability of 0 errors in a
255-word bond transaction?
© 1984-1994 T/Maker Co.
Poisson Distribution Solution:
Finding *
75 words/min = (75 words/min)(60 min/hr)
= 4500 words/hr
6 errors/hr
= 6 errors/4500 words
= .00133 errors/word
In a 255-word transaction (interval):
 = (.00133 errors/word )(255 words)
= .34 errors/255-word transaction
Poisson Distribution Solution:
Finding p(0)*
p( x) 
 e
x
-
x!
.34 

p (0) 
0
0!
e
-.34
 .7118
4M Example 11.2: DEFECTS IN
SEMICONDUCTORS
Message
The chip maker can expect about 0.8
defects per wafer. About 46% of the
wafers will be defect free.
27 of 30
Copyright © 2011 Pearson Education, Inc.
Best Practices

Ensure that you have Bernoulli trials if you are
going to use the binomial model.

Use the binomial model to simplify the analysis of
counts.

Use the Poisson model when the count
accumulates during an interval.
28 of 30
Copyright © 2011 Pearson Education, Inc.
Best Practices (Continued)

Check the assumptions of a model.

Use a Poisson model to simplify counts of rare
events.
29 of 30
Copyright © 2011 Pearson Education, Inc.
Pitfalls

Do not presume independence without checking.

Do not assume stable conditions routinely.
30 of 30
Copyright © 2011 Pearson Education, Inc.