35
Chris Morgan, MATH G160 [email protected] January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Chris Morgan, MATH G160 [email protected] January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Embed Size (px)

Citation preview

Page 1: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Chris Morgan, MATH [email protected]

January 8, 2012Lecture 13

Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG

1

Page 2: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

2

Page 3: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Hypergeometric Distribution

3

With the binomial distribution you sample with replacement and count the number of successes after a set number of trials. But what if you sample without replacement?

Now the trials are no longer independent and we can no longer use the binomial to model this situation. We need to look for another type of distribution that will describe these problems.

Page 4: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Hypergeometric Distribution

4

- Given a population with N members

- We are interested in an outcome that can be classified as a success or a failure

- Let the probability of success in the population be p

- Sample from this population without replacement of size n

Page 5: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Hypergeometric Distribution

5

Examples:

–The probability of a full house in a poker hand.–The probability of 3 brown M&M’s in a selection of 5 M&M’s from a bag with 20 brown M&M’s and 30 other colors.- The probability of selecting 3 out of 5 defective parts on a moving conveyor belt containing 100 parts

Page 6: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Hypergeometric Distribution

6

Notation: X ~ Hyp(N, n, p)

PMF: where: x = the # of successesn = the # of trials, or how

many we’re choosing

f(x) = the probability of x success in n trials

N = # of elements in population

m = # of elements in population

labeled a successp = probability of success in

ENTIRE population (m/N)

( )

n N n

x m xP X k

N

m

(1 )

( )

Np N p

x n xP X k

N

n

Page 7: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Hypergeometric Distribution

7

Expectation and Variance:

E(X) =

Var(X) =

mn

N

2

( )( )

( 1)

mn N n N m

N N

Page 8: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Hypergeometric Distribution

8

PMF:

is the number of ways m elements can be selected from a population of size N

is the number of ways that x successes can be selected from a total of r successes in the population

is the number of ways that m-x failures can be selected from a total of

N-n failures in the population

N

m

n

x

N n

m x

( )

n N n

x m xP X k

N

m

Page 9: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Hypergeometric Distribution

9

Notation: X ~ Hyp(N, n, p)

PMF: where: x = the # of successesn = the # of trials, or how

many we’re choosing

f(x) = the probability of x success in n trials

N = # of elements in population

r = # of elements in population

labeled a successp = probability of success in

ENTIRE population

( )

r N r

x n xP X k

N

n

Page 10: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Hypergeometric Distribution

10

Expectation and Variance:

E(X) =

Var(X) =

rnN

11

r r N nnN N N

Page 11: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Hypergeometric Distribution

11

PMF:

is the number of ways n elements can be selected from a population of size N

is the number of ways that x successes can be selected from a total of r successes in the population

is the number of ways that n-x failures can be selected from a total of

N-r failures in the population

N

n

r

x

N r

n x

( )

r N r

x n xP X x

N

n

Page 12: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Hypergeometric Example #1

12

A bag of Skittles has 20 reds and 80 pieces of other colors. Find the probability that you randomly select 4 reds in a handful of 10 Skittles…

a) With replacement

b) Without replacement

Page 13: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Hypergeometric Example #1a

13

a) With replacement:

X ~ Bin(n = 4, p = 0.2)

P(X=4) = 4 610(0.2) (0.8) 0.0881

4

Page 14: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Hypergeometric Example #1b

14

b) Without replacement:

X ~ Hyp(N=100, n=10, p=0.2)

P(X=4) =

(1 ) 20 80

4 60.0841

100

10

Np N p

x n x

N

n

Page 15: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Hypergeometric Example #1c

15

c) What is the expected number of red Skittles in a handful of 20 pieces?

With replacement:

E(X) = np = 20(0.2) = 4

Without replacement:

E(X) = n(r/N) = 20(20/100) =4

Page 16: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Hypergeometric Example #1c

16

c) What is the variance of number of red Skittles in a handful of 20 pieces?

With replacement:

Var(X) = np(1-p) = 20(0.2)(0.8) = 3.2

Without replacement:

Var(X) = ( ) (100 20)

(1 ) 20(0.2)(0.8) 2.5859( 1) (100 1)

N nnp p

N

Page 17: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Hypergeometric Example #2

17

In a jar there are 20,000 coins, 500 of which are quarters. You select 5 coins randomly. What is the probability that you get exactly 2 quarters?

a)With replacement?

b)Without replacement?

Page 18: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Hypergeometric Example #3

18

A marine biologist has been tracking manatees in the Miami region. There are a total of 200 manatees in the region, and 80 of them have been tagged with their information recorded. Each day he will take a random sample of 12 manatees (without replacement) and will continue to record information on those that have been tagged. Let T be the number of manatees that have been tagged in your sample.

T ~ Hyp(N=200, n=12, p=80/200=0.4)

Page 19: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Hypergeometric Example #3a

19

N=number on POPULATION n=how many we’re choosing r=number of “desirable” objects or “success” objects in population p=probability of success in ENTIRE population = r/N

What is the probability you choose exactly 3 tagged manatees?

Page 20: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Hypergeometric Example #3b

20

Given you have less than 4 tagged manatees, what is the probability you have exactly 3 tagged manatees?

Page 21: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Hypergeometric Example #3c

21

If he continues this same procedure for 4 days (all days independent of one another), what is the probability that he has exactly 3 tagged manatees in his sample all 4 days?

How many tagged manatees you expect to see in a sample of 12?

Page 22: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Hypergeometric Example #4

22

How often do we REALLY know the population size? Collecting records from all the marine biologists in Florida, we have a total of 500 tagged manatees. How do we estimate the population size?

If we sample from this LARGE population, say there are a total of 2,000 manatees (and 500 tagged), we select 10 of them.

Page 23: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Hypergeometric Example #4a

23

1. What is the exact distribution for the number of tagged manatees in our sample?

2. What is the exact probability we have exactly 4 tagged manatees in our sample?

Page 24: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Hypergeometric Example #4b

24

3. What is a good approximation for the number of tagged manatees in our sample?

4. What is the approximate probability we select 4 tagged manatees in the sample?

Page 25: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Hypergeometric Example #5

25

Little Johnny has a jar containing 10 blue marbles and 12 red marbles. He reaches into the jar and selects 5 marbles without replacement. Let X denote the number of red marbles he obtains.

a) Identify the distribution and parameters corresponding to the random variable X.

Page 26: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Hypergeometric Example #5

26

b) What is the probability Johnny obtains exactly 3 red marbles?

c) If Johnny repeats this experiment a large number of times, on average how many red marbles can he expect to obtain?

Page 27: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Hypergeometric Example #6a

27

In a certain mid-west town consisting of 100 residents, 60% are in favor of raising the local sales tax rate while the other 40% are opposed. Suppose a sample of 10 residents is taken without replacement. Let X denote the number of residents who are in favor of raising taxes.

a) Identify the distribution and parameters corresponding to the random variable X.

Page 28: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Hypergeometric Example #6b

28

b) What is the probability of obtaining at least 9 residents who are in favor of raising taxes?

c) What number of residents in favor of raising taxes can we expect to obtain?

Page 29: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Hypergeometric Example #7a

29

Axline Computers manufactures personal computers at two plants, one in Texas and the other in Hawaii. The Texas plant has 40 employees; the Hawaii plant has 20. A random sample of 10 employees is to be asked to fill out a benefits questionnaire. Let X be a worker from Hawaii.

a) What is the probability that none of the employees in the sample are from the Hawaii plant?

Page 30: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Hypergeometric Example #7b

30

b) What is the probability that one of the employees in the sample works at the plant in Hawaii?

c) What is the probability that two or more of the employees in the sample work at the plant in Hawaii?

d) What is the expected number of employees from the Hawaii plant to be included in the sample?

Page 31: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Approximating Hypergeometric

31

We can approximate the hypergeometric distribution by the binomial distribution if: N > 20*n

This is because N is so big there is very little chance of getting the same object; so even though HG is without replacement and Bin is with replacement, which such a large N it is as if the binomial distribution is now without replacement because the chance of grabbing the same object twice is so small.

Page 32: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Approximation Example #1

32

You roll two 20-sided dice 400 times. Let X be the number of double 20’s you see. Find the approximate probability you see 2 double 20’s.

Page 33: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Approximation Example #2

33

A shoe store has 2,000 pairs of shoes, 800 are men’s shoes, and the rest are women’s. You randomly select 4 pairs of shoes without replacement. What is the approximate probability you select exactly 2 pairs of men’s shoes?

Page 34: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Approximation Example #3

34

A Chicago baseball convention has 5,000 attendees consisting of 3,500 Cubs fans and 1,500 White Soxs fans. Ten people are randomly chosen to participate in a contest to win World Series tickets. What is the approximate probability exactly 7 Cubs fans are selected?

Page 35: Chris Morgan, MATH G160 csmorgan@purdue.edu January 8, 2012 Lecture 13 Chapter 5.6: Hypergeometric Distribution, Binomial Approx. to HG 1

Approximation Example #4

35

Suppose an earthquake will occur somewhere in California each day with probability .005. Assuming earthquake occurrences are weakly dependent from day to day find the approximate probability Californians will experience no earthquakes this year. How many earthquakes can Californians expect to experience in 2010?