Transcript ch 8 notes

8.1 – The Binomial Distributions
When there are two outcomes to a setting it is said
to be a binomial setting. One of success and
failure.
• The number of heads when flipping a coin
• The number of free throws made
• The number of girls born in a family
The Binomial Setting:
(BINS)
B: Binomial, Success or Failure
I: The n observations are independent
N: There is a fixed number of observations, n
S: The same probability of success for each
observation
If the conditions are met, then:
The random variable X = the number of successes in
n observations.
It has a binomial distribution, and is denoted as
X ~ B(n,p)
Example #1: Identify each as a binomial distribution.
According to the Textbook of Medical Physiology, 9% of the
population has blood type B. Suppose we choose 8 people at
random from the population and test the blood type of each.
Assume that each measurement is independent from the next.
B: Binomial, Success = Blood type B or Failure: Not B
I: Says to assume
N: n = 8
S: Each person has a probability of 0.09 to have
blood type B.
Yes, Binomial. Let X = # of people with blood type B.
X ~ B(8, 0.09)
Example #1: Identify each as a binomial distribution.
Privacy is a concern for many users of the Internet. One
survey showed that 59% of all Internet users are somewhat
concerned about the confidentiality of their email. Assume
opinions of users are independent of each other and we select
a random sample of 10 Internet users.
B: Binomial, Success = Concern for confidentiality or Failure:
Not concerned
I: Says to assume
N: n = 10
S:
Each person has a probability of 0.59 to be concerned
Yes, Binomial. Let X = # of people with concern for confidentiality
X ~ B(10, 0.59)
Example #1: Identify each as a binomial distribution.
Deal 10 cards from a shuffled deck and count the number of X
red cards. There are 10 observations, and each gives either a
red or black card.
B:
Binomial, Success = Red card or Failure: Not Red
I:
Not independent! When you take one, it changes the
probability of the next one
No, Not Binomial.
Binomial Coefficient:
The number of ways to arrange k success among n
observations (n choose k):
n!
n
   k! n  k !


k 
Math – Prob – nCr
nCk
Example #2
Find how many ways you can arrange 5 out of 7 objects.
n
7!
7  6  5!
76
7!
n!





 
2 1
5!(7  5)! 5!2! 5! 2  1
 k  k ! n  k !
42
 21
2
OR:
7 nCr 5 = 21
Example #3
Suppose I have a group of 4 students and I want to
choose 1 of them as a volunteer. In how many ways
can I choose 1 out of 4 students?
n
n!
4!
4  3!
4!


 4


 
 k  k ! n  k !
3!
1!(4  1)! 1!3!
OR:
4 nCr 1 = 4
Binomial Probability:
If X has the binomial distribution with n observations
and probability p of success on each observation, the
possible values of X are:
n k
nk


p
(
1

p
)
P(X = k) =  
k 
2nd – Dist – binompdf(n, p, k)
Example #4
According to the Textbook of Medical Physiology, 9% of the
population has blood type B. Suppose we choose 8 people at
random from the population and test the blood type of each.
Assume that each measurement is independent of the next. The
number of people we observe with blood type B has the following
binomial distribution.
a. What is the probability that 3 of these people have
blood type B?
n k
8
n k
3
8 3
   0.09 (1  0.09) 
P(X = 3) =   p (1  p)
k 
 3
(56)(0.000729)(0.91)5  0.02548
OR:
binompdf( n, p, k)
binompdf( 8, 0.09, 3) = 0.02548
Example #4
According to the Textbook of Medical Physiology, 9% of the
population has blood type B. Suppose we choose 8 people at
random from the population and test the blood type of each.
Assume that each measurement is independent of the next. The
number of people we observe with blood type B has the following
binomial distribution.
b. What is the probability that no more than 1 of these
people have blood type B?
P(X = 0) + P(X = 1)
n k
8 
n k
0
80
P(X = 0) =   p (1  p)
   0.09 (1  0.09) 
k 
 0
(1)(1)(0.91)8  0.47025
n
8




k
n

k
1
81
P(X = 1) =
  p (1  p)    0.09 (1  0.09) 
k 
1 
(8)(0.09)(0.91)  0.372068
7
P(X = 0) + P(X = 1) = 0.47025 + 0.372068 = 0.84232
OR:
binompdf( n, p, k)
binompdf( 8, 0.09, 0) + binompdf( 8, 0.09, 1) =
0.84232
Binomial Probability:
If you are looking for more than one value, you can
find that number and less than using the cumulative
density function.
2nd – Dist – binomcdf(n, p, k)
(Always finds the probability of less than or equal to)
Example #5
A biologist is studying a new hybrid tomato. It is known that the
seeds of this hybrid tomato have probability .30 of germinating.
The biologist plants 7 seeds. What is the probability that less
than 3 seeds will germinate?
B:
I:
Binomial, Success = Germinating Tomato or Failure: Not
germinating
It is safe to assume independence
N: n = 7
S:
Each plant has a probability of 0.30 of germinating
Yes, Binomial. Let X = The number of germinating tomatoes
X ~ B(7, 0.30)
Example #5
A biologist is studying a new hybrid tomato. It is known that the
seeds of this hybrid tomato have probability .30 of germinating.
The biologist plants 7 seeds. What is the probability that less
than 3 seeds will germinate?
P(X = 0) + P(X = 1) + P(X = 2)
Where n = 7, p = 0.30, k = 2,
binomcdf(7, 0.30, 2) = 0.64707
Example #6
The manager of The Burger Eatery notes that there is a 40%
chance that the next person who comes in will order a hamburger
and a 60% chance that they will order a cheeseburger. What is the
probability that, out of the next five customers, at least two will
order a hamburger?
B: Binomial, Success = Next person orders a burger or Failure:
Not order a burger
I: It is safe to assume independence
N: n = 5
S:
Each person has a probability of 0.40 of ordering a burger
Yes, Binomial. Let X = The number hamburgers ordered
X ~ B(5, 0.40)
Example #6
The manager of The Burger Eatery notes that there is a 40%
chance that the next person who comes in will order a hamburger
and a 60% chance that they will order a cheeseburger. What is the
probability that, out of the next five customers, at least two will
order a hamburger?
P(X = 2) + P(X = 3) + P(X = 4) + P(X = 5)
Where n = 5, p = 0.40, k = 1,
1 – binomcdf(5, 0.40, 1) = 1 – 0.33696 = 0.66304
Mean and Standard Deviation of a Binomial RV:
If a count X has the binomial distribution with
number of observations n and probability of success p,
then:
 X  np
 X  np(1 p)
Example #7
Jim enjoys playing basketball. He makes approximately 50% of
his attempts during a game. If he attempts 6 shots in a game,
what is the mean and standard deviation of baskets Jim will
make?
Let X = # of baskets made in a game
 X  np 
6  0.50 = 3
 X  np(1 p)  (6)(0.5)(1  0.5) 
1.5  1.2247
Example #8
The management for the mall claims that 20% of the parking
space around the mall area is used by the local movie theater
goers. A sample of 10 parking spaces was randomly selected. What
is the expected number of spaces used by the movie theater goers
in the sample? What is the standard deviation of spaces used by
the movie theater goers in the sample?
Let X = # of parking spaces being used by movie goers
 X  np 
10  0.20 = 2
 X  np(1 p)  (10)(0.2)(1  0.2) 
1.6  1.2649
Normal Approximation to the Binomial Distribution:
You can use the normal distribution to estimate the
probability of a binomial distribution if:
Rule of Thumb:
np ≥ 10
Then:
X ~ B(n, p)
and
n(1 – p) ≥ 10
can be approximated by
N (X , X )  N (np, np(1  p))
Example #9
A recent survey asked a nationwide random sample of 2500 adults
if they agreed or disagreed that “I like buying new clothes, but
shopping is often frustrating and time-consuming.” Suppose that
60% of all adults would agree if asked this question.
a. Are we able to use the normal distribution?
Rule of Thumb:
np ≥ 10
and
n(1 – p) ≥ 10
(2500)(0.60) ≥ 10
(2500)(1 – 0.60) ≥ 10
1500 ≥ 10
1000 ≥ 10
Yes
Example #9
A recent survey asked a nationwide random sample of 2500 adults
if they agreed or disagreed that “I like buying new clothes, but
shopping is often frustrating and time-consuming.” Suppose that
60% of all adults would agree if asked this question.
b. What is the mean and standard deviation?
Let X = # of people who agree with the quote
 X  np 
2500  0.60 = 1500
 X  np(1 p)  (2500)(0.6)(1 0.6) 
600  24.494897
Example #9
A recent survey asked a nationwide random sample of 2500 adults
if they agreed or disagreed that “I like buying new clothes, but
shopping is often frustrating and time-consuming.” Suppose that
60% of all adults would agree if asked this question.
c. What is the probability that less than 1450 adults would
agree if asked this question?
 = 24.49

Z= x–

1450 – 1500
=
24.49
– 50
= 24.49
.
1450
=1500
= – 2.04
Example #9
A recent survey asked a nationwide random sample of 2500 adults
if they agreed or disagreed that “I like buying new clothes, but
shopping is often frustrating and time-consuming.” Suppose that
60% of all adults would agree if asked this question.
c. What is the probability that less than 1450 adults would
agree if asked this question?
P(Z < – 2.04) =
Example #9
A recent survey asked a nationwide random sample of 2500 adults
if they agreed or disagreed that “I like buying new clothes, but
shopping is often frustrating and time-consuming.” Suppose that
60% of all adults would agree if asked this question.
c. What is the probability that less than 1450 adults would
agree if asked this question?
P(Z < – 2.04) = 0.0207
OR: normalcdf( -1000000000, 1450, 1500, 24.49) =
0.0206
Example #9
A recent survey asked a nationwide random sample of 2500 adults
if they agreed or disagreed that “I like buying new clothes, but
shopping is often frustrating and time-consuming.” Suppose that
60% of all adults would agree if asked this question.
d. Compare your answer to ‘c’ with the binomial probability
setting.
binomcdf( n, p, k)
Where n = 2500, p = 0.60, k = 1449,
binomcdf( 2500, 0.60, 1449) = 0.0198
The binomial probability is slightly smaller, but it is
close to the normal approximation.
Example #10
The general ethnic profile of Denver is about 42% minority and
58% Caucasian. Suppose the city of Denver recently hired 60
new grounds and maintenance workers. It claimed that the
hiring practice is completely impartial without regard to ethnic
background. However, 12 of the new employees were minorities,
and a complaint has been filed.
a. Are we able to use the normal approximation?
Rule of Thumb:
np ≥ 10
and
n(1 – p) ≥ 10
(60)(1 – 0.42) ≥ 10
(60)(0.42) ≥ 10
34.8 ≥ 10
25.2 ≥ 10
Yes
Example #10
The general ethnic profile of Denver is about 42% minority and
58% Caucasian. Suppose the city of Denver recently hired 60
new grounds and maintenance workers. It claimed that the
hiring practice is completely impartial without regard to ethnic
background. However, 12 of the new employees were minorities,
and a complaint has been filed.
b. What is the mean and standard deviation?
Let X = # of grounds & maintenance workers that are minorities
 X  np 
60  0.42 = 25.2
 X  np(1 p)  (60)(0.42)(1 0.42) 
14.616  3.8231
Example #10
The general ethnic profile of Denver is about 42% minority and 58%
Caucasian. Suppose the city of Denver recently hired 60 new grounds and
maintenance workers. It claimed that the hiring practice is completely
impartial without regard to ethnic background. However, 12 of the new
employees were minorities, and a complaint has been filed.
c. What is the probability that 12 or less minorities are
hired as new grounds and maintenance workers?
 = 3.823
x
–

Z=

12 – 25.2
=
3.823
–13.2
= 3.823
.
12
=25.2
= – 3.45
Example #10
The general ethnic profile of Denver is about 42% minority and 58%
Caucasian. Suppose the city of Denver recently hired 60 new grounds and
maintenance workers. It claimed that the hiring practice is completely
impartial without regard to ethnic background. However, 12 of the new
employees were minorities, and a complaint has been filed.
c. What is the probability that 12 or less minorities are
hired as new grounds and maintenance workers?
P(Z < – 3.45) =
Example #10
The general ethnic profile of Denver is about 42% minority and 58%
Caucasian. Suppose the city of Denver recently hired 60 new grounds and
maintenance workers. It claimed that the hiring practice is completely
impartial without regard to ethnic background. However, 12 of the new
employees were minorities, and a complaint has been filed.
c. What is the probability that 12 or less minorities are
hired as new grounds and maintenance workers?
P(Z < – 3.45) = 0.0003
OR: normalcdf( -1000000000, 12, 25.2, 3.823) =
0.0002775
8.2 – The Geometric Distributions
The Geometric Setting:
(BINS)
B:
Binomial: Success and Failure
I:
Observations are independent
N:
The number of trials needed to get a
success
S:
The probability of success is the same
for each observation
If the conditions for a geometric distribution are
met, then:
X = # of trials needed for the first success

Geometric Probability:
The probability of the first success on the nth trial is:
P(X  n)  (1 p) p
n1
For first success:
2nd – Dist – geometpdf(p, k)
For success at or before a number:
2nd – Dist – geometcdf(p, k)

Geometric Probability:
The probability that it takes more than n trials to see
the first success:
P(X  n)  (1 p)
n
Geometric Probability:
1
X 
p

1 p
X 
2
p
Example #1
Suppose the proportion of people who own a pet in Pleasant
City is 0.87.
a. Identify the distribution and define X.
B:
Binomial: Success= own pet and Failure = don’t
I:
Safe to assume independence.
N:
The number of trials needed to find a
pet owner
S:
The probability of a pet owner is the
same, 0.87
Lex X = # of people needed to find a pet owner
Example #1
Suppose the proportion of people who own a pet in Pleasant
City is 0.87.
b. If a person is chosen at random, what is the probability of
choosing a pet owner on the 3rd try?
P(X  3)  (1 p)
0.132 • 0.87 =
n1
p  (1 0.87) (0.87) 
0.01473
OR: geometpdf(0.87,
 3) = 0.014703
31
Example #1
Suppose the proportion of people who own a pet in Pleasant
City is 0.87.
c. Before the 3rd try?
P(X = 0) + P(X = 1) + P(X = 2)
Let p = 0.87 and k = 0, 1, and 2
geometcdf(0.87, 2) = 0.9831
Example #1
Suppose the proportion of people who own a pet in Pleasant
City is 0.87.
d. What is the probability that you find such a pet owner after
the 3rd try?
P(X  3)  (1 p)  (1 0.87) 3 
n

0.002197
Example #1
Suppose the proportion of people who own a pet in Pleasant
City is 0.87.
e. How many people would you expect to ask before finding a
pet owner?
1
1
X  

p 0.87

1.149
Example #1
Suppose the proportion of people who own a pet in Pleasant
City is 0.87.
f. If 30 people are chosen at random, how many pet owners
should be expected in the sample?
Note: Now n is fixed, and it is binomial
X  np 
30 • 0.87 = 26.1
Example #2
Suppose that it is known that only 14% of all US citizens who
take trips go outside the United States. You choose a traveler
randomly until you find one who has gone outside the US for a
vacation.
a. Identify the distribution and define X.
B: Binomial: Success= take trips outside the US and
Failure = don’t
I:
Safe to assume independence.
N:
The number of trials needed to find a person who has
gone outside the US
S:
The probability of a traveler is the same, 0.14
Let X = # of people needed to find a person who travels
outside the US
Example #2
Suppose that it is known that only 14% of all US citizens who
take trips go outside the United States. You choose a traveler
randomly until you find one who has gone outside the US for a
vacation.
b. What is the probability that you find such a traveler on
the 5th try?
P(X  5)  (1 p)
0.864 • 0.14 =
n1
p  (1 0.14) (0.14) 
0.0766
OR: geometpdf(0.14,
 5) = 0.0766
51
Example #2
Suppose that it is known that only 14% of all US citizens who
take trips go outside the United States. You choose a traveler
randomly until you find one who has gone outside the US for a
vacation.
c. What is the probability that you find such a traveler on or
before the 5th try?
P(X = 0) + P(X = 1) + P(X = 2) + P(X = 3) + P(X = 4) + P(X = 5)
Let p = 0.14 and k = 0, 1, 2, 3, 4, and 5
geometcdf(0.14, 5) = 0.5296
Example #2
Suppose that it is known that only 14% of all US citizens who
take trips go outside the United States. You choose a traveler
randomly until you find one who has gone outside the US for a
vacation.
d. What is the probability that you find such a traveler after
the 5th try?
P(X  5)  (1 p)  (1 0.14) 5 
n

0.4704
Example #2
Suppose that it is known that only 14% of all US citizens who
take trips go outside the United States. You choose a traveler
randomly until you find one who has gone outside the US for a
vacation.
e. How many would you expect to choose before finding a
traveler?
1
1
X  

p 0.14

7.1429