section 5.2 - using simulation to estimate probabilities

73
Section 5.2 - Using Simulation to Estimate Probabilities P12. A catastrophic accident is one that involves severe skull or spinal damage. The National Center for Catastrophic Sports Injury Research reports that over the last 21 years, there have been 101 catastrophic accidents among female high school and college athletes. Fifty-five of these resulted from cheerleading. Suppose you want to study catastrophic accidents in more detail, and you take a random sample, without replacement, of 8 of these 101 accidents. Estimate the probability that at least half of your eight sampled accidents resulted from cheerleading. Start at the beginning of row 17 of Table D on

Upload: erno

Post on 12-Jan-2016

25 views

Category:

Documents


1 download

DESCRIPTION

Section 5.2 - Using Simulation to Estimate Probabilities. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

P12. A catastrophic accident is one that involves severe skull or spinal damage. The National Center for Catastrophic Sports Injury Research reports that over the last 21 years, there have been 101 catastrophic accidents among female high school and college athletes. Fifty-five of these resulted from cheerleading.

Suppose you want to study catastrophic accidents in more detail, and you take a random sample, without replacement, of 8 of these 101 accidents. Estimate the probability that at least half of your eight sampled accidents resulted from cheerleading.

Start at the beginning of row 17 of Table D on page 828, and add ten runs to the frequency table.

Page 2: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

P12. Of the 101 catastrophic accidents among female high school and college athletes, 55 of resulted from cheerleading.

Take a random sample, without replacement, of 8 of these 101 accidents. Estimate the probability that at least half of your eight sampled accidents resulted from cheerleading.

Assumptions:

You have a random sample (without replacement) of size n = 8 from a population of 101 accidents, of which 55 resulted from cheerleading. (Each sample of size n = 8 is equally likely.)

Page 3: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

P12. Model: There are 1000 three-digit triples and you wish to represent 101 accidents, so it is convenient to assign 9 three-digit numbers to each accident, as follows. (If you assign the numbers 001 - 101, you will have to reject 90% of the numbers selected. This method rejects only 91 or 9.1%)

Triple-Digit Numbers Accident Number

011-019 1

021-029 2

991-999 99

001-009 100

010, 020, 030, 040, 050, 060, 070, 080, 090

101

Page 4: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

P12. Model: Assign 9 three-digit numbers to each accident, as follows. Ignore all triples not on the table. Accidents numbered from 1 through 55 will be considered as resulting from cheerleading. Stop a run when you have a sample of 8 accidents (no repeats). Repeat until you have 10 runs.

Triple-Digit Numbers Accident Number

011-019 1

021-029 2

… …

991-999 99

001-009 100

010, 020, 030, 040, 050, 060, 070, 080, 090

101

Page 5: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

P12. Repetition: Starting on line 17 of Table D, divide the digits into triples. Triples to be ignored are crossed out and the remaining ones are grouped into sequences representing samples of 8 accidents, making sure there are no repeated accidents in any one run.

Run 1 = 4 from cheerleading

Triple: 801 243 563 517 727 080 154 531

Accident: 80 24 56 51 72 101 15 53

Result: no yes no yes no no yes yes

Run 2 = 6 from cheerleading

Triple: 822 374 211 157 825 314 385 537 637

Accident: 82 37 21 15 82 31 38 53 63

Result: no yes yes yes x yes yes yes no

Page 6: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

P12. Repetition:

Run 3 = 5 from cheerleading

Triple: 435 099 817 774 027 721 443 236

Accident: 43 9 81 77 2 72 44 23

Result: yes yes no no yes no yes yes

Run 4 = 6 from cheerleading

Triple: 002 104 552 164 237 962 860 265 569

Accident: 100 10 55 16 23 96 x 26 56

Result: no yes yes yes yes no x yes no

Run 5: 6 from cheerleading

Triple: 916 268 036 625 229 148 369 368 720 376

Accident: 91 26 3 62 22 14 36 36 x 37

Result: no yes yes no yes yes yes x x yes

Page 7: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

P12. Repetition:

Run 6 = 4 from cheerleading

Triple: 621 139 909 440 056 418 098 932 050

Accident: 62 13 90 x 5 41 9 93 101

Result: no yes no x yes yes yes no no

Run 7 = 3 from cheerleading

Triple: 514 225 685 144 642 756 788 962

Accident: 51 22 68 14 64 75 78 96

Result: yes yes no yes no no no no

Run 8: 4 from cheerleading

Triple: 977 882 254 382 145 989 149 914 523

Accident: 97 88 25 38 14 98 14 91 52

Result: no no yes yes yes no x no yes

Page 8: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

P12. Repetition:

Run 9 = 3 from cheerleading

Triple: 684 792 768 646 162 835 549 475

Accident: 68 79 76 64 16 83 54 47

Result: no no no no yes no yes yes

Run 10 = 2 from cheerleading

Triple: 089 923 370 892 004 880 336 945 982 694

Accident: 8 92 x 89 100 x 33 94 98 69

Result: yes no x no no x yes no no no

Summary: 4,6,5,5,6,4,3,4,3,2

Page 9: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

P12. Repetition: Update Display 5.22

Accidents from Cheerleading Frequency

0 0

1 10

2 81

3 187

4 262

5 252

6 162

7 43

8 3

Total 1000

Page 10: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

P12. Conclusion:

Out of the 1000 runs, 722 samples had at least half (four or more) of the accidents from cheerleading.

The estimated probability that a random sample of eight catastrophic accidents would have at least half of the accidents from cheerleading is about 0.722.

This is close to the theoretical probability of 0.7374 computed using the hypergeometric distribution.

See Fathom file SIA Ch 5 P12.ftm

Page 11: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

P13. The winner of the World Series is the first team to win four games. That means the series can be over in four games or can go as many as seven games. Suppose the two teams playing are evenly matched.

Estimate the probability that the World Series will go seven games before there is a winner.

Start at the beginning of row 9 of Table D on page 828, and add your ten runs to the frequency table.

Page 12: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

P13. The winner of the World Series is the first team to win four games. Suppose the two teams playing are evenly matched. Estimate the probability that the World Series will go seven games before there is a winner.

Assumptions:

The probability of a given team winning a particular game is 50% and that the results of the games are independent of each other. (This is probably not a realistic assumption!)

Page 13: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

P13. Model: Assign digits 1-5 to team A winning and 6-9, 0 to team B winning. Select digits from the table, allowing repeats, until one of the teams has four wins. Record the total number of digits needed to get four wins for one of the teams.

Digits Winning Team

1 - 5 A

6 - 9 , 0 B

Page 14: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

P13. Repetition: Starting on line 09 of Table D:

Run 1 2 3 4 5

Digits 635733 2135 05325 470489 05535

Team BAABAA AAAA BAAAA ABBABB BAAAA

Games 6 4 5 6 5

Run 6 7 8 9 10

Digits 7548284 68287 098349 12562 473796

Team BAABABA BBABB BBBAAB AAABA ABABBB

Games 7 5 6 5 6

Page 15: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

P13. Repetition: Update Display 5.23

Games in Series Frequency

4 611

5 1307

6 1545

7 1537

Total 5000

Page 16: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

P13. Conclusion:

Out of the 5000 runs, 1537 series went the full seven games, so the estimated probability of a World Series of two evenly matched teams going seven games is 1537 / 5000, or 0.3074.

The theoretical probability is 0.3125. When the teams are not evenly matched, the probability is less.

In the 66 World Series between 1940 and 2006, the World Series went the full seven games 27 times out of 66, or 0.409.

This is not statistically significant, but close.

One reasonable explanation is that the probability of winning changes from game to game.

Page 17: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E15. About 10% of high school girls report that they rarely or never wear a seat belt while riding in motor vehicles. Suppose you randomly sample four high school girls.

Estimate the probability that no more than one of the girls says that she rarely or never wears a seat belt.

Start at the beginning of row 36 of Table D on page 828, and add your ten results to the frequency table.

Page 18: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E15. About 10% of high school girls report that they rarely or never wear a seat belt while riding in motor vehicles. Suppose you randomly sample four high school girls.

Estimate the probability that no more than one of the girls says that she rarely or never wears a seat belt.

Assumptions:

The probability that a randomly selected girl reports that she rarely or never wears a seat belt is 10%, and that the girls are selected independently of each other.

Page 19: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E15. Model:

Assign the digits 0 to 9 as follows:Reports that she rarely or never wears a seat belt: 0Does not report that she rarely or never wears a seat belt: 1-9

Page 20: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E15. Repetition:

Begin with row 36 of table D, separated into groups of 4:

Run: 1 2 3 4 5 6 7 8 9 10

Digits: 3217 9005 9787 3792 5241 0556 7070 0786 7431 7157

Result: 0 2 0 0 0 1 2 1 0 0

Page 21: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E15. Repetition:

Add the results to the table in Display 5.24:

Number of Girls Who Rarely or Never Wear a

Seat BeltFrequency

0 6,641

1 2,863

2 464

3 32

4 0

Total 10,000

Page 22: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E15. Conclusion:

Out of the 10,000 runs, 6641 + 2863 = 9504 had no more than one 0.

The estimated probability that a random sample of four girls contains no more than one that says she rarely or never wears a seat belt is 0.9504

The theoretical probability is 0.9477.

Page 23: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E18. A Harris poll estimated that 25% of U.S. residents believe in astrology. Suppose you would like to interview a person who believes in astrology.

Estimate the probability that you will have to ask four or more U.S. residents to find one who believes in astrology.

Start at the beginning of row 15 of Table D on page 828, and add your ten results to the frequency table.

Page 24: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E18. A Harris poll estimated that 25% of U.S. residents believe in astrology. Suppose you would like to interview a person who believes in astrology.

Estimate the probability that you will have to ask four or more U.S. residents to find one who believes in astrology.

Assumptions:

The probability that a randomly selected person believes in astrology is 25%, and that each person was selected randomly and independently from the population of U.S. residents.

Page 25: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E18. Model:

Assign two digit-numbers as follows:Believes in astrology: 01 - 25Does not believe in astrology: 26 - 99, 00

Page 26: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E18. Repetition:

Begin with row 15 of table D:

Run 1 2 3

Digits 99 59 46 73 48 87 51 76 49 69

91 82 60 89 28 93 78 56 13

68 23 47 83 41 13

Belief: N N N N N N N N N N

N N N N N N N N Y

N Y N N N Y

People 19 2 4

Page 27: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E18. Repetition:

Begin with row 15 of table D:

Run 4 5 6 7 8

Digits 65 48 11 76 74 17 46 80 09 50 58 04 77 69 74 73 03

Belief: N N Y N N Y N N Y N N Y N N N N Y

People 3 3 3 3 5

Run 9 10

Digits 95 71 86 40 21 81 65 44 80 12

Belief: N N N N Y N N N N Y

People 5 5

Page 28: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E18. Repetition:

Add the results to the table in Display 5.24:

Number of People Asked

Frequency

1 437

2 412 + 1

3 278 + 4

4 210 +1

5 173 +3

… …

19 4 + 1

… …

Total 2,000

Page 29: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E18. Conclusion:

Out of the 2,000 runs, 2000 - (437 + 413 + 282) = 868 had four or more.

The estimated probability that you would have to interview four or more U.S. residents before getting a person who believes in astrology is 868 / 2000 or 0.434

The theoretical probability is 0.422.

(You will learn how to compute this in Section 6.3)

Page 30: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E19. The probability that a baby is a girl is about 0.49. Suppose a large number of couples each plan to have babies until they have a girl.

Estimate the average number of babies per couple.

Start at the beginning of row 9 of Table D on page 828, and add your ten results to the frequency table in Display 5.28, which gives the results of 1990 runs.

Page 31: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E19. The probability that a baby is a girl is about 0.49. Suppose a large number of couples each plan to have babies until they have a girl.

Estimate the average number of babies per couple.

Assumptions:

Each baby has a 0.49 chance of being a girl.

The gender of each child is independent of the other children’s gender in that family.

Page 32: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E19. Model:

Assign pairs of digits as follows:

01 - 49 = girl baby

50 - 99, 00 = boy baby

A single run consists of selecting pairs of digits, allowing repeats, until a pair in the range 01 - 49 is selected.

Record the number of pairs needed.

Page 33: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E19. Repetition:

Start with Row 9 of Table D. Perform 10 repetitions.

63 / 57 / 33 // 21 // 35 // 05 // 32 // 54 / 70 / 48 //

90 / 55 / 35 // 75 / 48 // 28 // 46 //

The numbers needed are:

3, 1, 1, 1, 1, 3, 3, 2, 1, 1

Page 34: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E19. Repetition:

Add the results of our ten runs to the frequency table:

Babies Frequency Babies Frequency

1 941 + 6 = 947 8 11

2 480 + 1 = 481 9 4

3 265 + 3 = 268 10 1

4 156 11 2

5 60 12 0

6 51 13 2

7 17 Total 1990 + 10 = 2000

Page 35: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E19. Conclusion:

Apply the method of calculating a mean from a frequency table: Enter the data into L1, L2; Run 1-Var Stats.

Babies Frequency Babies Frequency

1 941 + 6 = 947 8 11

2 480 + 1 = 481 9 4

3 265 + 3 = 268 10 1

4 156 11 2

5 60 12 0

6 51 13 2

7 17 Total 1990 + 10 = 2000

Page 36: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E19. Conclusion:

Apply the method of calculating a mean from a frequency table: Enter the data into L1, L2; Run 1-Var Stats.

The estimated average number of babies for a family that keeps having babies until they have a girl is about 2.122 children.

The theoretical mean is about 2.04.

Page 37: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E20. Boxes of cereal often have small prizes in them. Suppose each box of one type of cereal contains one of four different small cars.

Estimate the average number of boxes a parent will have to buy until his or her child gets all four cars.

Start at the beginning of row 49 of Table D on page 828, and add your ten results to the frequency table.

Page 38: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E20. Boxes of cereal often have small prizes in them. Suppose each box of one type of cereal contains one of four different small cars.

Estimate the average number of boxes a parent will have to buy until his or her child gets all four cars.

Assumptions:

The different types of cars are equally and randomly distributed in the boxes of cereal so the probability if getting a particular type of car is always 0.25. Each box of cereal is selected independently.

Page 39: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E20. Model:

Assign two digit-numbers as follows:Car 1: 01 - 25Car 2: 26 - 50Car 3: 51 - 75Car 4: 76 - 99, 00

Page 40: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E20. Repetition:

Begin with row 49 of table D:

Run 1

Digits 48 32 47 79 28 31 24 96 47 10 02 29 53

Cars 2 2 2 4 2 2 1 4 2 1 1 2 3

Boxes 13

Run 2

Digits 68 70 32 30 75 75 46 15 02 09 99

Cars 3 3 2 2 3 3 2 1 1 1 4

Boxes 11

Page 41: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E20. Conclusion:

Boxes Frequency

4 887

5 1395

6 1488

7 1347

8 1136

9 903

10 679

11 491

12 369

13 331

Boxes Frequency

14 263

15 167

16 137

17 103

18 81

19 67

20 44

21 29

22 20

23 14

Boxes Frequency

24 7

25 12

26 5

27+ 25

Total 10,000

Page 42: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E20. Conclusion:

We were asked to estimate a mean, not a probability.

Count 27+ as 27.

x =x⋅f∑n

=4 ⋅887 + 5 ⋅1395 + 6 ⋅1488 + ...+ 27 ⋅25

10000

=8340210000

=8.3402

Page 43: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E20. Conclusion:

We were asked to estimate a mean, not a probability.

The estimated mean number of boxes a parent must buy to get all four cars is 8.3402.

Page 44: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E21. A group of five friends have backpacks that all look alike. They toss their backpacks on the ground and later pick up a backpack at random.

Estimate the probability that everyone gets his of her own backpack.

Start at the beginning of row 31 of Table D on page 828.

Page 45: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E21. A group of five friends have backpacks that all look alike. They toss their backpacks on the ground and later pick up a backpack at random.

Estimate the probability that everyone gets his of her own backpack.

Assumptions:

Each backpack is equally likely to be picked up by each person. The backpacks are selected independently of each other.

Page 46: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E21. Model:

Backpack 1 belongs to person 1, backpack 2 belongs to person 2, etc.

Assign digits to represent backpacks: digits 1 and 2 = backpack 1; digits 3 and 4 = backpack 2; digits 5 and 6 = backpack 3; digits 7 and 8 = backpack 4; digits 9 and 0 = backpack 5.

Select 4 digits and ignore repeats.

Record the number of correct backpacks.

Page 47: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E21. Repetition:

Begin with row 31 of table D. Perform 20 repetitions.

0449352 / 49475 / 246338 / 24458 / 6251025619627 /

933565337 / 124720 / 054997 / 65464051 / 88159 /

9611963 / 89654 / 6928 / 23912328 / 7295 / 2935 /

9631 / 5307 / 2689 / 80935

Page 48: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E21. Repetition:

Run Digits Bags Correct

1 0449352 52xxx31(4) 2

2 49475 25x43(1) 0

3 246338 123xx4(5) 5

4 24458 12x34(5) 5

5 6251025619627

31xx5xxxxxxx4(2) 1

6 933565337 52x3xxxx4(1) 3

7 124720 1x24x5(3) 2

8 054997 532xx4(1) 1

9 65464051 3x2xx5x1(4) 1

10 88159 4x135(2) 1

Page 49: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E21. Repetition:

Run Digits Bags Correct

11 9611963 531xxx2(4) 0

12 89654 453x2(1) 1

13 6928 3514(2) 1

14 23912328 125xxxx4(3) 3

15 7295 4153(2) 0

16 2935 1523(4) 1

17 9631 5321(4) 0

18 5307 3254(1) 2

19 2689 1345(2) 1

20 80935 45x23(1) 0

Page 50: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E21. Repetition:

Correct Frequency Probability

0 5 5 / 20 = 0.25

1 8 8 / 20 = 0.40

2 3 3 / 20 = 0.15

3 2 2 / 20 = 0.10

4 0 0 / 20 = 0.00

5 2 2 / 20 = 0.10

Total 20 1.00

Page 51: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E21. Conclusion:

The estimated probability that each person gets his or her own backpack is 0.10.

The theoretical probability is 0.0083.

Page 52: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E23. There are six different car keys in a drawer, including yours. Suppose you grab one key at a time until you get your car key.

Estimate the probability that you get your car key on the second try.

Start at the beginning of row 13 of Table D on page 828.

Page 53: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E23. There are six different car keys in a drawer, including yours. Suppose you grab one key at a time until you get your car key.

Estimate the probability that you get your car key on the second try.

Assumptions:

You select a key at random and each key is equally likely to be picked on any one grab

Page 54: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E23. Model:

Assign the digit 1 to your key and the digits 2 - 6 to the other keys. Ignore the digits 7, 8, 9, 0.

A single run consists of selecting two digits from 1 - 6 (ignore repeats, ignore 7, 8, 9, 0).

There is no need to continue selecting after the second valid digit.

Page 55: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E23. Repetition:

Begin with row 13 of table D:

83452 99634 06288 98083 13746 70078 18475 40610 68711 77817 88685 40200 86507 58401 36766 67951 90364 76493

834 / 52 / 9963 / 406 / 28898083 / 13 / 746 / 70078184 /

754 / 061 / 06871 / 177817886 / 854 / 020086 / 507584 /

013 / 666795 / 1903 / 64 / 764 /

Page 56: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E23. Repetition:

834 / 52 / 9963 / 406 / 28898083 / 13 / 746 / 70078184 /

754 / 061 / 06871 / 177817886 / 854 / 020086 / 507584 /

013 / 666795 / 1903 / 64 / 764 /

Second Key Yours?

Frequency

Yes 2

No 18

Total 20

Page 57: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E23. Conclusion:

This is a small simulation of only 20 runs.

The estimated probability that if you pull one key at a time out of a drawer, you will get your key on the second draw is 2 / 20, or 0.10. The theoretical probability is 1/6. Why?

Page 58: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E23. Conclusion:

The estimated probability that if you pull one key at a time out of a drawer, you will get your key on the second draw is 2 / 20, or 0.10. The theoretical probability is 1/6. Why?

Prob(key on second draw) =P(no on first)P(yes on second)

=56⋅15

=16

Page 59: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E24. A deck of cards contains 13 hearts. Suppose you draw cards one at a time, without replacement.

Estimate the probability that it takes you four cards or more to draw the first heart.

Start at the beginning of row 28 of Table D on page 828.

Page 60: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E24. A deck of cards contains 13 hearts. Suppose you draw cards one at a time, without replacement.

Estimate the probability that it takes you four cards or more to draw the first heart.

Assumptions:

Each card is equally likely to be drawn and are selected independently.

Page 61: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E24. Model:

Assign the digits 01 - 52 to the cards in the deck.Let the digits 01 - 13 represent the hearts.Ignore all other digits: 53 - 99, 00.

A single run consists of selecting pairs of digits without repeats until you get a heart (01 - 13)

Record the number of pairs needed to get a heart.

Page 62: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E23. Repetition:

Begin with row 28 of table D:

Run 1:

94557 28573 67897 54387 54622 44431 91190 42592

94 55 72 85 73 67 89 75 43 87 54 62 24 44 31 91 19 04

Page 63: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E24. Repetition:

Run Draws

1 6

2 4

3 1

4 5

5 1

6 1

7 12

8 4

9 7

10 6

Run Draws

11 2

12 7

13 4

14 3

15 4

16 1

17 1

18 3

19 1

20 2

Draws Frequency

1, 2, 3 10

4+ 10

Total 20

Page 64: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E24. Conclusion:

This is a small simulation of only 20 runs.

The estimated probability that it takes four or more draws from a standard deck to get a heart is 10 / 20, or 0.50.

The theoretical probability is 0.4135. Why?

Page 65: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E24. Conclusion:

This is a small simulation of only 20 runs.

The estimated probability that it takes four or more draws from a standard deck to get a heart is 10 / 20, or 0.50.

The theoretical probability is 0.4135. Why?

P(4 +draws) =1−P(1 or 2 or 3 draws)

=1−1352

+3952

⋅1351

+3952

⋅3851

⋅1350

Page 66: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E24. Conclusion:

This is a small simulation of only 20 runs.

The estimated probability that it takes four or more draws from a standard deck to get a heart is 10 / 20, or 0.50.

The theoretical probability is 0.4135. Why?

P(4 +draws) =P(not on first 3 draws)

=3952

⋅3851

⋅3750

Page 67: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E26. This question appeared in the “Ask Marilyn” column:

I work at a waste-treatment plant, and we do assessments of the time-to-failure and time-to-repair of the equipment, then input those figures into a computer model to make plans. But when I need to explain the process to people in other departments, I find it difficult.

Say a component has two failure modes. One occurs every 5 years, and the other occurs every 10 years. People usually say that the time to failure is 7.5 years, but this is incorrect. It’s between 3 and 4 years. Do you know of a way to explain this that people will accept?

Page 68: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E26. Say a component has two failure modes. One occurs every 5 years, and the other occurs every 10 years. People usually say that the time to failure is 7.5 years, but this is incorrect. It’s between 3 and 4 years. Do you know of a way to explain this that people will accept?

Use simulation to estimate the expected time to failure for this component. Start at the beginning of row 40 of Table D.

Page 69: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E26. Say a component has two failure modes. One occurs every 5 years, and the other occurs every 10 years.

Use simulation to estimate the expected time to failure for this component.

Assumptions:

The probability of a mode 1 failure in a given year is 20%. The probability of a mode 2 failure in a given year is 10%. These failures occur independently of each other.

Page 70: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E26. Model:

Consider pairs of digits.The first digit represents mode 1 status, with 1 or 2 representing failure.The second digit represents mode 2 status, with 1 representing failure.Thus, a failure is any one of the 28 pairs: 10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,01,31,41,51,61,71,81,91 (Why 28 pairs?)

A single run consists of selecting pairs of digits until you get a failure. Perform a large number of runs, and compute the mean number of years until failure

Page 71: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E26. Repetition:

Begin with row 40 of table D:

Run 1: 4 years Run 2: 3 years Run 3: 1 year Run 4: 2 years

94864 319 94 3616 8 1 0851

94 86 43 19 94 36 16 81 08 51

ok ok ok fail ok ok fail fail ok fail

Page 72: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E26. Repetition:

Run Years

1 4

2 3

3 1

4 2

5 4

6 2

7 6

8 2

9 6

10 2

Run Years

11 16

12 1

13 3

14 1

15 3

16 2

17 7

18 4

19 9

20 5

Page 73: Section 5.2 - Using Simulation to Estimate Probabilities

Section 5.2 - Using Simulation to Estimate Probabilities

E26. Conclusion:

This is a small simulation of only 20 runs.

The estimated mean number of years until failure is 83/20 = 4.15 years.

The theoretical expected time to failure is 3.57.

P(failure) = 1 - P(no failures) = 1 - (0.8)(0.9) = 0.28 (failures/yr)

Expected time = 1 / 0.28 = 3.57 (yrs/failure)