Chapter 17: probability models

31
AP Statistics CHAPTER 17: PROBABILITY MODELS Unit 4

description

Unit 4. Chapter 17: probability models. AP Statistics. Bernoulli Trials. The basis for the probability models we will examine in this chapter is the Bernoulli ( Ber - Noo -Lee) trial. We have Bernoulli trials if: there are two possible outcomes (success and failure). - PowerPoint PPT Presentation

Transcript of Chapter 17: probability models

Page 1: Chapter  17:  probability models

AP StatisticsCHAPTER 17: PROBABILITY MODELS

Unit 4

Page 2: Chapter  17:  probability models

The basis for the probability models we will examine in this chapter is the Bernoulli (Ber-Noo-Lee) trial.

We have Bernoulli trials if:

there are two possible outcomes (success and failure).

the probability of success, p, is constant.

the trials are independent.

BERNOULLI TRIALS

Page 3: Chapter  17:  probability models

A single Bernoulli trial is usually not all that interesting.

A Geometric probability model tells us the probability for a random variable that counts the number of Bernoulli trials until the first success.

Geometric models are completely specified by one parameter, p, the probability of success, and are denoted Geom(p).

THE GEOMETRIC MODEL

Page 4: Chapter  17:  probability models

Each observation is in one of two categories: success or failure.

The probability is the same for each observation.

Observations are independent. (Knowing the result of one observation tells you nothing about the other observations.)

The variable of interest is the number of trials required to obtain the first success.

THE GEOMETRIC SETTING

Page 5: Chapter  17:  probability models

A new sales gimmick is to sell bags of candy that have 30% of M&M’s covered with speckles. These “groovy” candies are mixed randomly with the normal candies as they are put into the bags for distribution and sale. You buy a bag and remove candies one at a time looking for the speckles. Is a geometric probability model appropriate

here?

THE GEOMETRIC MODEL EXAMPLE

Page 6: Chapter  17:  probability models

A new sales gimmick is to sell bags of candy that have 30% of M&M’s covered with speckles. These “groovy” candies are mixed randomly with the normal candies as they are put into the bags for distribution and sale. You buy a bag and remove candies one at a time looking for the speckles. What’s the probability that the first speckled one we

see is the fourth candy we get? Note that the skills to answer this question come from the very first day of the probability unit.

THE GEOMETRIC MODEL EXAMPLE (CONT.)

Page 7: Chapter  17:  probability models

What’s the probability that the first speckled one is the tenth one? Write a general formula.

What’s the probability that the first speckled candy is one of the first three we look at?

How many do we expect to have to check, on average, to find a speckled one?

THE GEOMETRIC MODEL EXAMPLE (CONT.)

Page 8: Chapter  17:  probability models

Geometric probability model for Bernoulli trials: Geom(p)

p = probability of successq = 1 – p = probability of failureX = number of trials until the first success occurs

P(X = x) = qx-1p

THE GEOMETRIC MODEL FORMULAS

E(X) 1p 2

qp

Page 9: Chapter  17:  probability models

Postini is a global company specializing in communications security. The company monitors over 1 billion Internet messages per day and recently reported that 91% of emails are spam.

Let’s assume that your emails are typical—91% spam. We’ll also assume that you aren’t using a spam filter, so every message goes to your inbox. And, since spam comes from many different sources, we’ll consider your messages to be independent.

Overnight your inbox collects email. When you first check your email the next day, about how many spam emails should you expect to have to wade through and discard before you find a real message? What’s the probability that the 4 th message in your inbox is the first one that isn’t spam?

THE GEOMETRIC MODEL EXAMPLE 2

Page 10: Chapter  17:  probability models

One of the important requirements for Bernoulli trials is that the trials be independent.

When we don’t have an infinite population, the trials are not independent. But, there is a rule that allows us to pretend we have independent trials:

The 10% condition: Bernoulli trials must be independent. If that assumption is violated, it is still okay to proceed as long as the sample is smaller than 10% of the population.

INDEPENDENCE

Page 11: Chapter  17:  probability models

People with O-negative blood are “universal donors.” Only about 6% of people have O-negative blood.1. If donors line up at random for a blood drive, how many

do you expect to examine before you find someone who has O-negative blood?

2. What’s the probability that the first O-negative donor found is one of the four people in line?

THE GEOMETRIC MODEL EXAMPLE 3

Page 12: Chapter  17:  probability models

2nd DISTR geometpdf( Note the pdf for Probability Density Function Used to find any individual outcome Format: geometpdf(p,x)

2nd DISTR geometcdf( Note the cdf for Cumulative Density Function Used to find the first success on or before the xth trial Format: geometcdf(p,x)

Try the last example using the calculator! Much easier…

GEOMETRIC PROBABILITIES USING CALCULATOR

Page 13: Chapter  17:  probability models

Permutations: When r items are selected from n available items (without replacement). Therefore, the order matters.

Calculate the following permutations:

PERMUTATIONS VS. COMBINATIONS

)!(!rnnprn

310 p 27 p324

315

pp

Page 14: Chapter  17:  probability models

Example: Forty-three sprinters race in a 5K. How many ways can they finish first, second, and third?

PERMUTATIONS VS. COMBINATIONS (CONT.)

Page 15: Chapter  17:  probability models

You are picking 3 different flavors to put on your banana split. You can choose from 25 different flavors. How many ways can this be done?

Does the order matter here?

PERMUTATIONS VS. COMBINATIONS (CONT.)

Page 16: Chapter  17:  probability models

Combination Rule: When order does not matter, and we want to calculate the

number of ways (combinations) r items can be selected from n different items.

RECAP: When different orderings of the same items are counted separately, we have a permutation problem, but when different orderings of the same items are not counted separately, we have a combination problem.

Calculate the following combinations:

PERMUTATIONS VS. COMBINATIONS (CONT.)

!)!(!rrn

nCrn

416C 212C 525

310

CC

Page 17: Chapter  17:  probability models

Example: You are picking 3 different flavors to put on your banana split. You can choose from 25 different flavors. How many ways can this be done?

Example: You want to buy three different CDs from a selection of 5 CDs. How many ways can you make your selection?

PERMUTATIONS VS. COMBINATIONS (CONT.)

Page 18: Chapter  17:  probability models

The geometric model counts the number of trials before the first success.

A Binomial model tells us the probability for a random variable that counts the number of successes in a fixed number of Bernoulli trials.

Two parameters define the Binomial model: n, the number of trials; and, p, the probability of success. We denote this Binom(n, p).

THE BINOMIAL MODEL Day 2

Page 19: Chapter  17:  probability models

In n trials, there are

ways to have k successes. Read nCk as “n choose k.”

Note: n! = n (n – 1) … 2 1, and we’re not overly excited about n n! is read as “n factorial.”

THE BINOMIAL MODEL (CONT.)

!

! !n knC

k n k

Page 20: Chapter  17:  probability models

Binomial probability model for Bernoulli trials: Binom(n,p)

n = number of trialsp = probability of successq = 1 – p = probability of failureX = # of successes in n trials

P(X = x) = nCx px qn–x

THE BINOMIAL MODEL (CONT.)

np npq

Page 21: Chapter  17:  probability models

Recap: The communications monitoring company has reported that 91% of e-mail messages are spam. Suppose your inbox contains 25 messages.

What are the mean and standard deviation of the number of real messages you should expect to find in your inbox?

What is the probability that you will find only 1 or 2 real messages?

BINOMIAL MODEL EXAMPLE

Page 22: Chapter  17:  probability models

2nd DISTR binompdf( Note the pdf for Probability Density Function Used to find any individual outcome Format: binompdf(n,p,x)

2nd DISTR binomcdf( Note the cdf for Cumulative Density Function Used for getting x or fewer successes among n trials Format: binomcdf(n,p,x)

Note: if you wanted to find up to a #, use the complement rule. All possible probabilities in the model will add up to 1.

BINOMIAL PROBABILITY ON CALCULATOR

Page 23: Chapter  17:  probability models

20 donors come to a blood drive. Recall that 6% of people are “universal donors.”

What are the mean and standard deviation of the number of universal donors among them?

What is the probability that there are 2 or 3 universal donors?

BINOMIAL MODEL EXAMPLE 2

Page 24: Chapter  17:  probability models

When dealing with a large number of trials in a Binomial situation, making direct calculations of the probabilities becomes tedious (or outright impossible).

Fortunately, the Normal model comes to the rescue…

THE NORMAL MODEL TO THE RESCUE!

Page 25: Chapter  17:  probability models

As long as the Success/Failure Condition holds, we can use the Normal model to approximate Binomial probabilities.

Success/failure condition: A Binomial model is approximately Normal if we expect at least 10 successes and 10 failures:

np ≥ 10 and nq ≥ 10

THE NORMAL MODEL TO THE RESCUE! (CONT.)

Page 26: Chapter  17:  probability models

Recall the communications monitoring company Postini has reported that 91% of email messages are spam. Recently, you installed a spam filter. You observe that over the past week it okayed only 151 of 1422 emails you received, classifying the rest as junk. Should you worry the filtering is too aggressive?

What’s the probability that no more than 151 of 1422 emails is a real message?

NORMAL MODEL EXAMPLE

Page 27: Chapter  17:  probability models

When we use the Normal model to approximate the Binomial model, we are using a continuous random variable to approximate a discrete random variable.

So, when we use the Normal model, we no longer calculate the probability that the random variable equals a particular value, but only that it lies between two values.

CONTINUOUS RANDOM VARIABLES

Page 28: Chapter  17:  probability models

Be sure you have Bernoulli trials.

You need two outcomes per trial, a constant probability of success, and independence.

Remember that the 10% Condition provides a reasonable substitute for independence.

Don’t confuse Geometric and Binomial models.

Don’t use the Normal approximation with small n.

You need at least 10 successes and 10 failures to use the Normal approximation.

WHAT CAN GO WRONG?

Page 29: Chapter  17:  probability models

Bernoulli trials show up in lots of places.

Depending on the random variable of interest, we might be dealing with a

Geometric model

Binomial model

Normal model

RECAP

Page 30: Chapter  17:  probability models

Geometric model When we’re interested in the number of

Bernoulli trials until the next success.

Binomial model When we’re interested in the number of

successes in a certain number of Bernoulli trials.

Normal model To approximate a Binomial model when we

expect at least 10 successes and 10 failures.

RECAP (CONT.)

Page 31: Chapter  17:  probability models

Day 1: # 1, 3, 9 – 15 ODD

Day 2: # 2, 5, 10, 12, 17, 19, 21, 29, 32

Day 3: # 14 – 22 EVEN, 23, 25, 27, 37

ASSIGNMENTS: PP. 401 – 404