Find lottery 5_50 3rd price combinations from 12 numbers

Kishan

Well-known Member
Joined
Mar 15, 2011
Messages
1,648
Office Version
  1. 2010
Platform
  1. Windows
Using Excel 2000

Hi,

Lottery EuroMillions 5_50 for example playing 12 numbers from 1 to 12 there are =COMBIN(12,5)=792 combination (if draw result of 5 numbers is outcome from 1 to 12 numbers there is one ticket with 1st price)

1st price covered by 5 numbers (forget about 2 stars)
2nd price covered by 4 numbers (forget about 2 stars)

I am curious to know how many numbers of combinations I have to play out of 792 which can cover 2nd price (I mean as 792 cover 5 numbers, there must be fewer combinations which must be covered 4 numbers may be I am wrong)

Is it possible VBA SOLUTION?

Thank you in advance

Regards,
Kishan
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
I am curious to know how many numbers of combinations I have to play out of 792 which can cover 2nd price (I mean as 792 cover 5 numbers, there must be fewer combinations which must be covered 4 numbers may be I am wrong)
I am not clear what your question is?

Is it possible VBA SOLUTION?

Or what you want VBA to do?

Here are the basic probabilities:

AB
1N50
2k5
3S5
4
5Numbers
6CorrectProbability
750.00%
840.01%
930.47%
1026.70%
11135.16%
12057.66%
13100.00%
Sheet1
Cell Formulas
RangeFormula
B7:B12B7=IFERROR(COMBIN(S,A7)*COMBIN(N-S,k-A7),0)/COMBIN(N,k)
B13B13=SUM(B7:B12)
Named Ranges
NameRefers ToCells
k=Sheet1!$B$2B7:B12
N=Sheet1!$B$1B7:B12
S=Sheet1!$B$3B7:B12

At the other end of the scale, the only way to guarantee first prize is to use all the numbers:

N50
k5
S50
Numbers
CorrectProbability
5100.00%
40.00%
30.00%
20.00%
10.00%
00.00%
100.00%

Playing all combinations of 12 chosen numbers:

N50
k5
S12
Numbers
CorrectProbability
50.04%
40.89%
37.30%
226.28%
141.81%
023.69%
100.00%


I am not sure what you mean by "cover" 2nd prize? It's just a question of increasing the probability of getting a prize by playing more numbers.

Also, be careful how you interpret these numbers. The table shows that with all combinations of any 12 numbers, you have a 0.89% chance of a 2nd prize. This actually means a 0.89% chance of one or more 2nd prizes, but not a first prize.

The 0.04% chance of a first prize actually means a 0.04% chance of a first prize plus 35 2nd prizes.
 
Upvote 0
I am not clear what your question is?
StephenCrump, Thank you for the answer

As you explain (Playing all combinations of 12 chosen numbers) N=50, k=5 and S=12 this mean will be generate total =COMBIN(12,5)=792 combinations.

Out of 792... we have a 0.89% chance of a 2nd prize. This actually means a 0.89% chance of one or more 2nd prizes, but not a first prize....I am agreeing with your explanation.

I am not clear what your question is?

My question if we play all combination of 12 chosen numbers =792 and if the outcome result of 5 numbers is drawn within our 12 chosen numbers...we have for sure 1st price is it correct?

But I want to play out of 792 only those combinations that give me 2nd or 3rd price are it is possible to find such less combination (if draw outcome is from any 792 combinations which are chosen from 12 selected numbers)

I have created a simple example may that help to my viewpoint.

For example we pick 7 numbers from 1 to 7, that generate =COMBIN(7,5)=21 combinations.
As shown in the range C5:G25...Now play just 3 combinations are in range L5:P7...you will see if any result outcome out of 21 there are 2nd price for sure. (And the 1st price only within 3 had chosen played combinations).

=COMBIN(7,5)=21
1​
2​
3​
4​
5​
6​
7​
Combin1n2n3n4n5MatchCombin1n2n3n4n5
1123454112347
2123464212356
3123475324567
4123565
5123574
6123674
7124564
8124574
9124674
10125674
11134564
12134574
13134674
14135674
15145674
16234564
17234574
18234674
19235674
20245675
21345674

Is it possible VBA that can choose? If we play 12 numbers =COMBIN(12,5)=792 combinations. And bring out only those cover 2nd price as shown in example wit 7 numbers?


My Regards,
Kishan
 
Upvote 0
You can use formulae to get these results:

ABCDEFGHIJKLMNO
1Combin1n2n3n4n5MatchCombin1n2n3n4n5
21123454112347
32123464212356
43123475324567
54123565
65123574
76123674
87124564
98124574
109124674
1110125674
1211134564
1312134574
1413134674
1514135674
1615145674
1716234564
1817234574
1918234674
2019235674
2120245675
2221345674
Sheet1
Cell Formulas
RangeFormula
H2:H22H2=MAX(MMULT(COUNTIF(B2:F2,K$2:O$4),{1;1;1;1;1}))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 1
Solution
The 0.04% chance of a first prize actually means a 0.04% chance of a first prize plus 35 2nd prizes.
Sorry, this was an assumption, based on how I think the Australian Lotto works - that a ticket winning first prize will necessarily also win multiple second prizes.

I don't know that this is correct.
 
Upvote 0
Sorry, this was an assumption, based on how I think the Australian Lotto works - that a ticket winning first prize will necessarily also win multiple second prizes.

I don't know that this is correct.
StephenCrump, you are correct as you described (that a ticket winning first prize will necessarily also win multiple second prizes.) we are close please see the example below..matches in column J with each played combina.tion.

L5:P5 played 1st combination has 1-match with 1st price and 10-matches with 2nd price.
L6:P6 played 2nd combination has 1-match with 1st price and 6-matches with 2nd price.
L7:P7 played 3rd combination has 1-match with 1st price and 2-matches with 2nd price.

ABCDEFGHIJKLMNOPQ
1=COMBIN(7,5)=21
2
1​
2​
3​
4​
5​
6​
7​
3
4Combin1n2n3n4n5MatchWith Played 3 CombiCombin1n2n3n4n5
511234541112347
621234641212356
731234751324567
841235652
951235741
1061236741
1171245642
1281245741
1391246741
14101256742
15111345642
16121345741
17131346741
18141356742
19151456743
20162345642
21172345741
22182346741
23192356742
24202456753
25213456743
26
27

You will see that only playing only 3 combinations has covered 1st and 2nd price (3 combinations has cover 1st price) and (18 combinations has cover 2nd price) total 21 covered by 3 combinations.

This I have checked one by one manually and find 3 that cover 2nd price for sure within 21 these are just 7 numbers... but 12 numbers has 792 combinations. Is it possible VBA solution that could find few within 792 only that cover 1st and 2nd price?

My Regards,
Kishan
 
Last edited:
Upvote 0
You can use formulae to get these results:

ABCDEFGHIJKLMNO
1Combin1n2n3n4n5MatchCombin1n2n3n4n5
21123454112347
32123464212356
43123475324567
54123565
65123574
76123674
87124564
98124574
109124674
1110125674
1211134564
1312134574
1413134674
1514135674
1615145674
1716234564
1817234574
1918234674
2019235674
2120245675
2221345674
Sheet1
Cell Formulas
RangeFormula
H2:H22H2=MAX(MMULT(COUNTIF(B2:F2,K$2:O$4),{1;1;1;1;1}))
Press CTRL+SHIFT+ENTER to enter array formulas.
Hello StephenCrump, Hope all is well

A part of post#6, please can you help me...If I change data in post#4 as shown below can you provide the (Multi Match) formula which give the result as shown in column H (Match).

Combin1n2n3n4n5MatchCombin1n2n3n4n5
1X2X2151X2X21
2122123211XXX
3221X12311112
4X1X214
5212X22
6122112
7112223
8111114
911XXX5
10X222X3
11121113
1211X2X4
13X2X2X4
14XX2222
15XXXX13
161121X3
172121X2
18111125
19111224
20X121X2
21212123

My Regards,
Kishan
 
Upvote 0
You can use formulae to get these results:

ABCDEFGHIJKLMNO
1Combin1n2n3n4n5MatchCombin1n2n3n4n5
21123454112347
32123464212356
43123475324567
54123565
65123574
76123674
87124564
98124574
109124674
1110125674
1211134564
1312134574
1413134674
1514135674
1615145674
1716234564
1817234574
1918234674
2019235674
2120245675
2221345674
Sheet1
Cell Formulas
RangeFormula
H2:H22H2=MAX(MMULT(COUNTIF(B2:F2,K$2:O$4),{1;1;1;1;1}))
Press CTRL+SHIFT+ENTER to enter array formulas.
Can this
You can use formulae to get these results:

ABCDEFGHIJKLMNO
1Combin1n2n3n4n5MatchCombin1n2n3n4n5
21123454112347
32123464212356
43123475324567
54123565
65123574
76123674
87124564
98124574
109124674
1110125674
1211134564
1312134574
1413134674
1514135674
1615145674
1716234564
1817234574
1918234674
2019235674
2120245675
2221345674
Sheet1
Cell Formulas
RangeFormula
H2:H22H2=MAX(MMULT(COUNTIF(B2:F2,K$2:O$4),{1;1;1;1;1}))
Press CTRL+SHIFT+ENTER to enter array formulas.
Can formula H2:H22 could be converted in VBA? because I want to check 10000+ result

Regards,
Kishan
 
Upvote 0

Forum statistics

Threads
1,215,133
Messages
6,123,234
Members
449,092
Latest member
SCleaveland

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top