Combination Rating Derivation

To simply the procedure at first, consider just a pair of balls :

ball A and ball B

of which we have the following knowledge...
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:-

( (aA + aB) / 19.2 )

The 'goodness' of a pairing will be determined by the difference between aAB ( "actual matches" ) and this expected value.

So considering the simple equation:

"expected matches" - "actual matches"
we write :-
f( aA , aB , aAB ) = n( (aA + aB) / 19.2 ) - kaAB + c

where n, k, c are constants to be determined.

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

f( aA , aB , aAB ) = f( aA+9.6 , aB+1 , aAB+1 )

  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

f( 9.6 , 1 , 1 ) = 1

( 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.

ball A , ball B and ball C has a combination rating of

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

f( aA , aB , aAB ) = 1 + er
where   r = ( aA + aB -10.6aAB + 1 ) / 8.6

as the rating function used in the lottery rating page.

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.



Prediction Rating Derivation

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:

(6/49) x No of draws made
If a ball has less appearances than this figure, we can then begin to predict that it will be drawn soon.

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:-

g( a , d ) = n(a/d) + k

Where n, k are constants to be determined.

As stated above, in the mean (for zero deviance), we expect

a = (49/6)d

At this point let g = 0, then:-
g( a , d ) = n(a/d) + k
becomes...
g( (49/6)d , d ) = n((49/6)d/d) + k

                0 = n(49/6) + k

        k = -49n/6


This now gives g as:-
g( a , d ) = n(a/d) - 49n/6       

g( a , d ) = n( (a/d) - (49/6) )


The value of n can be found by fixing a value of g when the number of appearances for the ball is double the expected mean.

So let g=7 when a=(49/3)d, hence


g( a , d ) = n( (a/d) - (49/6) )
becomes...
g( (49/3)d , d ) = n( ((49/3)d/d) - (49/6) )

              7 = n( (49/3) - (49/6) )

    7 = n( 98 - 49 )/6

7 = 49n/6           

n = 6/7               


So our final expression for g is:-
g( a , d ) = (6/7)( (a/d) - (49/6) )

g( a , d ) = (6a/7d) - 7


Implementing the function

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:-

g( a , d ) = 1 + er
where   r = (6a/7d) - 7