Binomial Distributions Section 8.1. The 4 Commandments of Binomial Distributions There are n trials....

14
Binomial Binomial Distributions Distributions Section 8.1 Section 8.1

Transcript of Binomial Distributions Section 8.1. The 4 Commandments of Binomial Distributions There are n trials....

Page 1: Binomial Distributions Section 8.1. The 4 Commandments of Binomial Distributions There are n trials. There are n trials. Each trial results in a success.

Binomial Binomial DistributionsDistributions

Section 8.1Section 8.1

Page 2: Binomial Distributions Section 8.1. The 4 Commandments of Binomial Distributions There are n trials. There are n trials. Each trial results in a success.

The 4 “Commandments” of The 4 “Commandments” of Binomial DistributionsBinomial Distributions

There are There are nn trials. trials. Each trial results in a Each trial results in a

successsuccess or a or a failurefailure. . The probability of a The probability of a

success, success, pp, is constant , is constant from trial to trial. from trial to trial.

The trials are The trials are independent. independent.

-Knowing the result of -Knowing the result of one observation tells one observation tells you nothing about the you nothing about the other observations.other observations.

Page 3: Binomial Distributions Section 8.1. The 4 Commandments of Binomial Distributions There are n trials. There are n trials. Each trial results in a success.

Sampling Distribution of a Sampling Distribution of a CountCount

Choose an SRS of size n from a population Choose an SRS of size n from a population with proportion p of successes. When the with proportion p of successes. When the population is much larger than the population is much larger than the sample, the count X of successes in the sample, the count X of successes in the sample has approximately the binomial sample has approximately the binomial distribution with parameters n and p.distribution with parameters n and p.

Essentially, it is sometimes sufficient for Essentially, it is sometimes sufficient for outcomes of an event to be “close enough” outcomes of an event to be “close enough” to independent to use binomial to independent to use binomial calculations.calculations.

Page 4: Binomial Distributions Section 8.1. The 4 Commandments of Binomial Distributions There are n trials. There are n trials. Each trial results in a success.

Key formulasKey formulas

x np

x np (1 )x np p

If data fits binomial setting, then random variable X = number of successes is called a binomial random variable.

And the probability distribution of X is called a binomial distribution. We represent this distribution as B(n,p).

Page 5: Binomial Distributions Section 8.1. The 4 Commandments of Binomial Distributions There are n trials. There are n trials. Each trial results in a success.

Given a discrete random variable X, Given a discrete random variable X, the the probability distribution probability distribution functionfunction assigns a probability to assigns a probability to each value of X. The probabilities each value of X. The probabilities must satisfy the rules for must satisfy the rules for

probabilities given in Chapter 6probabilities given in Chapter 6……

P.D.F.P.D.F.

Page 6: Binomial Distributions Section 8.1. The 4 Commandments of Binomial Distributions There are n trials. There are n trials. Each trial results in a success.

Rule 1:Rule 1: 0 ≤ P(A) ≤ 1 for any event A. 0 ≤ P(A) ≤ 1 for any event A. Rule 2:Rule 2: P(S) = 1. P(S) = 1. Rule 3:Rule 3: complement rule; for any complement rule; for any

event A,event A, P(AP(ACC) = 1 – P(A)) = 1 – P(A)

Rule 4:Rule 4: Addition rule: Addition rule: P(A or B) = P(A) + P(B) – P(A and B)P(A or B) = P(A) + P(B) – P(A and B)

Rule 5:Rule 5: Multiplication rule: Multiplication rule: P(A and B) = P(A)P(B|A)P(A and B) = P(A)P(B|A)

Rules of Probability--Rules of Probability--Chapter 6Chapter 6

Page 7: Binomial Distributions Section 8.1. The 4 Commandments of Binomial Distributions There are n trials. There are n trials. Each trial results in a success.

Given a random variable X, the Given a random variable X, the cumulative distribution functioncumulative distribution function of X calculates the sum of the of X calculates the sum of the probabilities for 0, 1, 2, …, up to the probabilities for 0, 1, 2, …, up to the value X. That is, it calculates the value X. That is, it calculates the probability of obtaining at most X probability of obtaining at most X successes in successes in nn trials. trials.

C.D.F.C.D.F.

Page 8: Binomial Distributions Section 8.1. The 4 Commandments of Binomial Distributions There are n trials. There are n trials. Each trial results in a success.

Calculator TipsCalculator Tips To determine P(X = x)To determine P(X = x) Use binompdf(n, p, x): where n is the number Use binompdf(n, p, x): where n is the number

of observations, p is the probability of success.of observations, p is the probability of success. To determine P(X ≤ x)To determine P(X ≤ x) Use binomcdf(n, p, x): where n is the number Use binomcdf(n, p, x): where n is the number

of observations, p is the probability of success.of observations, p is the probability of success. To determine P(X > x)To determine P(X > x) Use 1-binomcdf(n, p, x): where n is the Use 1-binomcdf(n, p, x): where n is the

number of observations, p is the probability of number of observations, p is the probability of success.success.

To determine P(X < x)To determine P(X < x) Use binomcdf(n, p, x-1): where n is the Use binomcdf(n, p, x-1): where n is the

number of observations, p is the probability of number of observations, p is the probability of success.success.

Page 9: Binomial Distributions Section 8.1. The 4 Commandments of Binomial Distributions There are n trials. There are n trials. Each trial results in a success.

Binomial Setting Binomial Setting ExampleExample A baseball pitcher throws 30 pitches in an A baseball pitcher throws 30 pitches in an

inning. The pitcher throws a strike 60% of inning. The pitcher throws a strike 60% of the time. the time.

A)A) Is this binomial setting? Let’s check!Is this binomial setting? Let’s check!1. Can each observation be categorized as a 1. Can each observation be categorized as a success or failure?success or failure?YES: Throwing a strike is a success, throwing a ball (not a

strike) is a failure.2. Are there a fixed number of observations?2. Are there a fixed number of observations?YES: The pitcher throws 30 pitches.

3. Are all n of the observations independent?3. Are all n of the observations independent?YES: While it is possible that one pitch impacts another, it is still safe to assume that they are independent.

4. Is the probability of success the same for 4. Is the probability of success the same for each observation?each observation?YES: While a pitcher may get tired as the game wears on,

thus changing the probability of throwing a strike, it is safe to assume that throughout a season, the probability of throwing a strike is the same.

Page 10: Binomial Distributions Section 8.1. The 4 Commandments of Binomial Distributions There are n trials. There are n trials. Each trial results in a success.

Binomial Setting Binomial Setting Example (cont.)Example (cont.)B) How many strikes does the pitcher B) How many strikes does the pitcher

expect to throw? expect to throw? C) What is the standard deviation? C) What is the standard deviation?

D) What is the probability that the D) What is the probability that the pitcher throws exactly 21 strikes in pitcher throws exactly 21 strikes in the inning? the inning?

E) What is the probability that he E) What is the probability that he throws 15 or fewer strikes? throws 15 or fewer strikes?

F) What is the probability that he F) What is the probability that he throws more than 11 strikes?throws more than 11 strikes?

np = (30)(0.6) = 18

(1 ) (30)(0.6)(1 0.6) 2.6833np p

binompdf(30, 0.6, 21) ≈ 0.0823

binomcdf(30, 0.6, 15) ≈ 0.1754

1 – binomcdf(30, 0.6, 11) ≈ 0.9917

Page 11: Binomial Distributions Section 8.1. The 4 Commandments of Binomial Distributions There are n trials. There are n trials. Each trial results in a success.

What if we are between What if we are between values?values?

Consider the pitcher scenario.Consider the pitcher scenario. What is the probability that he throws What is the probability that he throws

between 12 and 20 strikes?between 12 and 20 strikes? We can’t do binomcdf directly or 1-We can’t do binomcdf directly or 1-

binomcdfbinomcdf Try:Try:

binomcdf(30, 0.6, 20) – binomcdf(30, 0.6, binomcdf(30, 0.6, 20) – binomcdf(30, 0.6, 11)11)

=0.8154=0.8154

Page 12: Binomial Distributions Section 8.1. The 4 Commandments of Binomial Distributions There are n trials. There are n trials. Each trial results in a success.

Normal Approximation toNormal Approximation tothe Binomial Distributionthe Binomial Distribution

If X is a count having the binomial distribution If X is a count having the binomial distribution with parameters n and p, then when n is larger, with parameters n and p, then when n is larger, X is approximately N(X is approximately N(npnp, ). , ).

As a rule of thumb, we can use this As a rule of thumb, we can use this approximation when np ≥ 10 and n(1-p) ≥ 10.approximation when np ≥ 10 and n(1-p) ≥ 10.

Essentially, we can use this approximation if we Essentially, we can use this approximation if we expect at least 10 successes and 10 failures.expect at least 10 successes and 10 failures.

The accuracy of the Normal Approximation The accuracy of the Normal Approximation improves as the sample size increasesimproves as the sample size increases

It is most accurate for any fixed n when p is It is most accurate for any fixed n when p is close to ½ and least accurate when p is near 0 or close to ½ and least accurate when p is near 0 or 1 and the distribution is skewed.1 and the distribution is skewed.

(1 )np p

Page 13: Binomial Distributions Section 8.1. The 4 Commandments of Binomial Distributions There are n trials. There are n trials. Each trial results in a success.

Normal Approximation Normal Approximation ExampleExample Many local polls of public opinion use Many local polls of public opinion use

samples of size 400 to 800. Consider a samples of size 400 to 800. Consider a poll of 400 adults in Atlanta that asks the poll of 400 adults in Atlanta that asks the question “Do you approve of President question “Do you approve of President Bush’s response to the World Trade Bush’s response to the World Trade Center terrorists attacks in September Center terrorists attacks in September 2001?” Suppose we know that President 2001?” Suppose we know that President Bush’s approval rating on this issue Bush’s approval rating on this issue nationally is 92% a week after the nationally is 92% a week after the incident.incident.

What is the random variable X?What is the random variable X? X = the number of polled people that X = the number of polled people that

approve of Bush’s responseapprove of Bush’s response

Page 14: Binomial Distributions Section 8.1. The 4 Commandments of Binomial Distributions There are n trials. There are n trials. Each trial results in a success.

Normal Approx. Ex. Normal Approx. Ex. ContinuedContinued Is X binomial?Is X binomial?

n = 400, approve = success & not = failure, if n = 400, approve = success & not = failure, if polled separately should be independent, with polled separately should be independent, with random polling probability should be same for each random polling probability should be same for each person polledperson polled

Calculate the binomial probability that at most 358 Calculate the binomial probability that at most 358 of the 400 adults in the Atlanta poll answer “Yes” of the 400 adults in the Atlanta poll answer “Yes” to this question.to this question.

binomcdf(400, 0.92, 358) binomcdf(400, 0.92, 358) ≈≈ 0.0441 0.0441 Find the expected number of people in the sample Find the expected number of people in the sample

who indicate approval. Find the standard who indicate approval. Find the standard deviation of X.deviation of X.

We expect with We expect with Perform a normal approximation to the question Perform a normal approximation to the question

above if possible.above if possible. np=368≥10, n(1-p)=32≥10, normalcdf(0, 358, 368, np=368≥10, n(1-p)=32≥10, normalcdf(0, 358, 368,

) ) ≈ 0.0327≈ 0.0327

(400)(.92)(.08) 5.4259X (400)(.92) 368X

29.44