71B - Your chances of winning the lottery



#3

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.


#4

Here is a faster version:

10 DISP .5^25

#5

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?

#6

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


#7

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


Possibly Related Threads…
Thread Author Replies Views Last Post
  O.T. - but chances are you're gonna like it... Luiz C. Vieira (Brazil) 0 814 12-01-2012, 08:48 PM
Last Post: Luiz C. Vieira (Brazil)
  (updated)somehow O.T. but chances are some of you might like it... Luiz C. Vieira (Brazil) 2 1,362 07-16-2012, 07:40 AM
Last Post: Luiz C. Vieira (Brazil)
  HP-IL 71B to 71B via HPIL Geoff Quickfall 11 3,314 12-01-2010, 06:55 PM
Last Post: Michael Meyer
  Chances of a bug-fixed 35s? Bruce Bergman 2 1,191 08-09-2007, 03:09 AM
Last Post: Raymond Del Tondo
  computing chances Bram 4 1,474 04-16-2006, 01:25 PM
Last Post: Bram
  SCAM: "HEWLETT PACKARD PROMOTIONAL LOTTERY" Les Bell 5 1,569 08-15-2005, 08:00 PM
Last Post: Namir
  Hewlett Packard International Lottery A A Strauss 4 1,677 08-08-2005, 05:28 PM
Last Post: Andrés C. Rodríguez (Argentina)
  Question: 71B <-HPIL -> 71B john smith 16 3,826 05-12-2003, 06:37 AM
Last Post: John Smith

Forum Jump: