Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Lottery Number Analysis

1,901 views
Skip to first unread message

Ken Wright

unread,
Nov 17, 2002, 7:36:33 AM11/17/02
to
OK, before I go any further, I know this will not predict the winning
numbers of next weeks lottery and therefore I won't be a millionaire next
weekend, but the method of doing it intrigues me. :-)

Assuming all the lottery draws (UK lottery draw = 6 numbers from 1-49 + 1
bonus number from 1-49) listed in 7 columns by say 100 rows, 1 row for each
draw. How would I determine the following:- Range of data is therefore say
A5:G105.

1) The most common number drawn
2) The most common pair of numbers drawn (ie 7 and 22 were drawn together in
the same draw the most times)
3) The most common 3 numbers as per above
4) The most common 4 numbers as per above

I am interested in both functional and VBA solutions, as the intent here is
one of education & curiosity as opposed to any need for the data.

Thanks
Ken...................


Brian Clarke

unread,
Nov 17, 2002, 1:58:57 PM11/17/02
to
I can help only with the first bit, and I can't help with VBA. However...

Each draw is represented by one row of the spreadsheet, cols A - F. The
numbers drawn are there. The draws occupy rows 9-655. In H9 - H57, I list
the numbers 1-49. In I9, I have this formula:

=COUNTIF($A$9:$F$655,H9)

and I copy the formula down to I57. Sorting H9:I57 puts the numbers in order
of how frequently they were drawn. The number drawn LEAST often is 13.
Spooky, isn't it?

I must just spend a bit of time thinking about formulas for the others. Mind
you, Camelot no longer seem to have the complete database of draws on their
web site. Unless you know better...

Brian


"Ken Wright" <ken.w...@NOSPAMntlworld.com> wrote in message
news:#BthoYjjCHA.4128@tkmsftngp08...

Tom Ogilvy

unread,
Nov 17, 2002, 2:10:37 PM11/17/02
to
If you want to minimize looping, you would build an array of all possible
combinations.

For pairs of numbers, it would be 1176

for 6 numbers, it would be 13,983,816

loop through each row and generate all the possible combinations for the 6
numbers in the row (ignore the 7th or you would have to consider duplicate
values - depending on how you numbers are generated).

for each pair, increment the specific element of the array.

for example, if you were using pairs, and the two numbers are 3 and 37
i = 3
j = 37
lngArray(i,j) = lngArray(i,j) + 1

Since a spreadsheet has 16,777,216 cells, you could come up with some
algorithm to map the combinations to cells in the sheet and accumulate
there.


If you used enough draws, you would find all the combinations are equally
probable. Since you already know this before you start, the analysis is a
tremendous waste of time. Also, your thinking is actually backwards - If
the eventual result is equality, the most commonly occuring combinations
should be avoided as they have already occurred more often than others and
are thus less likely to occur than the ones that have not occurred as often
(considering the continuum). However, within the next X days, it really
doesn't make a difference. If every combination had occurred a zillion
times except 1,2,3,4,5,6,7 had never occurred, then the probability it would
occur tomorrow is 1/685,206,984 (combinations of 49 taken 6 at a time x
49 - if the bonus number can duplicate on of the 6 previous numbers or
1/85,900,584 if it is combinations of 49 taken 7 at a time.)

Regards,
Tom Ogilvy


Ken Wright <ken.w...@NOSPAMntlworld.com> wrote in message
news:#BthoYjjCHA.4128@tkmsftngp08...

KRCowen

unread,
Nov 17, 2002, 10:02:08 PM11/17/02
to
Ken

In many states in the US, we have a tax on the stupid that works similar to
yours. Six numbers between 1 and 50 and one bonus nuber between one and a mere
36, a decent chance of winning, of 1 in 7.1 million give or take a few..

I have a spreadsheet set up that analyzes combinations and determines the
amount of winnings for large groups of picks. It also does some of the
statistical stuff you are interested in. It also has some simple code for
simulating a random drawing and for generating drawings continously until a
certain number of matches are generated.

It has two formulas that can be copied down a column to generate all the 2
number combinations in each 5 number groups. If you have 10 sets of numbers,
you need to just copy them down 50 rows. For 7 possibilities, with 2 selected,
you will need to add the additional 22 formulas to have a pair of formulas that
will need to be replicated every 21 rows. The formulas for the 10
possibilities in our scheme are

in col j =INDIRECT("$c"&INT((ROW()-1)/10+1))
in col k =INDIRECT("$d"&INT((ROW()-1)/10+1))

The column numbers in the formulas are adjusted as follows
in col j - cccdde in col j - defgefgfgg (with my 5 data columns being cdefg)

Let me know if you would like me to send you a copy of it.

Tom Oglivy whose posts I always read carefully and have learned an incredible
amount from of the last few years, correctly points out that you actually have
1176 {7!/(5!*2!)} possible two number combinations. I am just counting the 10
possibilities that I have after I have picked my 5 numbers (21 cominations
after your 7 numbers). I think Tom may have misled you a bit though. Because
a combination has occured, it is really not any less likely to occur again than
for a brand new combination to come up. That is why when I win my first Big
Game using my birthday, I will not switch to my wife's birthday, but will
contunue to play my own birthday and will be just as likely to win again. And
with only ~7.1 million combinations, I will likely be quite old by my second or
third win.

Good luck.

Ken

Ken Wright

unread,
Nov 18, 2002, 7:26:18 PM11/18/02
to
Thanks Brian, appreciate the response. As far as the history goes:-

On the Last 6 months Draws page

http://www.national-lottery.co.uk/results/resultsHistory/resultsHistoryActio
n.do

You will also see a link - 'Click here for Draw History Download Page'

This will give you the entire history for each of the different draws.

Regards
Ken.....................


"Brian Clarke" <bxc...@gotadsl.co.uk> wrote in message
news:e76rxsmjCHA.2460@tkmsftngp09...

Ken Wright

unread,
Nov 18, 2002, 7:32:56 PM11/18/02
to
:-) I really am not trying to use it to get rich Tom - honest. I knew I
could work out all the possible combinations and then count them somehow
using functions, but I didn't know if there was some smart bit of
functionality (perhaps arrays) that allowed you to search and count number
combos without having to do all that.

As far as the VBA goes, that's still pretty much greek to me. I can record
them, tweak them, and even write a bit, but nothing fancy whatsoever, so I
wouldn't know what the statements you have given me are telling me, or, how
to include them within a piece of code that would count anything.

Regards
Ken.....................


"Tom Ogilvy" <twog...@msn.com> wrote in message
news:#Xe3czmjCHA.1868@tkmsftngp12...

Margaret Loughrey

unread,
Oct 16, 2022, 5:00:15 PM10/16/22
to
Margaret Loughrey
I never thought that I could be this wealthy after all I've been through trying to meet ends and take care of my family, I used to play lottery but has never be lucky to win until I saw some comments online how he had helped a lot of people win, after first I didn't believe him but still I gave it a try, I wrote him a message on email after few hours he replied back so I told him what I want he assured me success. he also told me what I should do and I did all he requested from me, after some hours he gave me the lucky numbers and showed me where to play so i did as instructed to my biggest surprise I won 27 million pounds (Euromillions). Now I'm rich and happy all thanks to Dr Benjamin for the help, I'm nothing without you. if you need his help to win you can reach him via his email drbenjaminl...@gmail.com and his whatsapp +17066036031
0 new messages