1 / 30

Gambles in Your Life

Gambles in Your Life. Andre Dabrowski Mathematics and Statistics. Pick the Prize!. One Chance in Three. Prob[Winner] =#(winning choices) / #(all possible choices) = / #( ) = 1 / 3. Prob[event]. Gambles in your Life. P[winner]

Télécharger la présentation

Gambles in Your Life

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Gambles in Your Life Andre Dabrowski Mathematics and Statistics

  2. Pick the Prize!

  3. One Chance in Three Prob[Winner] =#(winning choices) / #(all possible choices) = / #( ) = 1/3

  4. Prob[event]

  5. Gambles in your Life • P[winner] • =#(winning choices)/#(all choices) • =1/#(all choices)

  6. “Lottery 216” • Everyone has a sample ticket. • Every ticket has 3 numbers, each number chosen from {1,2,3,4,5,6}.E.G. 136 or 524 or 652, but not 744. • Is 222 more or less likely to win than 452? • What is your chance of winning?

  7. Is 222 more or less likely to win than 452? • Put one marker in the box for each ticket. • Mix them up. • Draw one out. • All tickets have the same chance at winning! • So 222 has the same chance as 452 of winning.

  8. What is your chance of winning? • P[winner]=1/#(all possible choices) • #(all possible choices) • = #(choices for first digit) X #(choices for second digit) X #(choices for third digit) • = 6 X 6 X 6 = 216 • P[winner]=1/216.

  9. Lotto 6/49 • P[win by matching all 6 numbers] • =1/#(all possible choices) • #(all possible choices) • = 49 x 48 x 47 x 46 x 45 x 44 / 720 • 1 in 13,983,816 chances!

  10. Matching all 6 numbers in a 6/49 lottery Being struck by lightning sometime during the year. Which is more likely? 1/ 13,983,816 About 1/ 1,000,000

  11. UO Xmas Lottery! • Everyone has a ticket. • We will draw from a box to choose the winner. • P[winning]=1/216.

  12. Now that we know HOW to calculate probabilities, we can look for interesting ones to compute.

  13. The Birthday Problem • There are 365 days in the year. • The chance that any one person shares your birthday is 1/365. Pretty small! • What is the chance at least two people in this room share birthdays?

  14. P[no matching birthdays] • P[no match for 2 people] • = • = 365 X 364 / 365 X 365 = 364/365.

  15. P[no match in 5 people]= = = = .97 approximately

  16. = • P[no match in 25 people]= = = 0.43 approximately There is about a 57% chance a class of 25 will have at least two sharing a birthday.

  17. P[birthday match in k people]

  18. Gambles in your Life • Small probabilities can become large if we do many simultaneous experiments. • Coincidences are not really coincidences in large groups.Yell “Hey Pete” in a crowd and someone will answer! • How reliable are complex systems?A system can survive one component failing, but what is the chance two fail at once?

  19. UO Xmas Birthday Giveaway! First two birthdays to match win!

  20. We know • How to compute probabilities for simple games • How do we compute probabilities for more complicated problems?

  21. Simple --8 Heads in a Row in 8 tosses • Chance of 8 heads in a row • = ½½ … ½½½ • =1/256 • Pretty small!

  22. Harder -- 8 Heads in a Row somewhere in 100 tosses • Toss a fair coin 100 times. • What is the chance of at least 8 heads in a row somewhere in the string of 100? • HHTHTTHTTTHTHHTHTHTH TTTHTHTHTHHTHHHHHHHH TTHHHTHTHTHHHTTHTHTH HHTHTHHTHTHTTTHTTTTHT THTTHTHTHHHTHTHTHTHTT

  23. Monte Carlo Methods • “Toss” a coin 100 times • Find the longest string of H’s • Repeat this 100,000 times --- 10,000,000 tosses! • P[at least 8 H’s in a row] is approximately • #( at least 8 H’s in a row)/100,000

  24. Monte Carlo Methods • “Toss” a coin 100 times using a computer • Find the longest string of H’sRepeat this 100,000 times --- 10,000,000 tosses!using a computer • P[at least 8 H’s in a row] is approximately#(at least 8 H’s in a row)/100,000

  25. Monte Carlo Methods • data there.runs; set there.runs; • run_1=0+(x_1=1); • runmax=0; • %runs; • data here.runs; set there.runs; • keep runmax; • run; • data there.runs; run; • proc gchart data=here.runs; • axis1 value=(height=10); • vbar runmax / midpoints = 1 to 15 by 1 type=percent caxis=axis1; • run; • proc freq data=here.runs; • table runmax / nofreq nocumulative; • run; • quit; • libname here 'h:/XmasLecture'; • libname there 'c:/tmp'; • %macro dupit; • %do ii=1 %to 100; • x_&ii=(ranuni(0)<.5); • %end; • %mend; • data there.runs; • do i=1 to 100000 by 1; • output; • end; • data there.runs; set there.runs; • %dupit; • run; • %macro runs; • %do ii=2 %to 100; • %let iii=%eval(&ii-1); • a=0+run_&iii; • b=0+x_&ii; • run_&ii=a*(a>0)*(b=1)+(b=1); • runmax=max(runmax,run_&ii); • %end; • %mend;

  26. 100,000 Simulations

  27. The FREQ Procedure runmax Frequency Percent ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ 2 23 0.02 3 2709 2.71 4 16421 16.42 5 26184 26.18 6 23039 23.04 7 14645 14.65 >7 16979 16.98 All 100000 100.00 P[run of 8 H or more] = .17 approx., = 1/6 >> 1/256. The chance of 4 or more heads in a row is about 97%. We can use this to pick out which sequences on the sheet are unlikely to really have been generated at random.

  28. Gambles in your Life • “good” days and “bad” days. • Long lineups for no reason. • Design of bridges, power plants. • Weather prediction. • Biological evolution.

  29. Merry Christmas and a Happy New Year Thanks for coming!

More Related