Someone sent this around at the office, as a unique show of how unlucky one can be: Mega Millions ticket with 2 numbers exact and 2 off by 1

First, spit-balling in my head, I replied "oh, that's not that unlikely, there must be hundreds or thousands of those".

Then, I thought "okay, so what are the actual odds... if one number on the nose is 1/100, and off-by-one is 2/100, then it's .01 x .01 x .02 x .02 x .02 x .02, so at 300 million or tickets, assuming everything is evenly spread, we're talking a .05% chance of having a ticket this close. (Update: these ranges are off, see below).

Then, I realized that lotteries are not lists, they are ordered sets -- so those odds are incorrect. I started trying to remember things like n!/(n! - k!)...

Then, I realized that anything I ever learned about ordered combinations out of a set, let alone still remember hinges on unchanging odds per draw.

Then, I realized that being off by one on a single 00-99 number is not 2/100. For 00 or 99, there is only one number out of that 100 that matches, not two. So that's 2 x .01 + 98 x .02 and... then I realized that it has been 20 years since I did any statistics and don't know much of anything anymore.

Then, I realized I don't know anything about Mega Millions and don't even know if 00 is allowed, or if it goes up to 99. (Update: see below)

So I think I have discovered at least 5 levels of wrong in my initial answer, but still feel it is one of those occasions in statistics where the answer is "you are right, approximately, but completely by accident".

Since this weird offshoot seems to come up in conversation in my life at least once a year, I would love to have a canonical answer to give.


Apparently, our problem space is an ordered set of 5 integers between 1 and 70, and one integer between 1 and 25 (independent from the ordering).

So the fully naive odds (disregarding ordering), but useful I think because it at the least establishes a floor for whatever numbers my feeble little mind comes up with later, those odds look like this:

1/70 x 1/70 x 2/70 x 2/70 x 2/70 x 2/25 = ...

But that's not even right -- the 2/70 is only for values not at the boundary. If you have "70", you don't have 2 numbers that can pop up next, because "71" is not in the hopper.

Will add to this later.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.