Chapter 17: The binomial model of probability

Report
Chapter 17:
The binomial model of probability
AP Statistics B
1
Outline of today’s lecture
1. Review of geometric model
2. Algebra 2 review: permutations and
combinations
3. The binomial model: how many times does
an event occur in n trials?
4. Practice: review of homework problems
2
Geometric model:
Based on geometric series
• From Algebra 2 (hope you remember!):
series = adding a sequence of numbers
• Geometric sequence=a sequence of numbers
that increases by a constant multiple
– Example: 1, 2, 4, 8, 16, 32, 64, 128, 256, …
• Compare arithmetic sequence: increases by adding a single
number, e.g., 1 3 5 7 9 …. where you add 2 to each
successive term
– Each number is TWICE as large as the number before
– Another way of putting it is that the ratio of a number
to its neighbor is constant, i.e., xn+1/xn=some constant
3
Geometric model:
generalizing the model
• The definition of a geometric series can be
generalized to the following:
or (if you want to show all the exponents):
• Note that if you take the ratio of one term to
another, each term increases by a multiple of r
4
Geometric model:
series models failure/success
• Think about the sequences we’ve been
looking at:
fffs (3 failures before one success)
qqqqqqqp (7 failures before a success)
• What does this look like?
• You can model both of these as terms in a
geometric series:
fffs = f3s
qqqqqqqp = q7p
5
Geometric model:
geometric sequence the source of the
name
• The nth term in a geometric series is the
equivalent of saying “n-1 failures followed by
one success” (qn-1p)
• Geometric series are also useful because there
are formulas to calculate the sum of n entries
• Hopefully, this background makes it easier to
understand and remember the model
6
Permutations and combinations:
counting without replacements
• To understand the binomial theorem, we need to
review permutations and combinations.
• In theory, you studied this in Algebra 2, where
permutations and combinations were supposed
to be about 10% of the CST you took.
– This is only “in theory”
– Most Algebra 2 teachers skip this part entirely
• So let’s do a quick review to remind you of how
these types of probabilities work
7
Permutations and combinations:
basic ideas
• The concept behind permutations AND
combinations is simply that you’re selecting
samples without replacement
• E.g., you’re drawing cards from a deck.
Typically, once you draw a card, you don’t
replace it, so the probability or number of
possibilities for the next card changes
• Keep this model in mind as we go through the
examples.
8
Permutations and combinations:
introducing the concept
• Let’s select three cards from a 52-card deck at random.
How many possible combinations can we have?
• 1st card: 52 possibilities (all cards are still in the deck
• 2nd card: 51 possibilities (we’ve already drawn one card
and haven’t replaced it)
• 3rd card: 50 possibilities (2 cards already drawn and not
replaced; 50 cards left in the deck)
• Total number of possibilities: 52×51× 50=132,600
• We will use this concept for BOTH permutations and
combinations
9
Permutations and combinations:
permutations, aka order matters
• Permutations are the simplest, so we start with
them.
• Permutations are where ORDER MATTERS.
• Examples:
– A password with distinct entries (32516 is not the
same as 32561)
– Money (would you rather have $321 or $123?)
– A hand in 5-card stud poker
– License plates/serial numbers: (ACE 723 isn’t CEA 237)
10
Permutations and combinations:
permutation notation
• Abbreviated as P(n, k)
• Translation to English: out of n objects, pick k
at random where order matters.
• Other notations: nPk,
• Computationally, P(n, k) is as follows:
n×(n-1)×(n-2)×…×(n-k+1)
• The problem with this formulation is that it’s
hard to write algebraically
11
Permutations and combinations:
introducing factorial
• Examples:
5! (read as “five factorial) = 5×4×3×2×1=120
10! =10×9×8×7×6×5×4×3×2×1 =3,628,800
• General formula of n!
n(n-1)(n-2)(n-3)…4×3×2×1
• Special cases:
0!=1 and 1!=1
12
Permutations and combinations:
why the factorial notation?
• Let’s illustrate with an example: 7P3
• In human language, that means how many
permutations (order matters!) can we make
when choosing from 7 objects?
• Answer: 7×6×5 = 210. But we’d have to write
this all out.
• Instead, we have a formula, which we’ll
explore on the next slide:
13
Permutations and combinations:
applying the permutation formula
• Let’s see how to apply
• Apply it to our earlier problem of 7P3
– Remember that n=7 and k=3
• 7P3 = 7!/(7-3)! = 7!/4!
• So let’s write it out as a fraction:
• By using the formula, we can manipulate it
algebraically in a way we couldn’t do with 7(6)(5)
14
Permutations and combinations:
permutation practice
• Here are two permutations: 12 P4 and 10P4
• Spend 2-3 minutes and calculate each of
these.
• When you’re done, somebody volunteer and
work them out on the board.
• After you agree on an answer, check them on
the next slide.
15
Permutations and combinations:
permutation practice (answers)
•
12
P4
• and 10P4
16
Permutations and combinations:
combinations (order doesn’t matter)
• Examples of combinations:
– Bridge hands (you sort into suits after you get
them, anyway)
– Any sorted list (alphabetically, numerically top to
bottom or bottom to top)
– People selected for a project (goal is participation,
not ranking by when selected)
• Talk among yourselves and come up with 3-4
combinations. Share, and decide as a group
whether they are or not.
17
Permutations and combinations:
combinations: danger of over-counting
• If we use the formula for permutations, we’ll
end up with too many that are the same
• Let’s explore how we can reduce the number
logically
• Suppose we’re selecting three numbers at a
time. If we draw 1, 2, and 3, how many
different permutations can we get with just
those 3 numbers? Take a couple of minutes
and see what you come up with.
18
Permutations and combinations:
combinations: groups of 3
Here is a list of all the
possible permutations
of the numbers 1, 2,
and 3:
1. 1 2 3
2. 1 3 2
3. 2 1 3
4. 2 3 1
5. 3 1 2
6. 3 2 1
• To get six from 3 sounds
like a factorial, and it is
• 3!= 3×2×1=6
• There’s a better way of
analyzing it, though,
which we’ll do on the
next slide
19
Permutations and combinations:
combinations: k!
• Imagine that we have three slots for the
numbers: _____ ______ ______
• How many choices to we have for the first slot? 3.
• How many for the second slot?
– 2, because we’ve already placed one of the numbers
in the first slot
• How many for the last slot?
– Just 1, because we’ve used up all the others
• This can be generalized to k!
20
Permutations and combinations:
combinations—how much did we overcount?
• Each of the groups is overcounted 6 times if we
use the permutation formula
• Using C for combination, this means that we can
express the relationship between permutations
and combination as this:
nPr
= r! × C
• In regular language, using the permutation
formula gives us r! too many combinations.
• On the next slide, we’ll see how to use similar
nomenclature and come up with the formulae for
combinations.
21
Permutations and combinations:
combinations: formula and nomenclature
• We can write the symbols for combinations
like those for permutations: C(n, r) or nCr or
• Bringing in the formula from the last slide and
rewriting it:
nPr
= r!nCr
Divide by r! and get
22
Permutations and combinations:
summary
• Permutations: how
many unique results,
order matters
• Ways of writing
permutations:
nPk
• Formula for nPr:
• Combinations: how
many unique results,
order doesn’t matter
• Ways of writing
combinations:
C(n, r) or nCr or
• Formula for nCr :
23
Permutations and combinations:
link to binomial model
• The formula for combinations can be written as
the binomial coefficient:
C
n
r
 n
n!

 
r ! n  r !  r 
• Whenever you see the binomial coefficient, think
combinations!
24
Stop for today
• This is far enough for today.
• On the next slide are the answers to the
homework problems for today.
• No homework tonight; everybody needs to
recover from the WASC visit.
25
Homework, Chapter 17
8, 10, 12, 13, 14
8. (a) 0.0184
(b) 0.183
10. 50
12. (a) 12.5 (b) 0.716 (c) 0.0527 (d) 0.528
13. (a) 0.0745 (b) 0.502 (c) 0.211 (d) 0.0166
(e) 0.0179 (f) 0.9987
14. (a) 0.032 (b) 0.738 (c) 0.00768 (d) 0.246
(e) 0.901 (f) 0.345
26
Instructions re narration for slides
28 through 44
• No narration on this slide (yes, reading is important)
• You may want to skip over some of the slides, so
playing the narration is optional.
• If you want to hear the narration, click the icon in the
lower left-hand corner of the slide.
• If you don’t click the icon, the narration will not play.
• Hope this makes it easier for you guys to negotiate
through the slides!
• Automatic narration resumes on slide 45
27
Homework:
Exercise 8
• Same procedurally as Exercise 7
– Success (good chip)=98%=0.98
– Failure (bad chip, rejected)=2%=0.02
• But remember….you may have to change your
definition of “success” and “failure”, as we’ll
see
• But now, for the solutions….
28
Homework:
Exercise 8(a)
• Probability that 5th chip is first bad chip?
• Already, we have to change “failure” to
“success” and “success” to “failure”
• Set-up: first 4 chips are “failures,” i.e., they’re
ok; the 5th chip is the “success,” i.e., it’s bad
(don’t look at me; I just solve them, I don’t make them up)
• So, ffffs, or (0.98)4(0.02)=0.0184
29
Homework:
Exercise 8(b)
• Probability of finding ONE (1) bad one within
the first ten tested
• This is equivalent to asking what’s the
likelihood of find NO bad ones (all good ones)
• There’s a language issue here: it’s really
finding one OR MORE bad ones, which is 1P(no bad chips in first 10)
• 1-p10=1.000-(0.98)10=1.000-0.817=0.183
30
Homework:
Exercise 10
• How many do you expect to test before find a
bad one?
• Same set-up as Exercise 9.
• This type of question for the geometric model
requires finding the mean
• For the geometric model, the mean is 1/p
• p, which means “success,” actually is the failure
rate of chips, and is 0.02
• Therefore, the mean is 1/0.02 = 50
31
Homework:
Exercise 12
• Same set-up as Exercise 11 (really! Would I lie
to you?)
• p=0.08 (8% of all males are colorblind, which
may explain men’s fashion sense)
• Therefore, what’s the rate of men who are
NOT colorblind? (q)
Answer: 1-p=1.00-0.08=0.92
32
Homework:
Exercise 12(a)
• Q: On average, how many men should the
research expect to check to find one who is
colorblind?
• Obviously, requests the mean, or
1/p=1/0.08=12.5
• It’s perfectly OK for the average to be a fraction.
• If you added up lots and lots of samples, that
would be your average. It’s to give as a general
idea of how many people you need to check, not
a precise answer. After all, how do you check half
a person?
33
Homework:
Exercise 12(b)
• No colorblind in 1st 4 men?
• Straightforward: 4 straight “failures”
• Answer: (0.92)4=0.716
34
Homework:
Exercise 12(c)
• First colorblind man is 6th checked?
• Straightforward, but remember that “success”
is finding a colorblind man (0.08) and “failure”
is NOT finding a colorblind man!
• Five failures, followed by one success = fffffs =
(0.92)5(.08)= 0.659 × 0.08 = 0.0527
• (Remember to use the “^” key above the
division sign—0.92^5= (0.92)5
35
Homework:
Exercise 12(d)
• Probability of finding somebody who’s
colorblind before testing the 10th man?
• This is the complement of finding NOBODY
who was colorblind during the 1st 9 men.
• I.e., 1-q9 = 1.000-(0.92)9 = 1.000 –0.472 =
0.528 (rounded up from 0.52 78387367)
36
Homework:
Exercise 13
• This exercise is a combination of the binomial
model (which we haven’t quite gotten to yet)
and the geometric. We can do the first 3
subparts using the geometric model.
• Binomial or geometric, we always use the
same setup with p and q
• We’ll start with success=p=lefthandness=0.13
(I like this since I’m left-handed)
• Failure = q = 0.87 (or 1 – 0.13, which is 1 - p)
37
Homework:
Exercise 13(a)
• The first lefty is the fifth person chosen.
• Very straightforward: ffffs or qqqqp
• (0.87)4(0.13)1=0.0745
38
Homework:
Exercise 13(b)
• Q: “there are some lefties among the 5
people”
• This requires a clever answer….rather than
calculate…how many combinations….lots,
anyway, let’s calculate ZERO lefties and
subtract that from one.
• In other words: 1-fail-fail-fail-fail-fail= 1-(0.87)5
=.502
39
Homework:
Exercise 13(c)
• “the first lefty is the second or third person”
• Model: you have two different components,
which we’ll then add.
• 1st possibility: fail, followed by success (no lefty
first, lefty second)=0.87(.13)=.1131
• 2nd possibility: two fails, followed by a success =
.872(.13)=0.0984
• Add 1st and 2nd and get 0.2114
• We will do (d) through (f) tomorrow.
40
Homework:
Exercise 14
• Similar to Exercise 13, except that we have six
shots at a target, and a different success rate:
p=0.80
q=0.20
• She also shoots 6 arrows, which we will need
to remember for answering the later
questions.
41
Homework:
Exercise 14(a)
• “first bull’s-eye comes on the third arrow.”
• Again, another very straightforward geometric
sequence calculation: two fails (0.20) and a
success (0.8)
• Answer is (0.2)2(.8)=.04(.8)=0.032, or 3.2%
• Note: we don’t need (and don’t care about)
anything that happened after the third arrow.
42
Homework:
Exercise 14(b)
• “She misses the bull’s eye at least once”
• Implicit is the fact that she shoots 6 arrows.
• This also calls for a clever response, unless you
want to be calculation 6! permutations!
• The clever response is that we only need to
calculate the case where she NEVER misses,
which is 6 successive successes, or (0.8)6 = 0.262
• Now we subtract this from 1, which equals 0.738,
which is the percentage where she gets between
zero and five bull’s-eyes.
43
Homework:
Exercise 14(c)
•
•
•
•
“her first bull’s-eye comes on the 4th or 5th arrow.”
This is almost identical to 13(c)
1st bull’s-eye on 4th arrow =fffs=(0.2)3(0.8) = 0.0064
2nd bull’s-eye on 5th arrow=ffffs (4 f’s, not 3) =
(0.2)4(0.8)
– Calculator tip: don’t recalculate, just multiply your prior
answers by 0.2……discuss why
– You should get .00128
• Add both together and get 0.0064+0.00128 = 0.00768
• We will work on (d) through (f) tomorrow.
44
Stop for today
• We will start the
binomial material
tomorrow, and finish it
next week.
• You will be doing some
intense calculations to
see how the binomial
coefficient works, so
bring your calculators
and get lots of rest!
45
The binomial model:
jumping in with both feet
• There’s a close connection between tree
diagrams, combinations, expanding binomial
expressions, and the binomial model
• I’ve debated about giving you a lot of background
on it to show you the connections FIRST
• Instead, I think it will be more effective to show
you how to solve the problems, and then show
you the connections, which then may be more
meaningful.
46
The binomial model:
47
The binomial model:
48
The binomial model:
49
The binomial model:
50
The binomial model:
51
The binomial model:
52
The binomial model:
53
The binomial model:
54
The binomial model:
55
The binomial model:
not quite the geometric model
• Remember that the geometric model tells us,
for example, what’s the probability that a
basketball player shooting 80% (clearly not
Jose Fuentes) will not make a basket until his
5th shot
• Rather, the binomial model lets us determine
how many ways there are of him making, say
2 shots out of 5
• Why is this complicated?
56
The binomial model:
alternative: the tree diagram
• Remember doing the tree
diagram in Ch 16?
• We could do one for
binomial distributions as
well
• Problem: the branches
increase exponentially
• At the right is a diagram of a
tree with just 5 levels: 32
different outcomes!
• That’s a lot of
multiplication: 5 × 32
multiplication problems!
57
The binomial model:
Example using (x+y)2
• Let’s approach the binomial problem by looking
at what happens when we multiply out a
binomial
• Lets start with expanding (x+y)2
• (x+y)2 = (x+y)(x+y)=(by the distributive property)
x(x+y)+y(x+y)=x2+xy+xy+y2=x2+2xy+y2
• The important thing to notice is that we actually
have FOUR (4) terms when we expand a binomial
58
The binomial model:
Tracking the members of a binomial
• It’s easier to see what we’re doing if we label
each factor as unique
• So, instead of (x+y)(x+y), let’s write the
multiplication problem as (x1+y1)(x2+y2)
• Expanding as before, we get:
x1 (x2+y2) +y1 (x2+y2)=x1 x2+x2y2++y1x2+y1y2
• Let’s now set x=x1=x2, y=y1=y2 and substitute:
xx+xy+xy+yy=x2+2xy+y2
59
The binomial model:
So what?
• Good question, and an important question. Hang
in there for a bit.
• How many terms did we get when we expanded
the binomial?
– 4, of which 2 (the xy-terms) were alike, so we
combined them.
– How do the number of unique terms relate to the
exponent? (n+1, where n=exponent)
• Now let’s do a cube to see if we can discover a
pattern. (Math is more about patterns than
numbers, in case you haven’t noticed!)
60
The binomial model:
The trinomial case
• Same as with (x+y)2, except now it’s (x+y)3
• We’re also going to use x1, y1, x2, y2, x3 and y3
to track individual terms
• So (x+y)3 becomes (x+y)(x+y)(x+y), which we’ll
write as (x1+y1)(x2 +y2)(x3+y3)
• We can do this simply by setting x= x1=x2 =x3
and y=y1= y2 =y3
61
The binomial model:
Expanding the trinomial
• We have (x1+y1)(x2 +y2)(x3+y3)
• Expanding out the first two terms, we get
(x1x2+x2y2++y1x2+y1y2)(x3+y3)=
x3x1x2+x3x2y2+x3y1x2+x3y1y2+y3x1x2+y3x2y2+y3y1x2+y3y1y2
• 8 (23) terms; here’s how you simplify by substituting x and y back in to
each term:
x3x1x2+x3x2y2+x3y1x2+x3y1y2+y3x1x2+y3x2y2+y3y1x2+y3y1y2
(1)
xxx + xxy + xyx + xyy + yxx + yxy + yyx + yyy
(circles=like terms) (2)
xxx + xxy + xxy + xxy + xyy + xyy + xyy + yyy
(3)
x3 + 3x2y + 3xy2 + y3
(4)
62
The binomial model:
63
The binomial model:
64
The binomial model:
65
The binomial model:
66
The binomial model:
67
The binomial model:
68
The binomial model:
69
Practice:
70
Practice:
71
Practice:
72
Practice:
73
Practice:
74
Practice:
75
Practice:
76
Practice:
77
Practice:
78
Practice:
79

similar documents