Classroom Expectations

Download Report

Transcript Classroom Expectations

More Probability
The Binomial and Geometric
Distributions
What you’ll learn
• The conditions for a binomial setting
• Calculating binomial probabilities
• How to find the mean and standard deviation
of a binomial setting
• The conditions for a geometric setting
• Calculating geometric probabilities
• How to find the mean of a geometric setting
Binomial vs Geometric
• In this lesson we will learn how to determine
if a setting is Binomial or Geometric and how
to use the correct distribution to calculate
probabilities
• Binomial: A binomial setting looks at a fixed
number of independent observations and
counts the number of successes.
• Geometric: A geometric setting counts the
number of observations until a success is
observed. This distribution is sometimes
called a waiting distribution.
The Quiz
• Consider the following:
 On a multiple-choice quiz, Joan guesses on
each of five questions. There are four
possible answers for each question. Assuming
that Joan did not study and must guess on
each question,
 What is the probability that she will get
exactly 2 questions correct?
 What is the probability that Joan passes the
quiz?
• We can model this type of setting with a
mathematical model called a Binomial Model.
Conditions for a Binomial Setting
• A setting follows a binomial model if the
following is true:
Fixed number of observations
Independent observations
Two possible outcomes (success/failure)
Same probability for success on each
outcome
• So if the setting FITS, we can use a
binomial model when finding probabilities.
What about our Quiz?
• Let’s check the conditions
F There are 5 questions on our quiz, n=5
I We are assuming that Joan did not study
and does not learn from each question, so
observations are independent
T There are two possible outcomes,
– Answers correctly…….success
– Answers incorrectly…..failure
S
Since there are four possibilities with
only 1 correct answer, the probability of
success is p = .25
What about our Quiz?
• Let’s check the conditions
F There are 5 questions on our quiz, n=5
I We are assuming that Joan did not study
and does not learn from each question, so
observations are independent
T There are two possible outcomes,
– Answers correctly…….success
– Answers incorrectly…..failure
S
Since there are four possibilities with
only 1 correct answer, the probability of
success is p = .25
Calculating probabilities
• So how can we use the binomial model to
calculate probabilities?
 Let’s first consider the question:
• What is the probability that Joan answers 2
questions correctly ---- P(X=2)
 Now Joan getting 2 questions correct can
happen in several ways.
CCWWW
WCCWW
WWCCW
CWCWW
WCWCW
WWCWC
CWWCW
WCWWC
WWWCC
CWWWC
• In fact, there are 5C2 possibilites
Finding combinations
• So what is 5C2 and how do we calculate it?
 5C2 is short-hand notation for the number of
ways we can choose two items from a group of
5.
 The formula for calculating this number is
Ck 
n
n!
k ! ( n  k )!
So:
C2 
5
5  4  3  2 1
2  1( 3  2  1)
 Notice that the (n-k)! cancels with factors in
the numerator. (That always happens—go
ahead try it out!)
Finding combinations
• So what is 5C2 and how do we calculate it?
 5C2 is short-hand notation for the number of
ways we can choose two items from a group of
5.
 The formula for calculating this number is
Ck 
n
n!
k ! ( n  k )!
So:
C2 
5
5  4  3  2 1
2  1( 3  2  1)
 Notice that the (n-k)! Cancels with factors in
the numerator. (That always happens—go
ahead try it out!)
Finding Combinations
• Since that cancellation happens every time,
we can short-cut our formula in the
following way---5
C2 
5  4  3  2 1
2  1( 3  2  1)
C2 
5
54
2 1
Notice that what is left in
the numerator is 5*4. We
can think about the
numerator as starting at “n”
and multiplying down “k”
factors.
The denominator, after
cancellations, consists of
2*1 which is simply “k!”
Finding Combinations on the TI
• To determine the number of combinations
using your TI-83/84 use the following
sequence of commands:
 “n”
 Math
 Prob
 3: nCr
 “k”
 Note: TI
uses “r” instead
of “k”
Finding a probability
• So, we have determined that on a 5 question quiz,
there are 10 ways in which Joan can get 2 problems
correct.
CCWWW
WCCWW
WWCCW
CWCWW
WCWCW
WWCWC
CWWCW
WCWWC
WWWCC
CWWWC
• Since multiplication is commutative, each of these
combinations has the same probability
 Two successes p=.25
 Three failures p=1-.25 = .75
• So the probability for each of these combinations is
.252 (.75)3 = .02637
• And since there are ten of these, the probability that
Joan gets exactly 2 questions correct is
10(.25)2(.75)3= .2637 or approx 26.37%
So what is the formula?
• Let’s look at that probability again:
 P(X=2) = 10 (.25)2 (.75)3
• Now let’s turn each piece into a formula:
• 10 -> is the number of ways the event can
happen, i.e. the number of combinations
(5C2)
• (.25)2 -> probability of a success raises to
the number of success in our observations
(p)2
• (.75) -> (1- probability of a success) raised to
the number of failures in our observations
(1-p)(5-2)
P(X=k) = nCk(p)k(1-p)(n-k)
What about multiple possibilities?
• What about our question: What is the
probability that Joan passes the class?
• Of course this happens if she get 3,4, or 5
questions correct.
• Of course we could set up a probability
distribution for each possibility and then use
what we know about probability distributions
to find the answer to that question
The Probability Distribution
• Let X = the number of questions Joan guesses
correctly.
• Then X takes on the values 0,1,2,3,4,5
• We can then find the probability for each of these
values using our binomial formula.
 P(X=0) = 5C0 (.25)0 (1-.25) (5-0) = .2373
 P(X=0) = 5C1 (.25)1 (1-.25) (5-1) = .3955
 P(X=0) = 5C0 (.25)0 (1-.25) (5-2) = .2637
 P(X=0) = 5C0 (.25)0 (1-.25) (5-3) = .0879
 P(X=0) = 5C0 (.25)0 (1-.25) (5-4) = .0147
 P(X=0) = 5C0 (.25)0 (1-.25) (5-5) = .00098
X
0
1
2
3
P(x)
.2373
.3955
.2637
.0879
4
5
.0147 .00098
Back to Multiple Possibilities
• What is the probability that Joan passes the
test?
• P(X ≥ 3) = P(X = 3) + P(X = 4) + P(X = 5)
• Now from our distribution
• P(X≥3) = .0879 + .0147 + .00098 = .0135
X
0
1
2
3
P(x)
.2373
.3955
.2637
.0879
4
5
.0147 .00098
Ok, so much for variables that have a small number
of possibilities….
But what if our event is looking a large number of
observations?
Binomial Probabilities and the TI
• Let’s find out how to use the calculator for
our probabilities.
• We can use the built in binomial distribution
to find probabilities.
• Let’s look at our first question again.
 P(X=2)
P(X=2)
TI Style
• 2nd VARS (this is the distribution menu)
• 0:binompdf(n,p,k)
• This distribution answers the
Questions P(X=k)
• n=5 (the number of questions)
• p=.25 (probability of success)
• k=2(the value we are interested in)
Cumulative Probabilities on the TI
• What about probabilities for more than 1
possibility, P(X ≤ 2 ) (This is the probability
that Joan fails the quiz)
• 2nd VARS
• A:binomcdf(n,p,k)
 (this answers the question P(X ≤ k)
We can verify from our table that this is in fact
the P(X≤ 2) = P(X=0) + P(X=1) + P(X=2)
= .2373 + .3955 + .2637
=
.8965
What about “greater than”
• So, what about the probability that Joan
passes the quiz? P(X ≥ 3)
• Since our calculator only finds probabilities
“less than” we first need to change the
probability and use complements
 P(X ≥ 3) = 1 – P(X ≤ 2)
Mean and Standard Deviation of the
Binomial Distribution
• We can find the mean and standard deviation of a
binomial distribution in the same way we found
means and standard deviations of any other discrete
distribution.
• However, we can also find the mean of a binomial
distribution by
• μ(x) = np
5(.25) = 1.25
– So, we would expect, on average, for Joan to answer 1.25
questions correctly.
• We can find the standard deviation
• σ(x) =
np (1  p ) 
5 (. 25 )( 1  . 25 )  . 9682
Summarizing the Binomial Distribution
• Remember to be a binomial setting, it must
– FITS
• To find individual probabilities use:
• P(X=k) = nCk(p)k(1-p)(n-k)
• The mean of a binomial setting:
• μ(x) = np
• The standard deviation of a binomial
• σ(x) =
np (1  p )
Geometric Distribution
• Now let’s move on to our Geometric (or
waiting distribution).
• The initial setting may be the same
 On a multiple-choice quiz, Joan guesses on
each of five questions. There are four
possible answers for each question. Assuming
that Joan did not study and must guess on
each question,
• It’s the question that is different.
 What is the probability that the first correct
answer Joan gets is on the 3rd question?
Conditions for a Geometric Distribution
• A setting follows a geometric model if the
following is true:
Waiting for a success
Independent observations
Two possible outcomes (success/failure)
Same probability for success on each
outcome
• So if the setting WITS, we can use a
binomial model when finding probabilities.
What about our Quiz?
• Let’s check the conditions
W We are waiting for the first correct
answer
I
We are assuming that Joan did not study
and does not learn from each question, so
observations are independent
T There are two possible outcomes,
– Answers correctly…….success
– Answers incorrectly…..failure
S
Since there are four possibilities with
only 1 correct answer, the probability of
success is p = .25
Finding Geometric Probabilities
• Since our conditions have been met, we can
use a geometric model to find probabilities.
• Our question: What is the probability that
the first correct answer is the 3rd question?
• That means our sequence is
– WWC
• Now the probability that the answer is
correct is p=.25 and the probability that the
answer is wrong is (1-.25)=.75
• So, our probability is .75(.75)(.25)
=.752(.25)
= .1406
So, the formula is……
• Let’s find a general formula for the
geometric distribution.
• Now for this type of distribution, there will
always be 1 less failure than the number, k,
we are interested in.
 i.e.---if we want the probability that the first
success comes on the 5th question, that means
we have had 4 failures.
• In general, where k is the first success,
p=probability of a success…
 P(X=k) = (1-p)(k-1)(p)
Geometric on the TI
• Like the binomial, the TI-83/84 has built-in
distributions geometric settings.
• 2nd VARS (this is the distribution menu)
• D: geometpdf(p,k)
• This distribution answers the
Question P(X=k)
• p=.25 (probability of success)
• k=3(the value we are interested in)
Multiple Probabilities
TI-style
• 2nd VARS
• E: geometcdf(p,k)
 (this answers the question P(X ≤ k)
• So, for P(X ≤ 3)
Multiple Probabilities
• What if our question was:
 What is the probability that the first correct
answer is one of the first 3 questions?
• P(X≤ 3)= P(X=1) + P(X=2) + P(X=3)
= .750 (.25) + .751 (.25) + .752 (.25)
= .25 + .1875 + .1406
= .5781
And Greater than????
• Just like for binomial, we want to turn a
greater than question into 1 – “less than or
equal to”
• For example, what is the probability that it
takes more than 2 questions to get a correct
answer?
• P(x > 2) = 1- P(X ≤ 2), then with technology
Note: be careful when
rewriting.
P(X > k)  1 – P(X ≤ k)
P(X ≥ k) 1 – P (X ≤ (k-1))
What about the Mean?
• To find the average number of observations it will
take to get 1 success use the following:
 Μ(x) =
1
p
Note:
We do not calculate a standard deviation for a
geometric distribution.
Binomial vs Geometric
• Binomial:
 This is a counting
distribution. We
have a fixed number
of observations and
are counting the
number of successes
• P(X=k)=>n Ck pk(1-p)(n-k)
• M(x) = np
• σ(x) = √(np(1-p))
• Geometric
 This is a waiting
distribution. We are
waiting for the first
success.
 P(X=k) => (1-p)(k-1)p
 M(x) => 1/p
Additional Resources
• The Practice of Statistics—YMM
 Pg 415 - 452
• The Practice of Statistics—YMS
 Pg 438 - 483