[Math] off by 1 lottery probability

probability

A lottery, where 6 balls out of 50 are drawn randomly without replacement, allows players of the lottery to be off by at most 1 for each number on their lottery ticket. Additional rules of the lottery are as follows:

  • The balls are numbered 1 thru 50 and are all equally likely to be drawn.

  • Both the winning numbers drawn and the players tickets contain random numbers (from 1 to 50). That is, the player does not pick/choose their own numbers, it is done randomly for them via computer.

  • Both the winning numbers and the numbers on lottery tickets are sorted in ascending order and winning tickets must match/map in that order. For example, if the winning numbers drawn are (sorted) 5, 10, 15, 16, 20, and 30 and the ticketholder has 5, 10, 16, 17, 20, and 30 (also sorted), the 16s will not map together. The matching numbers are (5:5), (10:10), (15:16), (16:17), (20:20), and (30:30). That is a winning ticket.

So the question is how much more likely is a single lottery ticket expected to be a winner using the off by 1 rule verses a similar but much stricter lottery (also 6 out of 50 balls) but which disallows the off by 1 rule (numbers must match exactly)?

Work done so far:

The strict lottery chances of winning on a single ticket are 1 in about 15.9 million which is 1 / (50 choose 6).

The off by 1 lottery was simulated on computer and I am seeing a 503 increase in probability (about 1 in 31,600 chance of winning).

I would like to know if this type of problem can be done mathematically or if it is too difficult. Also, I was hoping someone could do a simulation also to help verify my finding of 503x increase in chances of winning.

Additional info that may be helpful for analysis… The worst case boost in expected win probability is 7x if (for example), the drawn balls are 1,2,3,4,5,6. This would match the following tickets: (1,2,3,4,5,6), (1,2,3,4,5,7), (1,2,3,4,6,7), (1,2,3,5,6,7), (1,2,4,5,6,7), (1,3,4,5,6,7), and (2,3,4,5,6,7). Best case boost is 729x where the drawn balls are something like 5, 10, 15, 20, 23, 30. The 3 most frequent boost scenarios (from simulation results) are 486x, 648x, and 729x. These are 3 out of 137 scenarios I am seeing in simulation of 100,000,000 decisions. I am not yet sure if there more.

If something is unclear, please ask before attempting to answer the question and I will clarify.

Best Answer

Here's a quick derivation which gives the same solution as that provided by gar, although a slightly different recursion.

A winning $k$ ball combination consists of integer sequences $0<x_1<\cdots<x_k$ and $0<y_1<\cdots<y_k$ so that $|x_i-y_i|\le1$.

Let $A_k(n)$ be the number of ways to pick winning $k$ ball combinations so that $x_k,y_k\le n$. This is the same as $T(n+1,k)$ defined by gar.

Similarly, let $B_k(n)$ be the number of ways to pick $k$ ball combinations so that $x_k\le n$ and $y_k\le n+1$. We'd get the same number of instead we require $x_k\le n+1$ and $y_k\le n$ due to symmetry.

Obviously, $A_k(n)=B_k(n)=0$ for $n<k$. Otherwise, $A_0(n)=B_0(n)=1$.

Let's first consider $A_k(n)$. If $(x_k,y_k)=(n,n)$, what remains is picking the remaining $k-1$ balls with $x_{k-1},y_{k-1}\le n-1$, which can be done in $A_{k-1}(n-1)$ ways. If $(x_k,y_k)=(n,n-1)$, the remaining $k-1$ balls should have $x_{k-1}\le n-1$ and $y_{k-1}\le n-2$, which can be done in $B_{k-1}(n-2)$ ways; the same applies to $(x_k,y_k)=(n-1,n)$. Otherwise, $x_k,y_k\le n-1$, which leaves $A_k(n-1)$ alternatives. Thus, $$ A_k(n)=A_{k-1}(n-1)+2B_{k-1}(n-2)+A_k(n-1). $$

We derive a recursion for $B_k(n)$ in a similar way. If $(x_k,y_k)=(n,n+1)$, the remaining $k-1$ balls require $x_{k-1}\le n-1$, $y_{k-1}\le n$, leaving $B_{k-1}(n-1)$ alternatives. Otherwise, $x_k,y_k\le n$, leaving $A_k(n)$ alternatives. Thus, $$ B_k(n)=B_{k-1}(n-1)+A_k(n). $$

Plugging in $k=6$, $n=50$ gives $A_6(50)=8000567708$. Since each of the two integer sequences are drawn randomly with probability $1/\binom{n}{k}$, this gives the probability of winning $$ \frac{A_6(50)}{\binom{50}{6}^2} =\frac{8000567708}{15890700^2}\approx 0.00003168361647. $$

Related Question