Copyright © 2011 Pearson Education, Inc.
Probability Models for Counts
Chapter 11
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
Copyright © 2011 Pearson Education, Inc.
3 of 30
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
Copyright © 2011 Pearson Education, Inc.
4 of 30
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) = pVar(B) = p(1-p)
Copyright © 2011 Pearson Education, Inc.
5 of 30
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
Copyright © 2011 Pearson Education, Inc.
6 of 30
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)
Copyright © 2011 Pearson Education, Inc.
7 of 30
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
Copyright © 2011 Pearson Education, Inc.
8 of 30
11.3 Properties of Binomial Random Variables
Mean and Variance
E(Y) = np
Var(Y) = np(1 - p)
Copyright © 2011 Pearson Education, Inc.
9 of 30
Binomial Distribution Characteristics
.0
.5
1.0
0 1 2 3 4 5
X
P(X)
.0
.2
.4
.6
0 1 2 3 4 5
X
P(X)
n = 5 p = 0.1
n = 5 p = 0.5
( )E x n p Mean
Standard Deviation
(1 )n p p
11.3 Properties of Binomial Random Variables
Pharmaceutical Rep Example
E(Y) = np = (10)(0.40) = 4We expect a rep to see 4 doctors in 10 visits.
Var(Y) = np(1 - p) = (1)(0.40)(0.60) = 2.4SD(Y) = 1.55A rep who has seen 8 doctors has performed 2.6 standard deviations above the mean.
Copyright © 2011 Pearson Education, Inc.
10 of 30
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)
Copyright © 2011 Pearson Education, Inc.
11 of 30
11.3 Properties of Binomial Random Variables
Binomial Probabilities
Binomial probability for y success in n trials
Copyright © 2011 Pearson Education, Inc.
12 of 30
ynyyn ppCyYP 1
Binomial Probability Distribution Function
!( ) (1 )
! ( )!x n x x n xn n
p x p q p px x n 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
3 5 3
!( ) (1 )
!( )!
5!(3) .5 (1 .5)
3!(5 3)!
.3125
x n xnp x p p
x n x
p
Experiment: Toss 1 coin 5 times in a row. Note number of tails.
What’s the probability of 3 tails?
© 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%.
Copyright © 2011 Pearson Education, Inc.
13 of 30
11.3 Properties of Binomial Random Variables
Probability Distribution for Rep Example
Copyright © 2011 Pearson Education, Inc.
14 of 30
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!
Copyright © 2011 Pearson Education, Inc.
15 of 30
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?
Copyright © 2011 Pearson Education, Inc.
16 of 30
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.
Copyright © 2011 Pearson Education, Inc.
17 of 30
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.44SD(X) = 1.2
The expected number is higher than the observed number of 6.
Copyright © 2011 Pearson Education, Inc.
18 of 30
4M Example 11.1: FOCUS ON SALES
Mechanics – Probability Distribution
While 6 is not the most likely outcome, it is still common.
Copyright © 2011 Pearson Education, Inc.
19 of 30
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.
Copyright © 2011 Pearson Education, Inc.
20 of 30
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
Copyright © 2011 Pearson Education, Inc.
21 of 30
Poisson Process
1. Constant event probability
• Average of 60/hr is1/min for 60 1-minuteintervals
2. One event per interval• Don’t arrive together
3. Independent events• Arrival of 1 person does
not affect another’sarrival
© 1984-1994 T/Maker Co.
11.4 Poisson Model
The Poisson Probability Distribution
E(X) = λ
Var(X) = λ
Copyright © 2011 Pearson Education, Inc.
22 of 30
...,2,1,0!
xx
exXPx
Poisson Probability Distribution Function
p(x) = Probability of x given
= Expected (mean) number of ‘successes’
e = 2.71828 (base of natural logarithm)
x = Number of ‘successes’ per unit
p xx
( )!
x
e
-
Poisson Distribution Characteristics
.0
.2
.4
.6
.8
0 1 2 3 4 5
X
P(X)
.0
.1
.2
.3
X
P(X)
= 0.5
= 6
Mean
Standard Deviation
1
( )
( )N
i
E x
x p x
補上平均數和變異數的證明過程
Copyright © 2011 Pearson Education, Inc.
30 of <30>
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 ofA. No sales?B. Exactly 2 sales?C. At most 2 sales? D. At least 2 sales?
Binomial Distribution Solution*
n = 12, p = .20A. p(0) = .0687 B. p(2) = .2835C. 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
Copyright © 2011 Pearson Education, Inc.
23 of 30
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?
Copyright © 2011 Pearson Education, Inc.
24 of 30
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.
Copyright © 2011 Pearson Education, Inc.
25 of 30
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.785E(X) = 0.785SD(X) = 0.886P(X = 0) = 0.456
Copyright © 2011 Pearson Education, Inc.
26 of 30
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
-
4 -3.6
( )!
3.6(4) .1912
4!
x ep x
x
ep
Poisson Probability Table (Portion) x 0 … 3 4 … 9
.02 .980 … : : : : : : :
3.4 .033 … .558 .744 … .997 3.6 .027 … .515 .706 … .996 3.8 .022 … .473 .668 … .994 : : : : : : :
Cumulative Probabilities
p(x ≤ 4) – p(x ≤ 3) = .706 – .515 = .191
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)*
-
0 -.34
( )!
.34(0) .7118
0!
x ep x
x
ep
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.
Copyright © 2011 Pearson Education, Inc.
27 of 30
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.
Copyright © 2011 Pearson Education, Inc.
28 of 30
Best Practices (Continued)
Check the assumptions of a model.
Use a Poisson model to simplify counts of rare events.
Copyright © 2011 Pearson Education, Inc.
29 of 30
Pitfalls
Do not presume independence without checking.
Do not assume stable conditions routinely.
Copyright © 2011 Pearson Education, Inc.
30 of 30