Lottery Span Algorithm is an application of sliding window in lottery

Author: Mike
Updated: 2023-05-03

Lottery Span algorithm determines the range of lottery numbers selected by minimum and maximum values. It does not need to determine the specific number, only the size of the range.

Introduction

Lottery Span assumes a premise that the minimum value is used to determine the maximum value, or use the maximum value to determine the minimum value. It handles the most efficient cases where the minimum value is small and the maximum value is not very large, or the maximum value is large and the minimum value is not very small. The opposite example is that when the minimum value is the smallest and the maximum value is the largest, this means the largest span; otherwise, the span may be very small.

The formula for calculating the maximum span is:

n-1

The formula for calculating the minimum span is:

c-1

c: the number of selected numbers in a ticket; 
n: the total number of optional numbers

Two Features of Span

Lottery Span is a sliding window. It has two characteristics. One is that it does not determine the minimum or maximum value, and bets with the same span may have different minimum or maximum values. For example, the following bets have the same span:

1, x, x, x, 55
2, x, x, x, 56
9, x, x, x, 63

The second feature is that Lottery Span determines the range of number selection, which means that other numbers have to be selected in the range in the middle of it. Therefore, a smaller range selection will exclude a lot of numbers. Even so, it doesn't mean that larger spans involve more bets. Just look at the absolute probability of the span in the figure below, and its distribution is relatively uniform.

Absolute Probability of Span

Algorithm span absolute probability

Basically, there are not many bets with a small span, because a small span means that there are few optional numbers, so the number of bets must not be many. Interestingly, the one with the most bets is not the one with the largest span. For example, the maximum span of Mega Millions is 70 - 1 = 69, but its maximum bet span is 53, and it has 375700 tickets. And a span of 69 has only 50116 tickets. Because the span is a sliding window, although the maximum span contains the most numbers, the selection range cannot be moved, so it does not have the most bets. To repeat, the full range of absolute probabilities is available from Lotto Uni.

Relative Probability of Span

The absolute probability is well known, and you can look back at any time, and you should pay more attention to the relative probability. The chart below shows the relative probabilities for the span of the last 200 draws of Mega Millions. Roughly, it agrees with absolute probabilities. The difference is that the span of 60 occurs most often. Span 53 with the most probability appeared 7 times and tied for 6th place. The minimum span is 12, which occurs once. It means that the difference between the largest number and the smallest number in the draw with the densest numbers is only 12.

Algorithm span relative probability sorted

The relative probability in the figure above gives us a rough idea, but the statistics of discontinuous numbers are not intuitive enough. The graph below is the relative probability of spanning consecutive numbers. The X-axis represents the span value, and the Y-axis represents the number of occurrences. The data points in the bottom row are 0, which are basically small spans, which means it has never appeared. And large spans have all appeared. Basically, we can see that the span is mainly concentrated around 50-60.

Algorithm span relative probability unsorted

Actual trend of Span

After you have a certain understanding of the absolute probability and relative probability of the span, let us come to the trend analysis of the span. You need to look at this chart very carefully, there are many patterns that can be found in the trend spanning hundreds of periods. For example, the recent spans are very close, and the spans of 6 consecutive periods are almost the same. In the previous period of time, there was a change in the span of continuous jumps. Perhaps the most difficult thing is to compare the extremely small spans a long time ago, which were too unpopular.

Algorithm span history trends

Span filter

A span filter is a selection within a range. Of course, you can also precisely select only a certain span, that is, set the minimum value and maximum value of the slider below to be the same. When you slide the slider, the probability will be displayed in real-time below. Then add this filter to the lottery calculator to generate lottery numbers for the next draw.

Algorithm span filter

Conclusion

Lottery Span is an algorithm that counts the gap between the minimum and maximum values. Like a sliding window, it does not determine the minimum or maximum value, only the distance. The probability distribution of the span is relatively uniform, large spans will appear, and small spans rarely appear. You can choose a span range to generate lottery numbers, the smaller the range, the more numbers will be screened.