PDA

View Full Version : Lotto Calculations!


Pinch Paxton
December 3rd, 2003, 10:40 PM
I need the help of a math's wizard, because I am confused by something....

The odds of winning £10 on the Lotto are 56.7 to 1. Ok.

But I have been told that if you write 57 lines of numbers, no matter what they are, you can't always win £10. In fact I have been told that you need 168 lines of numbers to guaranty £10.

Could anyone explain the mathematics behind this in simple terms please.

I am trying to write a computer program to find the smallest number of lines possible. I also want someone to be able to type 6 numbers into the computer, and the computer will make the smallest number of lines using those numbers.

Pincho

jordan
December 3rd, 2003, 11:06 PM
I am not sure what you mean by "lines of numbers", perticularly in your last sentence.

Pinch Paxton
December 3rd, 2003, 11:35 PM
The Lotto is 6 numbers from 49. A line of numbers would be 1 set of 6 numbers.

Line = 6 numbers.

A ticket!

168 tickets required to Guarantee £10???

I thought that 57 tickets guaranteed £10 so I am confused by that.

What maths can be used to work this out?

Pincho.

jordan
December 4th, 2003, 12:05 AM
So 6 numbers are randomly drawn from the numbers 1 through 49. Does the order in which they are drawn matter? Are the numbers replaced after being drawn? (I would asume not) I only ask because my initial guess is that there are 1.7x10^9 possibilities for lines, meaning you will have to make more than 168 lines to ensure a winning ticket.

For the first number drawn, you have one number and the pool has 49, giving you a 1 in 49 chance of getting the number. On the second number you have a 1 in 48 chance as the pool decreases by one. I am pretty sure your odds are multiplied in a situation like this. So the result would be:

49x48x47x46x45x44 which equals about 1x10^10.

Your odds are now 6 in 1x10^10 or 1.7x10^9

This is just an idea though. It makes sense to me right now so I thought I would give my input.

Pinch Paxton
December 4th, 2003, 12:31 AM
The order does not matter. The numbers are not replaced in the drum.

You can choose any 6 numbers. You just have to get 3 of them right. Odds = 56.7 to 1 of 3 from 6. How many lines before you are guaranteed £10.

Somebody has posted 163 (Not 168) on another forum.

I don't know my math's signs so ^ just confuses me. I need the full explenation in +-*/ these signs. Well I suppose I could just type your maths into my computer and it will sort it out for me.

Pincho.

jordan
December 4th, 2003, 4:12 AM
There seems to be enough information now. It's just too late at night for me to be thinking about this stuff. I know there is some formula for finding the number of possibilities for choosing a line of 6 numbers from 49 numbers. If someone could post relativly soon so I could get an answer that would be appreciated.

Pinch Paxton
December 4th, 2003, 9:29 AM
I found this. It uses 42 balls instead of 49. It has the maths for the odds, but does it help with the minimum number of lines?


Consider a lottery where there are initially 42 balls, and six are drawn. What are the odds of getting exactly three numbers correct (out of the list of six you selected)?

Something like the following will happen:

The first ball is not in your list (chances are 36/42)
The second is in your list (6/41)
The third is in your list (5/40)
The fourth is not in your list (35/39)
The fifth is not in your list (34/38)
The sixth is in your list (4/37)
Overall odds of this exact sequence occurring:

(36.35.34.6.5.4)/(42.41.40.39.38.37) = 0.001361092504


However, there are other orders in which the balls might have come out, 19 of them in fact - the number of combinations of three items taken from six is 6! / 3! 3! = 20. Therefore the chances of getting three numbers is 20 times the above or 0.02722185008.

You will note that irrespective of the order of drawing, the numerator will be 36.35… for wrong balls, and 6.5… for correct ones. For example, a different order of drawing would have given (36/42)(35/41)(34/40)(6/39)/(5/38)(4/37) - but the product is exactly the same. So we can multiply the calculated chance of a single sequence by the number of different sequences (20) that will lead to the same overall result (three hits).



The above should be clear enough, but it is possible to write down the equation in factorial form.

Let
B = Total number of balls (42)


D = Number drawn = Number selected (6)


H = Number correct ('Hits') (3)


The probability is (read on only if you have no fear of equations):



B-D! D! B-D! D!

P = ---------------------------------------------

B-2D+H! D-H! B! H! D-H!

wolfson
December 4th, 2003, 10:33 AM
Oh dear we had the answer at the beginning the chances of winning £10 is 1 in 1133.119/20 or 1 in 56.7, just think Inter-cooperative equations:

20.00 combinations of 3 (3 balls need to win £10), from 6(6!/(3!x(6-3)!), ! = factorizing.

These are the correct equations, they finalized these results by averaging the wins of 4million people which also concluded the Inter-cooperative equation using Snxy, this might sound a bit advanced for lotto results, but its what you use when finding possibilities. And gl all at the lotto…. lol

Pinch Paxton
December 4th, 2003, 10:38 AM
Yes I know that the odds are 56.7 to 1, but does that mean that if you make 57 tickets for the Lotto you are guaranteed to win? I am trying to find the minimum number of lines to guarantee a win. It's a different type of mathematics.

That is the problem.

I think it has something to do with spacing the numbers by groups. So the first line could be..

1,7,13,19,25,31

The second line...

2,8,14,20,26,32....

etc...

It would require using the same numbers as few times as possible, I think!

Thanks!

Pincho.

wolfson
December 4th, 2003, 10:54 AM
You could win on the 1st ticket or you could win on the Millionth, the theoretical law of possibilites are Inter-cooprative quantities, thus theoretically you would win when putting 57 tickets on.

wolfson
December 4th, 2003, 10:56 AM
There is NO guarentee that you would win hence the name possibility!

Pinch Paxton
December 4th, 2003, 10:58 AM
There is a guarantee that you would win. So far its 163 tickets that guarantee a £10 win, but I think it should be less.



Edit: What I mean is that you have to put all 163 tickets on in one go. £163 to win £10. You don't have to make a profit, you just have to win £10.


Pincho.

wolfson
December 4th, 2003, 11:05 AM
NO there is NOT a guarantee at all, If you look at nomial calculation the nTH term changes at a variable rate, which relates to mr^2, if you could then change the varaible to a constant you could then guarantee a lottery win, there will never be a guarantee, it may be likley but not guarnteed!!!!

Pinch Paxton
December 4th, 2003, 11:07 AM
What I mean is that you have to put all 163 tickets on in one go. £163 to win £10. You don't have to make a profit, you just have to win £10.


Pincho.

wolfson
December 4th, 2003, 11:11 AM
Maybe but ALL i am saying is that there is NO guarantee that i will win £10 when i put on 163 lottery lines, it is just a possibility. And they relate to N.

Pinch Paxton
December 4th, 2003, 11:15 AM
There is a guaranteed £10 win for 163 lotto lines, but you have to do an exact sequence of numbers, with a certain spacing of numbers apart from each other. No matter what Lotto numbers are drawn, you will win £10, because you have all cases of three numbers from any 6.

Pincho.

Pinch Paxton
December 4th, 2003, 11:31 AM
Lets make this a simpler example..

Lets say that the Lotto had just 6 numbers, and you just have to Guarantee 2 numbers.

1-2
1-3
1-4
1-5
1-6
2-3
2-4
2-5
2-6
3-4
3-5
3-6
4-5
4-6

14 tickets guarantee 2 right.

Pincho.

jordan
December 4th, 2003, 1:15 PM
Your last post was on the right track, Pinch. What you need is to find how many possiblilities there are for picking three numbers from 42. You found 14 for picking two numbers from six (I think you missed 5-6, making the total 15 tickets). This would take a lot longer for three numbers from 42, however. (Mabey one of your previous posts covered an equation for this, I don't have a lot of time to check now) When you do that, it seems like you could devide your total by 2 as a ticket is 6 numbers, or 2 sets of 3 numbers. By doing this you have covered every possibility the machine can draw. You certainly won't make a profit though.

jordan
December 4th, 2003, 1:38 PM
New idea....

Deviding by 2 wouldn't be enough. By placing three sets together, you have made more than two different sets. I came up with 20.

A ticket with numbers 1-2-3-4-5-6 would not only have 1-2-3 and 4-5-6 covered like I origionaly thought.
It would cover
1-2-4
1-2-5
1-2-6 etc.

I got 20 sets of three on each ticket, although I'm not sure if there is overlapping or not. If each ticket does have 20 sets of three, you 163 looks a lot more reasonable.

Pinch Paxton
December 4th, 2003, 1:42 PM
Ahhh yes I remember reading that there are 20 sets of 3 numbers somewhere.

Yes you're right I missed 5-6. Sorry that one of my examples confused you. It was from the American Lotto 6/42. My calculations are from the UK Lotto 6/49. I'm still stuck!

Pincho.

Emmon
December 4th, 2003, 2:15 PM
i keep getting 110,544 for the 49 version ( one to win a tenner )

if its 49 balls and you need 3 i work it like this;

You need 1 number so thats 1/49 in getting that.

Then you need another so thats 1/48 ( as youve already got 1 number )

then another, so thats 1/47.

49 x 48 x 47 = 110,544

where do you get 134 from?

wolfson
December 4th, 2003, 2:17 PM
Your odds are 1 in 133.5 chance is 7.49E-3 (0.00749), the equation I used is M1(x) = Si(xi-E(x))nP(xi)
=SixiP(xi)-Sie(x)P(xi)= E(X)-E(X)SiP(Xi)=0. Though this would not be worth doing as spending £134 on lotto tickets to win £10 is just not ethical. The equation goes on a bit more till you transpose to reach N^2 which ends as E(X^2)-EP(X^2).

Pinch Paxton
December 4th, 2003, 2:21 PM
Sounds good! can anyone please varify this? Can anyone suggest the............

For Next loop

in programming to create the lines?

Thanks!

Pincho.

wolfson
December 4th, 2003, 2:35 PM
n_C_k = n!/ k!(n - k)! !=Fractionating

This is a simpliar way of writing it out for you, i used the from the final transposed sections of n^2

jordan
December 4th, 2003, 4:51 PM
Emmon, you are assuming that the order matters. If it did, each ball (now changed to 42 of them) would have the odds you said, but since order doesn't matter, the odds are less.

The way I see it now is this,

The machine can pick any 3 numbers it wants. To find the number of possibilities, you use the equation:

n!
------
r!((n-r)!)

were n=number of balls (42) and r=number drawn(3)

The answer I get is 11480. As I said earlier, joining two sets of three on a ticket of six yeilds 20 sets of three. So deviding the number of sets that can be drawn (11480) by the number each ticket holds (20) means that you would need 574 tickets to guarentee a win.

wolfson, I didn't understand your last two post. If you could explain them to me (where you got the equations and what the variables are) that would be helpful as I am determined to get an answer now.

Pinch Paxton
December 5th, 2003, 2:41 AM
Hi Jordan! This is an interesting problem, because I think that the lowest number of Guaranteed tickets has never been calculated. The 163 tickets that I mentioned were found by computer, but not mathematically, just randomly. Anyone who can beat that number will probably be the first person to do it. I must go through the details once more because some of your starting figures seem a little wrong to me.


Number of balls in machine = 49
Number of balls removed from machine = 6 (Numbered 1 to 49)

Number of choices on your ticket = 6

You have to get 3 right out of 6

So what is the minimun number of tickets that guarantee 3 right?

Pincho.

Edit: I posted an example with 42 balls because it was the only example I could find on the net.

wolfson
December 5th, 2003, 3:28 AM
The equation is just a reagular Sn. for a squenece of muliple progressions the variable's are constant n always being the squence value, and k being the squence constant!

Pinch Paxton
December 5th, 2003, 3:38 AM
I looked at Recursion, and permutations in programming but the examples were like this...


1,2,3
1,3,2
3,2,1
2,3,1...etc

That's not what I am trying to do. I'm trying to do this....


1,7,13,19,25,31
2,8,14,20,26,32
3,9,15,21,27,33
4,10,16,22,28,34..etc

to make the minimun number of lines to win £10. I believe that it would have as few repeats as possible, which is what I am aiming for.

Pincho.

wolfson
December 5th, 2003, 3:41 AM
Yes just EXPAND, 1,2,3, is on the right step. Listen Sn. is right you will not be able to lower the number, unless you lower n and k.

YT2095
December 5th, 2003, 3:50 AM
wouldn`t it just be 49x48x47 and that should give you every single combo?
and then you`de just have to factor out the order as they`de be irrelevent?

like,
1
2
3
1,1
1,2
1,3
2,1
2,2
2,3
3,1
3,2
3,3
1,2,3
1,3,2
2,1,3
2,3,1
3,2,1
3,1,2

oh hell I give up! :) LOL

wolfson
December 5th, 2003, 5:21 AM
lol the number are in multiple's of three

Pinch Paxton
December 5th, 2003, 5:34 AM
But doesn't this.....

1,2,3
1,3,2
3,2,1
2,3,1...etc


.....just change the order of the balls?


Because the order of the balls does not matter. Just the numbers on the balls matter.

Pincho.

YT2095
December 5th, 2003, 5:39 AM
that`s what I mean, thats the stuff ya have to factor out :)
only I got a bit lost after that bit :)

Pinch Paxton
December 5th, 2003, 5:42 AM
Oh I see, you mean look for repeats whilst doing every combination.

YT2095
December 5th, 2003, 5:44 AM
yeah, or in this case, rather than do that, any repeated number would take the place as a variable in your For Next loop, so it wouldn`t be as bulky and require masses of mem in DIM array. you could just elliminate them as they crop up :)

atinymonkey
December 5th, 2003, 5:54 AM
Look for repeats? Like trying to find the universes 'favorite' group of numbers?

That sounds like a spiffing plan. Absolutely top hole. Let me know which ones it churns out, old chap.

Pinch Paxton
December 5th, 2003, 5:56 AM
My sequence would start off...


1,2,3,4,5,6

It would eventually calculate 14 million tickets!

If I do..

1,2,3

how do I choose the other 3 numbers?

Pincho.

Sayonara³
December 5th, 2003, 5:56 AM
Anyone who says "42" like they're being clever and original will be instantly banned.


[edit]

Stupid simultaneous posts :-(

YT2095
December 5th, 2003, 6:03 AM
nested for next loops.
you HAVE TO pick 6 on any 1 ticket always. so your outermost loop would be something like:
A= 1
DO
<insert rest of prog>
A=A+1
Until A=6

the <insert rest of prog> will use the internal For Next loops but using numbers already chosen in your sequence of 6.
so:
C=1
For B=C to 49
<then keep passing the numbers chosen back to C >
next B
and No, I`m not going to write it for you :)
it`s your baby, you do the rest :)

jordan
December 5th, 2003, 3:54 PM
wolfon, would you mind explaining about your equation in which you calculated the lowest number (post 29)?

Pinch Paxton
December 5th, 2003, 3:57 PM
Yeah I'm still interested in making this program, but I am still a bit stuck. I'm having a problem converting what I'm reading into Basic Programming.

Pincho.

mick_curtis
April 11th, 2005, 9:08 AM
Make a table with at least 3 fields:
Sequence Number
TheValue
Yes/No tick flag


Randomly make 6 different numbers.

Do a query to update each record's yes/no flag IF TheValue is random number 1;
Do a query to update each record's yes/no flag IF TheValue is random number 2;
etc. up to 6


3.a. Do a query selecting ticked records;
b. ask if a sequence number occurs many times:
does it have 3 ticks or more.
If the answer is NO then the current 6 random numbers need to be added to the table:
increment the sequence number.
Insert 6 records.

Also, remember to clear down the tick flags.

Run the program to generate 6 random different numbers and you should produce 6 records all sharing sequence number 1.

Loop this many times and quickly the answer (sequence number count) will exceed 100 but from then on, the program needs to run for ages before the number climbs much higher.

Regards,

Mike (I made it in MS Access)

mick_curtis
April 11th, 2005, 9:40 AM
I should add that I dictated the first results by manually data entering
1 1
1 2
1 3
1 4
1 5
1 6
2 7
2 8
2 9
2 10
2 11
2 12

and so on for about 10 sequence numbers;
I did that because I was interested to see an intuitive shape, if any, in the output.... and I have a nagging suspicion that a 'good start' may affect my total number at the end.

I counted the occurrence of each individual number and it is not evenly balanced; so my solution is not presented as being optimal. The program should ideally keep a note of how often each of 49 numbers has been used by me; and then, when 3 numbers are noticed unmatched, the other 3 numbers in the allocation can be chosen from the underrepresented number pool - instinctively, that seems like a good approach.

My sequence number count is pretty much frozen at 274 sequence numbers;
on average, over 100s of draws, I would win back about 30% of what I spend (ie. 70% loss approximately) - assuming that I never get the 5 balls and bonus, and never hit the 6 ball jackpot: just winning 10 pounds, 65 pounds or about 1500 pounds on 3/4/5 ball matches.

In other words, like modern roulette, this is a game which does not favour me.

Mike

Draco
June 8th, 2005, 10:32 PM
If you are still looking for a solution i have been playing the UK lottery for years and now we live in New Zealand I play the NZ Lotto. The UK as you know old fruit is 49 numbers....the NZ Lotto is 40 !!!

I have used a system for over here and in the UK where I pick 7 numbers out of the 40 ( NZ ) and am guarunteed to cover all those 7 number combinations ( = 7 lines ), I also do it with 8 numbers, covering all combinations again ( = 28 lines ). In the UK it won me a few hundred quid but using the same perm I have won over $1500 in the las 10 months. Not brilliant but not bad either and am still in profit from this.

How far have you got with the programing of your lottery software?

I may be able to assist?

Cheers

Draco

Nicoco
June 9th, 2005, 2:40 AM
The only way you can be 100% sure to win the 10pound price is to buy tickets with ALL the combinations. IFF you have all the combinations for 3 out of 42 (or 49 or whatever), then there are no other combinations left, and you can collect the money (regardless of your tremendous loss). The reason is that if you don't have all the combinations, there is still some chance that the outcome can be one of the combinations you didn't pick.

There is some better solution because you only need three correct numbers, so you can actually put more then one combination in one ticket (I mean, if you buy a ticket, you already have some combinations covered due to the fact that there are more then three numbers on the ticket)

Draco
June 10th, 2005, 1:00 AM
yes i agree. Do you have any permutations to better this one Nicoco?

Hey pinch
Have you realised your goal in making the lotto program yet?

bmaxwell
June 14th, 2005, 11:45 AM
I am dumber for having attempted this.

I think that the number of tickets is pretty small (when compaired to the number of possible tickets) to assure the win off 3 numbers. Pall park I would say 60 tickets is close.

I think the key to your solution is based on two concepts

how many unique combinations of 3 digits in the set of 49.

and how many unique sets of 3 can fit on one ticket

This is the point at which my brain exploded. I am sure that this has been done and if I had a probability text in front of me I would be golden.

In anycase with out a brain and considering the lack of several pints of guiness needed to put out the flames, I can go no further with this for now.

On a side note, BASIC be it V, Q or Old School is the wrong tool for such a programming project. I would use PERL. There are some very good Math modules that you can download and install and PERL is free.

Although i dont think you would need any MATH here once in side the application you just need lots and lots of array variables. Since PERL doesnt stiff you on memory usage you can even cram all of the arrays into one big giant hash for easy extraction.
Again delving to deeply into this whilst my brain is damaged would be dangerous to my health.

novice1964
July 31st, 2005, 4:36 PM
Hi,

I though the calculation was simply:-

sum a = (49/6)*(48/5)*(47/4) = 921.2

because you have
6 chances to match the first number
5 chances to match the second number
4 chances to match the third number

but I am not sure how the next bit work

you have six numbers on the ticket so does that mean you have to involve

sum b = (6/3)*(5/2)*(4/1) = 20

some where possibly sum a/sum b?

so you get 961.2/20 = 48.06

or does it mean you have to buy 922 tickets to guarantee a win of £10.00 with twenty chances on each ticket????

or

should it be

sum c (49/3)*(48/2)*(47/1) =18424

then 18424/20 = 921.2 ??????

?????????

dave
July 31st, 2005, 5:50 PM
There's a pretty good article on this here (http://members.cox.net/mathmistakes/rawdata.htm). Saves me writing out the same stuff, so I'll direct you to that :-)

Kwyjibo
August 24th, 2005, 1:29 AM
Well, in order to guarantee a win, you need to have enough tickets to cover every set of 3. I'm using the 49 ball lotto. In order to get exactly 3 matches you need 3 balls to be among your 6 you chose and 3 from the 43 you didn't. The number of ways this can happen is C(6,3) times C(43,3). In other words 6 choose 3 times 43 choose 3. This gives 246,820 winning tickets. Since eac

lottomaniac649
July 6th, 2009, 9:16 AM
Hi;

You can check the odds in winning a 3 match or a jackpot at smart lotto. The minimum betlines to match a 3 numbers would stand at 132. Pl. check and get satisfy yourself.
Thanks & Regards.!