Hacker News new | ask | show | jobs
by baldeagle 3820 days ago
Isn't this the wrong problem? It lets you enter X dollars, then it simulates if you played $1 on X numbers of sequential drawings... which would have terrible odds. Wouldn't it be better to simulate X numbers on Y draws, which would lead you to know the number of times/people would have to play to win.

I don't think probability is communicative, is it?

EDIT: It would also be neat to simulate the number of winners you would have to share the prize with, based on numbers entered in the form from users.

5 comments

Its not exactly the same but its pretty close when the chances are so low anyways.

Playing 10,000 times in 1 drawing gives you the probability of winning the jackpot:

0.00003422297813=10000/292201338

Playing 10,000 times in 10,000 drawings gives you the probability of winning the jackpot:

0.00003422239258=1-((292201338-1)/292201338)^10000

The difference gets more significant if you play more. For 10 million plays its:

.0342 vs .0336

If you play only 100 times the probability of a jackpot is the same to 7 significant digits.

-edit I put it on $1M and let it run. I hit the 5 numbers, $1M prize, at some point around $150k spent.

It's true that if you play all your tickets in one drawing, you have a higher chance of winning the jackpot at least once, especially as your number of tickets approaches the number of total tickets. However, your expected value does not go up, because you lose the chance of winning the jackpot more than once.

For an extreme example, consider a lottery with only one number, selected from 1 to 2, costing $1 per ticket, with a $2 jackpot.

Buy 2 tickets at once, you lose $2 on tickets, and you get $2 back. Expected net return, $0 (with probability 100%).

Buy 1 ticket per draw for 2 draws, and you have a 1/4 chance of winning nothing (net -$2), a 1/4 chance of winning both jackpots (net +$2), and a 2/4 chance of winning one and losing one (net $0). Same expected value.

Of course, in a real lottery, usually[0] the expected value is negative. So what's happening is like anti-insurance. In both cases your expected value is negative, but you pay the insurance company money to lower your variance, and you pay the lottery money to raise your variance.

[0] Usually? Well, in theory with a cumulative jackpot the jackpot might get high enough to make the expected value positive... except that usually as the jackpot rises, the number of players rises too, such that you have to take into account the possibility of having the split the jackpot, which of course would cut your take in half, or worse.

Shouldn't it stop once you've hit the jackpot? At least until it goes up again? I'd imagine once you've one $800 million, you're not going to be interested in the $40 million reset jackpot.
Not just nearly identical to each other, they're nearly identical to zero. So your odds of winning are effectively the same whether you play or not.

It approaches 1.0 as you buy more tickets, but even at $800m, the lump sum payout of $491m is still lower than the cost of buying all possible $2 tickets ($584m).

And even if you could buy all tickets you still might have to split the winnings...

+1 for pointing out that it is actually a $491MM payout that you can choose to take as a $800MM annuity over 20(?) years.

You also have to subtract taxes from the payout, which also eats into the payout. I would expect it would be 30% or higher, depending on how much you spend on a tax lawyer (which, of course, cuts into the payout as well).

The only[1] way to win is to not play.

[1] Odds are 292,201,338 to 1 of winning by not playing.

If you play quickdraw you could get the same numbers twice. I think with that caveat the odds should be the same.
To be fair, wouldn't the odds of QuickDraw picking the same numbers twice (even if there weren't a built in limit against that) be the same odds as winning the jackpot in the first place?
Only if you are only picking two sets of numbers. If you are doing 10k sets, the last set has a 9999/292M chance of being the same numbers as one of the other sets.
Right, that's the birthday problem.
It evens out on expected payout. There is a chance on 10,000 sequential plays that you win the lottery 10,000 times.
It's also not clear what the end condition is. I edited the source so that it always picks my numbers, and it just keeps going. So far I've spent $2,734 and won over a trillion.
It stops when balance = 0, i.e. you spent $x + all your winnings on lottery tickets.
Right, which is some bullshit. I mean, they cheated. Yes, it is mathematically provable that a random walk will eventually touch 0. That would be the case even if the lottery was strongly positive expected value.

They ask you to comment if you won. Their program guarantees you lose when it terminates -- even if you hit the 1:292,000,000 odds.

That's not true. 1) The title is can you win 800 million in powerball. If you passed 800 million, you win congratulations you did it. 2) It can be impossible to reach 0 even with a random walk.
I think you want to be more precise about "impossible".

It is not mathematically provable that a random walk of finite length will eventually touch 0. Proof by counterexample: the set of every walk of length 1 where you win the jackpot on your first try.

However, consider an infinite random walk. You can fix the first n values of the walk to win the jackpot as much as you want, but as the random walk progresses toward infinity, it is highly probable that you will be on a random walk that tends toward negative infinity. (You might have to play a lot; $437 million of $3 tickets would probably be enough tickets to play powerball for a few lifetimes.)

Yes, it absolutely is. Buy two tickets, your chances double. This is the "don't play the lottery, dummy" for dummies, which is good advice for people that think they have anything more than an infinitesimal chance of winning, and/or pour more than five bucks into a single play.
But there are only two drawings a week, right? If you only bought one ticket with the same six numbers for every single drawing in a year, you could only spend 532$3 = $318/year on lottery tickets. If you wanted to spend $100 on tomorrow's $800M prize, you have to buy 33 tickets against one set of winning numbers.
Agreed, I want to play where I can put as much money into it for each drawing, and then it simulates that, not one ticket one drawing.

I'm not doing this in reality (I spent $2 for a pool, woo), but I'm curious to see it simulated.

I have fun idea.. How about all the people on hacker news put $2 in the HN lotto pool:). So I am assuming there are over 50k people that read? Can you imagine if the people on HN win powerball, it will set a precedent. Now, that will be fun:).