Binomial vs. Hypergeometric - IEOM Society · 2017-07-23 · Results and Conclusions This Java...

Preview:

Citation preview

Poster ID 19

Binomial vs. Hypergeometric

Yvanny Chang

What’s the difference?

1 © IEOM Society International

Project Introduction

Can we find examples of them in

everyday life?

Y E S

In Statistics, Binomial is replacement and Hypergeometric is no

replacement.

Can we use a Java program to

show the difference?

2 © IEOM Society International

Case Study: Powerball Lotto • Jan. 13 2016 created largest Jackpot in U.S. history of $1.5 billion.

• Binomial (Replacement)

–1 Red Ball (can be the same

number as the 5 White Balls)

Question: what if red ball has no duplicate?

(Hypergeometric; No Replacement)

• Hypergeometric (No replacement)

–5 White Balls

3 © IEOM Society International

47

White Balls

(No replacement, or

no duplicates)

Red Balls

(Replacement

(duplicates allowed))

What do you think the probability difference between binomial

and hypergeometric is?

Rule of Red Ball

4 © IEOM Society International

Hand Calculation

1.12X difference

Mega number replacement Mega number without replacement

5 © IEOM Society International

General Java Model

For X number of white balls, Y number of red balls, what is winning

chance for the following cases?

5+1: Match 5 white balls and 1 red ball

5+0: Match 5 white balls and no red ball

4+1: Match 4 white balls and 1 red ball

4+0: Match 4 white balls and no red ball

Y=X

Y=X-5

6 © IEOM Society International

Java Flowchart

X Y

Develop a Java program to calculate the probabilities for different X, Y

and matching scenarios. This is the Java Flowchart:

More scenarios and variables can be

simulated in Java without much modification. 7 © IEOM Society International

Create Java Script

public static double FiveAndOne(int X, int Y){ // Match “5 + 1”

return combination(X,5)*Y;

}

public static double FourAndZero(int X, int Y){ // Match “4 + 0”

return combination(X,5)*Y/combination(5,4)/combination(X-5,1)/combination(Y-1,1);

}

public static void main{ // Main

program to print out the result

int X=59, Y=59;

System.out.println("5 + 1 X="+X+" Y="+Y+": Binomial is " + FiveAndOne(X,Y));

System.out.println("5 + 1 X="+X+" Y="+Y+": Hypergeometric is " +FiveAndOne(X,Y-5));

System.out.println("5 + 1 X="+X+" Y="+Y+": Ratio is "

+FiveAndOne(X,Y)/FiveAndOne(X,Y-5));

}

8 © IEOM Society International

Matching Jackpot 5+1 Probability For the scenario of Matching 5 in X number of white balls, 1 in Y

number of Red balls.

● The total space= C (X, 5) * C (Y, 1)

● The probability of matching 5 White Balls = C (5,5)= 1

● The probability of matching Red Ball= C (1, 1)= 1

● The total probability of 5+1 is 1 in C (X, 5) * C (Y, 1)

C (5, 5)

C (1, 1) 9 © IEOM Society International

Matching 4+0 Prize Probability

For the scenario of Matching 4 in X number of white balls, 0 in Y

number of Red balls.

● The total space= C(X,5)*C(Y,1)

● The probability of matching 5 White Balls = C(5, 4) * C(X-5,1)

● The probability of matching Red Ball= C (Y-1, 1)

● The total probability of 4+0 is 1 in C(X,5)*Y/(C(5,4)*C(Y-5,1))/(Y-1)

C (5, 4)* C(X-5,1)

C (Y-1, 1)

10 © IEOM Society International

Duplicate Powerball probability by JAVA

5 + 1 = 292,201,338

5 + 0 = 11,688,053.52

4 + 1 = 913129.18

4 + 0 = 36525.17

3 + 1 = 14494.11

3 + 0 = 579.76

2 + 1 = 701.33

1 + 1 = 91.98

Reference from the Powerball Binomial (replacement)

http://www.lottonumbers.com/lotto-odds-calculator.asp

JAVA

match all

numbers

11 © IEOM Society International

Java Program Output Results

12 © IEOM Society International

Odd Ratio of Binomial vs. Hypergeometric?

Ratio of Matching

Binomial

Hypergeometric

9%-20% higher chance for

Hypergeometric

With larger pool size,

Hypergeometric will

approach Binomial (Ratio

=> 1)

13 © IEOM Society International

Results and Conclusions

● This Java project shows the differences between Binomial

(Replacement) and Hypergeometric (No replacement) in statistics

and probability.

● Using Java program, we can easily test the probability for different

scenarios and variables.

● The result matches with Powerball probability.

● Results also shows that Binomial is 9%-20% higher chance for

Hypergeometric.

● With larger pool size, Hypergeometric will approach Binomial (Ratio

=> 1).

14 © IEOM Society International

Future works

• Account for more than one Jackpot Winner. Current

probability calculations only work if there is only one

jackpot winner

• Calculate for other lotteries (Super Lotto…). See if

other lotteries have different or similar results.

15 © IEOM Society International

Recommended