To simply the procedure at first, consider just a pair of balls :
aA aB aAB |
- number of draws where ball A has appeared - number of draws where ball B has appeared - number of draws where ball A and ball B have appeared together |
Using these facts, we want to give this pair a rating, r = f( aA , aB , aAB )
Expected properties of 'f'
Each draw in the UK National Lottery draws 6 balls from 49. So a particular ball will be drawn beside 5 others selected from 48 remaining balls. We expect that, eventually, each ball will be drawn alongside every other an equal number of times, more precisely - once in every 48/5 (9.6) draws.
From this we can see two constraints on f must be satisfied:-
Arbitrary derivation of f
We expect (with zero deviance) : aAB = ( aA / 9.6 ) - but equally : aAB = ( aB / 9.6 )
So define "expected matches" as the average of these two values:-
So considering the simple equation:
Returning to our necessary constraints we see that the first property is satisfied by the symmetry of aA and aB in f.
The second condition will be satisfied by fixing an appropriate value of n.
The remaining two constants may be chosen arbitrarily to calibrate the function.
It seems suitable that f( 9.6 , 1 , 1 ) = 1
so that any pair that follow the norm precisely are given a rating value of 1.
I have also chosen f( 1 , 1 , 1 ) = 0 as this gives simple values for n and k.
By condition 2
  n( (aA+aB)/19.2 ) - kaAB + c = n( (aA+9.6+aB+1)/19.2 ) - k(aAB+1) + c
n( (aA+aB)/19.2 ) - kaAB = n( (aA+aB+10.6)/19.2 ) - kaAB - k
            naA + naB = naA + naB + 10.6n - 19.2k
  n = 19.2k / 10.6
By the chosen, arbitrary points
( 10.6n/19.2 ) - k + c = 1                
        k - k + c = 1
                      c = 1
      f( 1 , 1 , 1 ) = 0
( 2n/19.2 ) - k + c = 0       
  ( 2k/10.6 ) - k = -1
        -8.6k / 10.6 = -1
                                        k = 10.6 / 8.6
                                        n = 19.2 / 8.6
So
f( aA , aB , aAB ) = ( 19.2/8.6 )( (aA+aB)/19.2 ) - ( 10.6/8.6 )aAB + 1
f( aA , aB , aAB ) = ( aA + aB -10.6aAB + 1 ) / 8.6 |
Extension to a full combination
We define the rating value of a lottery combination of more than two balls as the product of the pair rating values of all pairings within the combination.
e.g.
f( aA , aB , aAB ) x  f( aA , aC , aAC ) x  f( aB , aC , aBC )
Implementing the function
When rating a function, there will be a slight problem with the negative values that occur for good pairs.
Also, this rating function will mainly be used to calculate the best 20 combinations.
If  f > 1  then in adding a number to an existing combination, the rating value will always increase. Thus if a pair has a rating that is not good enough to enter the current top 20 combinations then searching on from this pair will not produce any combination with a better rating value : i.e. the searching process can be pruned.
It would also be handy if the rating value increase exponentially as the paring gets worse. Numbers can be discarded more quickly this way and so searching shortened.
It is for these reasons stated that I have chosen
where   r = ( aA + aB -10.6aAB + 1 ) / 8.6 |
Clearly, since 1 and e are constants the two conditions from which the original rating function was derived from, still apply to this improved version.
Given the following information about a particular ball...
a d |
- number of draws where the ball has appeared
- number of draws made in total |
we want to give the ball a rating, r = g( a , d )
Expected properties of g
The UK National Lottery draws 6 balls from 49 in every draw made. We might therefore expect every ball to appear every 6/49 draws. Thus, every ball would have an equal number of appearances:
If a smaller value indicates a better ball, then we note that:-
Arbitrary derivation of g
From the notes above we can define g as:-
As stated above, in the mean (for zero deviance), we expect
                0 = n(49/6) + k
        k = -49n/6
g( a , d ) = n( (a/d) - (49/6) )
So let g=7 when a=(49/3)d, hence
              7 = n( (49/3) - (49/6) )
    7 = n( 98 - 49 )/6
7 = 49n/6           
n = 6/7               
g( a , d ) = (6/7)( (a/d) - (49/6) )
g( a , d ) = (6a/7d) - 7 |
As with the derivation of f, in practice it is required for g not to take values below 1.
So, the form used in this site is:-
where   r = (6a/7d) - 7 |