4
$\begingroup$

Given a $5$ out of $36$ lottery ($5$ unique numbers out of pool of $36$ numbers ranging $[1,2,…,36]$).

How to calculate probability that a draw has at least one pair of consecutive numbers (like $22, 23$ -a pair of numbers whose difference $23-22 = 1$)?

Every draw ($5$ numbers) has $10$ pairs. For dif1 we have total of $35$ pairs ($1$ and $2$, $2$ and $3$ ... $34$ and $35$). There are total of $630$ pairs (binomial(35, 2)).

Problem is I think cannot think like that:

$1$ concrete pair out of $630$ appears with $1/630$ chances. Probability to have any of $35$ dif1 pairs is $35/630$ (if I choose $2$ numbers randomly). But I choose $5$ numbers (which give $10$ pairs) - and it is not the same as just drawing $2$ pairs out of $630$ pairs.

I cannot figure out how to reason in this case.

The question is about not dif1 but also dif2, dif3... dif35 (there is only single such pair!).

How to mathematically calculate the probability?

Can I think of a single 5-out-of-36 draw as an equivalent of 10 independent "pick a pair out of all possible pairs"? It would give dif1 ($35$ dif1 pairs out of $630$ all pairs) as $((35/630)+(34/629)+(33/628)+(32/627)+(31/626)+(30/625)+(29/624)+(28/623)+(27/622)+(26/621))$. But it differs greatly from a real lottery, which makes me think that formula (and reasoning) above is not applicable!

P.S. Stars and bars method is described here (wiki), example how to use it is here

$\endgroup$
0

1 Answer 1

5
$\begingroup$

It is easier to count the draws where no two numbers are consecutive, by a stars-and-bars-like method. Let there be 31 0s, which represent the 31 numbers not drawn. These define 32 spaces between and around them (at the ends); place five 1s representing the numbers that are drawn in those spaces, at most one per space. There is a bijection between such placements and draws with no consecutive numbers, and there are $\binom{32}5$ placements in total, so this is the number of excluded cases. The final probability that the draw contains some consecutive pair of numbers is $$1-\frac{\binom{32}5}{\binom{36}5}$$

Now consider a forbidden difference of 2. Then the 36 numbers split into 18 even and 18 odd numbers, and if a combination avoids using consecutive numbers in both these sub-lists, it is valid. Then the number of difference-2-avoiding combinations is the sum of the numbers of combinations with $a$ even and $5-a$ odd numbers, $0\le a\le 5$, avoiding consecutive even or odd numbers, which reduces to the previously solved problem: $$\sum_{a=0}^5\binom{18-a+1}a\binom{18-(5-a)+1}{5-a}$$ From here the probability that a combination avoids the difference of 2 can be computed. Higher differences mean more residue classes of numbers, more partitions and more cases, but the principles remain the same.

$\endgroup$
4
  • $\begingroup$ Brilliant! May I ask you please to comment on not just consequtive numbers (dif1), but numbers having a fixed difference, say dif10 (26 pairs of numbers, each pair gives a difference of 10). What is the probability to hit at least one (or more) of any of such dif10 numbers in one draw? Unfortunately I cannot reason how to apply your great method to differences more than one... $\endgroup$
    – caasdads
    Nov 8, 2018 at 10:33
  • 1
    $\begingroup$ @caasdads I added an approach to higher differences. $\endgroup$ Nov 8, 2018 at 10:54
  • $\begingroup$ +1 Nice answer! Especially what is mentioned concerning the approach for difference-$n$ where $n>1$. I was still puzzling on that when this was published. $\endgroup$
    – drhab
    Nov 8, 2018 at 10:59
  • 1
    $\begingroup$ @caasdads For #1: we do not number the balls until the very end. We start with a row of 0s, then we place 1s in the gaps according to the rules. Only after that do we write, below the 0s and 1s, the numbers that could be drawn in the original problem; those numbers with a 1 on top form the selection. $\endgroup$ Nov 8, 2018 at 13:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .