The Museum of HP Calculators

HP Forum Archive 17

 71B - Your chances of winning the lotteryMessage #1 Posted by RonHudson(USA) on 24 Sept 2007, 3:03 p.m. When the California lottery started one of the local news guys said "Your chance of winning is about the same as flipping a coin the same way 25 times in a row" Hmmm How many flips might that be? 10 DELAY.1 20 DESTROY ALL 30 H=0 @ T=0 @ R=0 @ M=0 @ N = RND > RND 40 'NEQ':R=0 @ X = FLAG(0,NOT FLAG(0)) 50 'THROW':L=N @ N = RND > RND 60 IF N THEN H=H+1 ELSE T=T+1 70 IF N<>L THEN GOTO 'NEQ' 80 R=R+1 @ DISP M;H+T;INT(100*R/M) 90 IF R>M THEN M=R @ DISP M;H+T 100 IF M<25 THEN GOTO 'THROW' 110 DISP H/T;H+T;H;T @ STOP You will probably need fresh batteries for this one :^) I have not been able to let it run to completion yet.. I keep needing my 71 for other things. I am accepting ideas for stuff to write... Edited: 24 Sept 2007, 3:04 p.m.

 Re: 71B - Your chances of winning the lotteryMessage #2 Posted by Egan Ford on 24 Sept 2007, 3:23 p.m.,in response to message #1 by RonHudson(USA) Here is a faster version: ```10 DISP .5^25 ```

 Re: 71B - Your chances of winning the lotteryMessage #3 Posted by Chuck Sommer on 24 Sept 2007, 5:41 p.m.,in response to message #2 by Egan Ford If you flip a coin 25 times in a row, then you flip it 25 times. On the other hand if you want to calculate the odds of flipping a coin and it comes up Heads 25 times in a row, then it is simply 1 in 2^25 = about 1 in 33.55 million. If you want to calculate the odds of flipping a coin and it coming up the same 25 times in a row, then it would be 1 in 2^24 or about 1 in 16.78 million. Any Help?

 Re: 71B - Your chances of winning the lotteryMessage #4 Posted by Ren on 25 Sept 2007, 10:46 a.m.,in response to message #1 by RonHudson(USA) I'm sure you've all heard this one before... Your odds of winning the lottery are the same, whether or not you buy a ticket. Ren dona nobis pacem

 Re: 71B - Your chances of winning the lotteryMessage #5 Posted by Namir on 25 Sept 2007, 11:53 a.m.,in response to message #4 by Ren Ren, I look at it this way. The chance of me keeping my lottery money is 99.999999999999999999999999999999999%. If I do this many many times over many many years, the total savings come out to winning a small lottery ... at a near 100%!!! Namir

Go back to the main exhibit hall