Live data from Hacker News

Help me Hack the Lottery or, the worst $90 investment ever

ssikes.com

11–20 of 60 posts

Re: Help me Hack the Lottery or, the worst $90 investment ever

#11
post #5

You don't want theoretical help. You want real-world help. Hang out at the counter where tickets are sold. You're bound to encounter someone who asks what serial numbers the tickets end in. Take that guy out for a drink and find out what he knows, how he knows it, and if it ever worked for him. I've seen several people ask about the ticket serial numbers and not buy, but scratch-offs aren't my thing, so I didn't both…

Could be those people are just superstitious and only want tickets including their lucky number, or something like that.

Re: Help me Hack the Lottery or, the worst $90 investment ever

#14
There's another story you have to read: The luckiest woman on earth: Three ways to win the lottery (http://harpers.org/archive/2011/08/0083561). It's for subscribers only, but it's far more interesting than the Jonah Lehrer piece. It's about a woman who's won the lottery (scratch tickets) 3 or 4 times, winning millions each time.

It's been a while since I read it, but as far as I recall, one of the hypotheses about her good fortune (other than luck and some form of inside information) is that she had analyzed how winning tickets are distributed among batches (by cracking the pseudorandom number generator), and tracking which stores are likely to get packages containing winning tickets by the shipping routes.

Re: Help me Hack the Lottery or, the worst $90 investment ever

#15
Interesting read; I was playing with similar thoughts over my lunch break a couple of days ago.

The base of my sample program [implemented in ruby] was based (in theory) of Proportional Betting "The Martingale" - http://www.bjmath.com/bjmath/progress/prog1.htm

The game I picked was "Casino War" [ http://wizardofodds.com/games/casino-war/ ], as it was very quick to implement in a few lines of code. I selected the base rules as played in Garden City Casino [Bay Area] (50c drop per every $100), and came up with the following:

Game/House Rules: - 6 deck of cards. - Played until 1/2 is gone. - 50c drop for every $100 [Example: $200 bet costs $1, $300 $1.5.]

Betting Rules:

- Base Bet is always 1% of current wallet, at starting point - $10. - If the proportional bet can not be covered by wallet, the round is surrendered and the player waits until re-shuffle. [Example: Lost up to $500, next bet is $1000, wallet has $700, game ends/waits and the player accepts a loss of $300.] - Bets are doubled on loss as defined in the Proportional betting link.

Here's my data, though I believe something is wrong due to its results:

- I ran the initial program, as is, expecting the player to play one round every day for 10 years. - Losses and earnings were added together. - The average win % went to 58.4%. - The average cash win [the times the player didn't go bankrupt] was $1590. - Max loss [consecutive] cash $2980. [Bankroll covered over multiple sessions]

* A key point here is the average cash win. It was highly consistent and never below 1500.

I then added a factor that stated in the software:

- If winnings are at $1500, the player stops, takes the winnings and waits for a re-shuffle.

* Win percentage went up to 64.8% !

If anyone is interested, I'd be happy to share/pastebin the code or similar. Overall, due to the percentages I'm assuming something is wrong with my assumptions/gameplay, but so far an interesting experiment.

[Edited for clarity on betting strategy]

Re: Help me Hack the Lottery or, the worst $90 investment ever

#16
http://www.wired.com/wiredscience/2011/07/broken-lotteries/

Here's a great article on lotteries, particularly Cash Winfall. CWF was a particularly broken lottery. In a certain season it was possible to purchase enough tickets (say, $100,000 worth) to (almost) guarantee a profit.

https://en.wikipedia.org/wiki/Massachusetts_Lottery#Cash_Win...

Re: Help me Hack the Lottery or, the worst $90 investment ever

#17
post #14

There's another story you have to read: The luckiest woman on earth: Three ways to win the lottery ( http://harpers.org/archive/2011/08/0083561 ). It's for subscribers only, but it's far more interesting than the Jonah Lehrer piece. It's about a woman who's won the lottery (scratch tickets) 3 or 4 times, winning millions each time. It's been a while since I read it, but as far as I recall, one of the hypotheses about…

There is something to this. I had to do some training years ago at Alberta Lottery in Canada. Scratch tickets are sold in blocks of $100 (100 x $1, 50 x $2, etc).

We were told that each pack contains at least one winning ticket (it might be $5 or it might be $100K).

That's a definite weakness.

Re: Help me Hack the Lottery or, the worst $90 investment ever

#18
post #14

There's another story you have to read: The luckiest woman on earth: Three ways to win the lottery ( http://harpers.org/archive/2011/08/0083561 ). It's for subscribers only, but it's far more interesting than the Jonah Lehrer piece. It's about a woman who's won the lottery (scratch tickets) 3 or 4 times, winning millions each time. It's been a while since I read it, but as far as I recall, one of the hypotheses about…

I find it disturbing that some poeple find it so hard to belive that it might just be chance. It's way more likely to be that. The serial number on the cards are either generated in series (1, 2, 3 ...) or just pseudorandom, but they are not tied to any winnings, it's just a series of numbers so that they can keep track of what goes where.

If it's a serie of numbers you have to find out what the chances of a winning ticket in X-amount of tickets, meaning that you statistically have a chance of a price within the range of X-amount of tickets. But the way they have made it, you statistically have to spend more money than you can win in order to do so, or just about break even.

Now, the fun part is that most of these tickets (atleast where I live) come with pseudorandom serie numbers, so even finding the system in how the numbers are generated is going to be hard, if not even down-right impossible given the sample-size you will be able to buy.

And last but not least, lottery makers are not stupid. They've known about this since the dawn of time. Actually some credit the math behind statistics to gamblers. And you have so many level of pseudorandomness to crack, so, when you're done, statistically we can say that the lottery made it's money anyway, and you probably spent more than you won. And the lottery agency just have to change one constant and they are, from your point of view, totally random again. It's a cat and mouse game you cannot win.

Re: Help me Hack the Lottery or, the worst $90 investment ever

#19
You're making the (probably) false assumption that your lottery is as broken as the Ontario one.

I question your detachment if you are calling gambling an "investment" at all. If you want to win at probability games, look at what any professional gambler does and stick your money down only when you can prove or reasonably expect to see a positive expected value given your odds. That's how basic strategy in blackjack and most of poker math works.

Also, I assumed ticket generation for the simple games was something brute-force-ish akin to:

1. Create your winning tickets. Fill in the rest of the numbers with things that won't cause duplicate wins on the same ticket pseudorandomly.

2. Make a random ticket. Check to make sure the ticket is not solved. If the ticket doesn't solve, add it to the stack of tickets.

Randomly shuffle all tickets. Print to rolls and cut. You could probably even get away with duplicate random "losing" tickets if you had enough of them because most people likely won't end up with the same losing ticket.

Re: Help me Hack the Lottery or, the worst $90 investment ever

#20
post #15

Interesting read; I was playing with similar thoughts over my lunch break a couple of days ago. The base of my sample program [implemented in ruby] was based (in theory) of Proportional Betting "The Martingale" - http://www.bjmath.com/bjmath/progress/prog1.htm The game I picked was "Casino War" [ http://wizardofodds.com/games/casino-war/ ], as it was very quick to implement in a few lines of code. I selected the base…

That same site has an interesting article on Martingale betting systems: http://wizardofodds.com/gambling/betting-systems/

IIRC, a martingale strategy will eventually destroy you because it requires an exponentially sustainable bankroll to maintain the same risk of ruin.

Also, 3,650 hands is far too small of a sample size for a game with such a small edge and you are probably just witnessing positive variance. See where the law of large numbers leads you and run your simulation for 500,000 hands.

Post reply on HN