stats chapter 8
DESCRIPTION
TRANSCRIPT
Chapter 8
The Binomial and Geometric Distributions
8.1 THE BINOMIAL DISTRIBUTION
Definitions
A Binomial Setting is an scenario where each of the following are true
1. Each observation is either a ‘success’ or a failure’ (2 outcomes)
2. There are a fixed number of observations (n)
3. Observations are independent4. The probability of success is the same
for each observation (p)
Definitions
The Binomial Distribution• X = # of successes from a binomial
setting• Abbreviated with “B(n, p)”
where n = number of trails, p = prob. of success
Definitions
The Binomial Distribution Examples• “X = The number of heads when 5 coins are
flipped”B(5, 0.5)
• “X = The number of heart cards drawn from a standard deck with replacement after 3 tries.”B(3, ¼)
• “X = The number of working computer chips in a set of 8 chips if the manufacturer has 0.1% defects”B(8, 0.999)
Sampling Distribution of a Count
• Suppose an SRS of size n is drawn from a population with a proportion p for success.
• Unless there is replacement, this isn’t binomial. Why?
• If the population is much greater than the sample size, then the sample has an approximate binomial distribution B(n, p)
• This helps use the binomial distribution in many cases that aren’t exactly a binomial setting.
Formulas for Binomial Settings
• Using a tree diagram, it is possible to formulate the binomial distribution.
• Example X = number of heads when a loaded coin is flipped 3 times (P(heads = 0.3)
Formulas for Binomial Settings
• Setting is B(3, .3)• Sample Space-– HHH, HHT, HTH, THH, HTT, THT, TTH, TTT
• ProbabilitiesP(X = 3) = 0.027,
• P(X = 2) = 3·(.3)2(.7) = 0.189, P(X = 1) = 3·(.3) (.7)2=0.441,
• P(X = 0) = (.7)3=0.343• Unfortunately, this works best only for simple
settings
Formulas for Binomial Settings
Binomial coefficientThis is a part of the formula for the binomial distribution.n = # trails, k = # of successYou may have seen this formula before!
!
! !
n n
k k n k
Formulas for Binomial Settings
Binomial coefficientYour calculator can find this coefficient for you[math] , “PRB,” “nCr”
example 3"3 nCr 1"
1
Formulas for Binomial Settings
Binomial ProbabilityIf we have a binomial setting B(n, p) and we want to know P(X = k)
k n knP X k p q
k
Formulas for Binomial Settings
Binomial ProbabilityActually your calculator is very efficient in these caculations.The binomial magic is [2nd] [vars] (dist), “binompdf(“
Again assuming B(n. p)
"binompdf , , "k n knP X k p q n p k
k
Some Alphabet Soup
• “pdf” means “probability distribution function,” which is exactly what we are doing!
• “binompdf” is the “binomial probability function”– This is a discrete probability distribution
• “cdf” means “cumulative distribution function”– This will add together a number of
successes.
Cumulative Binomial Distribution
• For the question, “if B(n, p), what is the probability k or less successes?”
• B(5, 0.33)P(X < 2) = P(X=0) + P(X=1) + P(X=2)
= binomcdf(5, 0.33, 2)• Pay attention to where the “equals”
goes!– Binomcdf(n,p, k) is always P(X < k)
Cumulative Binomial Distribution
• If B(6, 0.25), what is the probability of less than 4 successes?
• B(6, 0.25)• P(X < 4) = P(X<3) (always rewrite as
“<“)• = binomcdf(6, 0.25, 3)• =0.9624• Pay attention to where the “equals” goes!– binomcdf(n, p, k) is always P(X < k)
Cumulative Binomial Distribution
• For cases involving ‘X>k,’ or ‘X>k’ use the property of complimentary sets
• Pay attention to where the “=” goes!• In B(100, 0.95), what is the probability of
more than 90 successes?• B(100, 0.95)• P(X > 90)= 1- P(X<90)• = 1 - binomcdf(100, 0.95, 90)• =0.9718
Mean and Standard Deviation
For a binomial distribution B(n, p) the following formulas hold:
Remember that these are only for a binomial distributionWe should also note that can be thought of as the “expected value”
np
npq
Normal Approximation
• You should have noticed by now that the Binomial distribution produces a single peak distribution
• If p is within a certain set of numbers, the distribution is relatively symmetric.
• Because we like to use the Normal distribution, we have conditions under which the binomial distribution is approximately Normal
Normal Approximation
• A binomial distribution is approximately Normal N(np, (npq)) when both np > 10 and nq > 10.
• When using the Normal dist to approximate, be sure to: – state “Distribution is approximately Normal:
N(np, (npq))”– Show that the two conditions above are met
• Remember that this is an approximation, but it is most often good enough
8.2 THE GEOMETRIC DISTRIBUTION
The Geometric Setting
• The geometric setting is almost like the binomial setting with one major difference:
• Instead of asking “how many successes,” we ask, “when is the first success?”
The Geometric Setting
1. Observations are either “success” or “failure”
2. The observations are independent3. The probability of success is the
same for each observation4. The variable of interest is the
number of trails until the first success
Geometric Distribution
• If a random variable X satisfies the geometric setting, then we call the distribution of X a geometric distribution
FormulaP(X = k) = q(k-1)pnotice that this is (k-1) failures and one success
Geometric Distribution on the TI
• Like the Binomial Distribution, the Geometric Distribution is found at[2nd] [var] (dist)
• for G(p)P(X=k) = q(k-1)p = geompdf(p,k)
Geometric cdf
• The probability that the first success is within the first k trails can be given with:
• G(p)• P(X < k) = P(X=0) + P(X=1)+ …
+P(X=k)=geomcdf(p, k)
Geometric cdf
• What is the probability that the first “six” is rolled before four throws of a die?
• Pay attention to the “=“ sign• G(1/6)• P(X < 4) = P(X < 3)• = geomcdf(1/6, 3)• = 0.4213
Geometric cdf
• Use the compliment properties to find P(X>k)
• G(p)• P(X > k) = 1 – P(x < k)• And… pay attention to the ‘equal’
sign!!
Geometric cdf
• What is the probability that we roll a number less than 3 after 5 throws?
• G(2/6) (this corresponds to ‘1’ and ‘2’)
• P(X > 5) = 1 – P(X < 5)• = 1 – geomcdf(2/6, 5)• = 0.1317
Geometric cdf
• Alternatively, the probability that it takes more than k trails to see the first success can be given by:
• P(X > k) = (1 – p)k
Mean and Standard Deviation
• Mean of a geometric distribution is given by:– = 1/p– This is the expected value for the first
success– “on average, the first success occurs on
the 1/p trail”
Mean and Standard Deviation
• Standard Deviation:
• This is not a Normal distribution, so don’t try to calculate z-scores and Normalcdf!
2
1 p
p