• Quick note - the problem with Youtube videos not embedding on the forum appears to have been fixed, thanks to ZiprHead. If you do still see problems let me know.

Lotto: Statistics question

I think what Teek was getting at is that the ticket is a form of contract, not only guaranteeing specific odds of winning, but specific odds of payout possibilities.

I'm pretty sure this isn't the case in the UK at least. The amount you can win varies by a huge amount from week to week, and is also dependent on how many people match how many numbers. Since the lottery people have no way of knowing how much you could win, it is not possible to have that kind of contract. All they can say is that you have a certain chance of winning something, a better chance of winning a bit less, and so on.
 
To make it simpler: even if the RNG generator for the tickets was so bad that it generated every time the same sequence, the chances of winning would not be altered.

This is elementary cryptography, and the reason that the One Time Pad method of encryption is provably unbreakable. If the pad is unbiased, then it doesn't matter what bias is applied to the plaintext; the cyphertext is still unbiased.

The lotto organizers are right; no one's chances of winning were affected as long as the RNG selecting the winning numbers was fair.

Or, more tersely -- Yllanes for the math win!
 
CFLarsen, you're not getting it. Perhaps you should try an experiment at home. Use one six-sided die as your "vending machine" RNG, and another six-sided die as your "drawing". Play this "lottery" 60 or so times and you'll see that you win about 1/6th of the time.

Then repeat the experiment with a broken vending machine: play the number "6" every single time. You will find that, again, with a properly-random drawing, the dice-based vending machine has the same 1/6 odds of winning as the biased "6-only" vending-machine.

Perhaps the point you're missing: if the vending machine never gives you 1-9, then you're unlikely to win if the draw turns out to be 1-9. But that means that the vending machine gives you 10-39 more often, which means that you're more likely to win if the draw turns out to be 10-39. The lower odds on one side exactly mathematically cancel with the higher odds on the other side. Really, exactly equal.
 
CFLarsen, you're not getting it. Perhaps you should try an experiment at home. Use one six-sided die as your "vending machine" RNG, and another six-sided die as your "drawing". Play this "lottery" 60 or so times and you'll see that you win about 1/6th of the time.

Then repeat the experiment with a broken vending machine: play the number "6" every single time. You will find that, again, with a properly-random drawing, the dice-based vending machine has the same 1/6 odds of winning as the biased "6-only" vending-machine.

Perhaps the point you're missing: if the vending machine never gives you 1-9, then you're unlikely to win if the draw turns out to be 1-9. But that means that the vending machine gives you 10-39 more often, which means that you're more likely to win if the draw turns out to be 10-39. The lower odds on one side exactly mathematically cancel with the higher odds on the other side. Really, exactly equal.

You are not getting it. It isn't a case of the numbers 1-9 never coming out. It's a case of the numbers 1-9 coming out less often than the rest.

I specifically stated this several times.
 
There is a very simple solution to resolve the legal issues. Since the odds of winning given the skewed picks are not affected, claims of not winning because of the glitch should simply be dropped. There is however a real affect on wether the pot will be split for winners. Any winners that make the claim that they were adversely affected by the glitch should have their tickets voided and the full purchase price refunded.
 
You are not getting it. It isn't a case of the numbers 1-9 never coming out. It's a case of the numbers 1-9 coming out less often than the rest.

That difference is irrelevant, mathematially speaking.

Try Ben's experiment.

Then try the following variation -- instead of your "glitched" ticket machine always spitting out a six, flip a coin. Heads, it spits out a six, tails, roll a die normally.

Then try this variation -- instead of rolling a single die for your "glitched" ticked machine, roll two dice and take the larger. This makes ones much less likely and sixes much more likely (about half the time, your ticket will be a 5 or a 6).

In all four cases, if the die that determines the winning value is fair, your chances of winning will be exactly 1 in six.

You can determine this algebraically as well, although it will be time-consuming. For the simplest case (the lottery numbers are either 0 or 1), the analysis is as follows.

A "fair" RNG would select 0/1 with probability 0.5 each. Assume that the glitched RNG selects 0 with probability p (and 1 with probability 1-p).

You win the lottery in one of two cases: case 1, the glitched machine generated a 0 and the winning number is 0. Case 2, the gliched machine generated a 1 and the winning number is 1. If the machine for selecting the winning number is fair, then the following hold

Case 1 has a probabilty of p [the probability of buying 0] X 0.5 [the probability of 0 winning]. Case 2 has a probability, by similar argument, of (1-p)(0.5).

The total probability is thus : 0.5p + 0.5(1-p), or 0.5 (p+1-p) or 0.5(1) or 0.5.

Note that this is independent of p. It doesn't matter what the distribution at the ticket machine is if the lottery winner is fairly chosen. If you want to solve for larger problems, be my guest.
 
You are not getting it. It isn't a case of the numbers 1-9 never coming out. It's a case of the numbers 1-9 coming out less often than the rest.

I specifically stated this several times.

What's the difference, CFLarsen? We can set up an experiment anyway - A twenty-sided dice with the numbers 0-9 printed twice (the "winning number" generator), and a twenty-sided dice with the numbers 0-4 printed once and the numbers 5-9 printed three times (the broken "Lotto Ticket Printing Machine"). Roll each dice and record if they match or not.

It turns out, it doesn't matter if you have a lower chance of drawing anumber between 0 and 4 - your probability of matching a number between 0 and 9 is exactly the same - 1 right match out of 10 rolls.
 
The numbers drawn out of the lucky dip machine have no effect on the actual draw.

Hindsight will show you how many numbers you matched over a period and how many you were expected to match over the same period. However this is irrelevant. Your chances of winning were not affected.

Consider a lucky dip machine that is faulty and always draws out 1,2,3,4,5 & 6. This ticket is (and was) just as likely to win as any other, although as pointed out earlier you are more likely to share the prize if lots of people have the same numbers.

The key is not whether the lucky dip machine is fair but whether the lotto machine is fair.
 
This is similar to what drkitten just posted, but I wrote it, so I'm going to post it anyway. :p

Here’s a relatively simple model that allows for a skewed autopicker.

Let’s start with 2 fair dice. One die is the random draw, and no modifications will be made. The other die is the autopicker, and has a rule, such that if a one is rolled, it is rerolled. The reroll, whether it’s a one or not, is accepted as your picked number.

So the odds of having a 1 as your autopick are now 1/36. The odds that you roll a 1 on the first roll are 1/6, and the odds that you roll a 1 on your second roll are 1/6. Multiplied together, you get 1/36. For the number 2, there’s 1/6 chance of getting it on the first roll (if you roll a 2, you don't roll again), and a 1/36 chance of getting on a second roll (that represents a 1, followed by a 2 on the reroll), so the odds are 1/6 + 1/36 = 7/36. 3 through 6 work the same way, so your total odds add to 1, as they should:

1/36 + 7/36 + 7/36 + 7/36 + 7/36 + 7/36 = 1

Spelled out:

Code:
[FONT=Times New Roman][SIZE=3]1 1 --> 1[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]1 2 --> 2[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]1 3 --> 3[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]1 4 --> 4[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]1 5 --> 5[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]1 6 --> 6[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]2 1 --> 2 (although from here on in, you wouldn't actually need to roll the second time)[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]2 2 --> 2[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]2 3 --> 2[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]2 4 --> 2[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]2 5 --> 2[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]2 6 --> 2[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]3 1 --> 3[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]etc.[/SIZE][/FONT]


If the random draw is a 1, you have a 1/36 chance of winning.

If it’s any other number, you have a 7/36 chance of winning.

The random draw is a 1, 1/6 of the time.

It another number 5/6 of the time.

So overall, your chances of winning are:

1/6 * 1/36 + 5/6 * 7/36 = 1/6, which is exactly what you get if your two dice are fair to begin with.

In your real world example, when 3 8 10 12 13 18 23 came out, you had less of a chance of having won* that week, the same way you have less of a chance of having won when a 1 comes out above.

However, next week, that draw could be 11 19 22 27 30 35, in which case you have a better chance of having won.

*Maybe it’s more of a semantics issue, but your chance of winning is different here than your chance of having won. Before the draw, your odds are the same as everyone else. After the draw, you’re chance of having won on an autopick is higher in the second example than in the first.
 
There is a very simple solution to resolve the legal issues. Since the odds of winning given the skewed picks are not affected, claims of not winning because of the glitch should simply be dropped. There is however a real affect on wether the pot will be split for winners. Any winners that make the claim that they were adversely affected by the glitch should have their tickets voided and the full purchase price refunded.

But that doesn't address the issue of them winning less money than they would have, had the generator been random.

That difference is irrelevant, mathematially speaking.

Try Ben's experiment.

Then try the following variation -- instead of your "glitched" ticket machine always spitting out a six, flip a coin. Heads, it spits out a six, tails, roll a die normally.

Then try this variation -- instead of rolling a single die for your "glitched" ticked machine, roll two dice and take the larger. This makes ones much less likely and sixes much more likely (about half the time, your ticket will be a 5 or a 6).

In all four cases, if the die that determines the winning value is fair, your chances of winning will be exactly 1 in six.

You can determine this algebraically as well, although it will be time-consuming. For the simplest case (the lottery numbers are either 0 or 1), the analysis is as follows.

A "fair" RNG would select 0/1 with probability 0.5 each. Assume that the glitched RNG selects 0 with probability p (and 1 with probability 1-p).

You win the lottery in one of two cases: case 1, the glitched machine generated a 0 and the winning number is 0. Case 2, the gliched machine generated a 1 and the winning number is 1. If the machine for selecting the winning number is fair, then the following hold

Case 1 has a probabilty of p [the probability of buying 0] X 0.5 [the probability of 0 winning]. Case 2 has a probability, by similar argument, of (1-p)(0.5).

The total probability is thus : 0.5p + 0.5(1-p), or 0.5 (p+1-p) or 0.5(1) or 0.5.

Note that this is independent of p. It doesn't matter what the distribution at the ticket machine is if the lottery winner is fairly chosen. If you want to solve for larger problems, be my guest.

This is not the specific case: Glitched machine generate 0s less often than expected, and the winning number is 0, compared to those who manually choose their numbers.

As I understand the explanation from Ingeniøren (and they're bleedin' engineers), it isn't about winning for one person; It's about how the winning distribution is for all players.

Anyone want to comment on the explanation from Ingeniøren?
 
Maybe you'll believe the simulation. Here I coded up a one-dice-roll lotto game with various RNGs picking the numbers: a fair one, one that only picks 2-6, one that picks 1 only 1/2 as often as the fair one, and finally a picker choosing "1" all of the time. (The actual "lotto drawing" is a fair, uniform RNG.)

out of 1000 trials
fair picker wins 173 or 0.173
2-6 picker wins 161 or 0.161
semi-biased picker wins 140 or 0.14
always-pick-1 wins 174 or 0.174

out of 1000000 trials
fair picker wins 166566 or 0.166566
2-6 picker wins 166734 or 0.166734
semi-biased picker wins 165959 or 0.165959
always-pick-1 wins 166987 or 0.166987

out of 100000000 trials
fair picker wins 16672385 or 0.166724
2-6 picker wins 16664667 or 0.166647
semi-biased picker wins 16667281 or 0.166673
always-pick-1 wins 16669344 or 0.166693

How's that?
 
Last edited:
But that's the problem: Their method is not valid, as they discovered that some of the numbers (1-9) came out less often than the rest (10-36).

That is a different claim. You are saying that they are not useing a good random system to pick the winning numbers? IF that is the case then it would have an effect.
 
That is a different claim. You are saying that they are not useing a good random system to pick the winning numbers? IF that is the case then it would have an effect.

I didn't think he was saying that - I believe it is the 'lucky dip' machine that has the glitch, not the machine that picks the balls.

If it's the ball machine, then I'd like to know by what magic mechanism it was picking 1-9 less frequently than the other numbers :D
 
Claus, I had it explained to me thusly:

Imagine you have a toin coss game. I say to you "buy a ticket, it will have either heads or tails". So you buy the ticket. As it turns out, 40% of the tickets have heads and 60% have tails. You probably have a ticket with tails on.

Now we toss the coin. The outcome of the coin toss is not biased. It has a 50% chance of being heads and a 50% chance of being tails.

It comes up heads. You lose.

OR...

It comes up tails. You win!

Is that fair?

Yes it is fair. What you lose in heads, you make up for in tails. As the outcome of the coin toss wasn't decided before you bought your ticket, then the advantage you'd have IF it came up tails balances out the disadvantage if it came up heads
 
Last edited:
Maybe you'll believe the simulation. Here I coded up a one-dice-roll lotto game with various RNGs picking the numbers: a fair one, one that only picks 2-6, one that picks 1 only 1/2 as often as the fair one, and finally a picker choosing "1" all of the time. (The actual "lotto drawing" is a fair, uniform RNG.)

out of 1000 trials
fair picker wins 173 or 0.173
2-6 picker wins 161 or 0.161
semi-biased picker wins 140 or 0.14
always-pick-1 wins 174 or 0.174

out of 1000000 trials
fair picker wins 166566 or 0.166566
2-6 picker wins 166734 or 0.166734
semi-biased picker wins 165959 or 0.165959
always-pick-1 wins 166987 or 0.166987

out of 100000000 trials
fair picker wins 16672385 or 0.166724
2-6 picker wins 16664667 or 0.166647
semi-biased picker wins 16667281 or 0.166673
always-pick-1 wins 16669344 or 0.166693

How's that?

If your calculations are correct, then you will get a lower chance of winning, if the picker is biased.

This doesn't address what the article in Ingeniøren pointed out, however: That the problem doesn't lie with the single gambler, but with all those who used the automated online system.

That is a different claim. You are saying that they are not useing a good random system to pick the winning numbers? IF that is the case then it would have an effect.

No, I am not saying that. It's not a different claim. I made it clear in the very first post:

As in many other countries, Denmark has a national lotto. Here, you have to guess 7 correct numbers out of 36 possible.

To make it easy, there is an automated system that will select the numbers for you. You basically press a button, and the system spits out 7 numbers out of 36. It's easy, and it doesn't alter your chances of winning.

However: They have recently discovered that their random number generator had a glitch. In some drawings, the number generator for the automated filled-out coupons didn't select the numbers 1-9 as often as it should.
 
This is not the specific case: Glitched machine generate 0s less often than expected, and the winning number is 0, compared to those who manually choose their numbers.

As I understand the explanation from Ingeniøren (and they're bleedin' engineers), it isn't about winning for one person; It's about how the winning distribution is for all players.

Anyone want to comment on the explanation from Ingeniøren?

Yes. You're almost certainly not understanding it. The "specific case" you present is too specific to be useful in an analytic context; it's got too much information, from too many unfounded assumptions.
 
Well, more than that. They are paying to have those notions entertained. Buying the lucky dip ticket is a contract, the terms of which presumably state that the numbers are generated randomly with equal probability.

Meh, I'm clutching at straws and for no real reason as I hate the lottery with a passion, but it does seem to me that the game people paid for is not the game they got, regardless of the fact that their chances of winning were the same.

As per my coin toss analogy - if you were told that you were buying a lucky dip ticket that might have heads or tails on it, that's the game you pay for. If it turns out that all the lucky dip tickets had tails on, then that's not the contract you entered into.

Having said all this, I daresay the small print of the lottery machine says something like "we are not responsible if it's skewed".


The thing is they got a random number selection for them, it was just a slightly biased random number selection that had no change in their odds of winning.

If I you win when two dice I roll match, as long as one of the dice is fair the odds of a match will always be 1/6. So having one unfair die in this situation does not seem like something you can really take issue with.
 
As I understand the explanation from Ingeniøren (and they're bleedin' engineers), it isn't about winning for one person; It's about how the winning distribution is for all players.

Anyone want to comment on the explanation from Ingeniøren?

They say the glitch may affect the number of people that have to share the price. It doesn't affect the chances of winning.

Continuing with my simple example from before. If the RNG selected always the same sequence your chances of winning would be the same, but if you won you would have to share the price with everyone that used it. This RNG would be very bad, because you would never be able to win a big amount of money by using it.
 
If your calculations are correct, then you will get a lower chance of winning, if the picker is biased.

No. You're misinterpreting the numbers.

Out of 1000 trials, the difference between the highest win percentage (always-picks-1) and the lowest win percentage (semi-biased) is 0.034 or 3.4%

Out of 1000000 trials, the difference between the highest win percentage (always-picks-1) and the lowest win percentage (semi-biased) is 0.001 or 0.1%

Out of 100000000 trials, the difference between the highest win percentage (fair picker) and the lowest win percentage (2-6 picker) is 0.000077 or 0.0077%

If ben m had the time/processing power, he could have continued with ever-increasing numbers of trials, and the difference would get closer and closer to zero.
 

Back
Top Bottom