Somerset United Kingdom Member #9710 December 17, 2004 184 Posts Offline

Posted: January 20, 2011, 9:51 am - IP Logged

Hi, I am a software developer , many of you have proberbly used or herd of my software at some point, I am currently writing a true lottery odds calculator as an addition to the software..

I need some help, I spent over 7 hours yesterday on this and just can't seem to work out whats going wrong.

When I click on 6 / 49 I get the following output from the software

Match 6 of 6 from 49 : = 13,983,816.0000000000 to 1 Match 5 of 6 from 49 : = 54,200.8372093024 to 1 Match 4 of 6 from 49 : = 1,032.3968992248 to 1 Match 3 of 6 from 49 : = 56.6559273965 to 1 Match 2 of 6 from 49 : = 7.5541236529 to 1 Match 1 of 6 from 49 : = 2.4211934785 to 1 Match 0 of 6 from 49 : = 2.2937622428 to 1

The above answers are obtained from the follow equation

Result = 1 / ( (F3 * F2) / F1 ) = 56.6559273965 to 1

My question is How do I arrange the equation to take into account the following.

Draw with 1 bonus number from main pool Draw with 2 bonus numbers from main pool

Draw with 1 bonus number from unique pool Draw with 2 bonus numbers from unique pool

Any help would be much appriciated plus I will give a free key to my software http://www.lsa-lottery-software.com to the person that solves this for me using the above format.

Regards Jamie

It has been said every software has a bug in it, it has also been said that every program can be reduced by one line of code.

There for any program can be reduced to 1 line that dont work.

United States Member #59354 March 13, 2008 3972 Posts Offline

Posted: January 20, 2011, 10:22 am - IP Logged

Quote: Originally posted by Developer on January 20, 2011

Hi, I am a software developer , many of you have proberbly used or herd of my software at some point, I am currently writing a true lottery odds calculator as an addition to the software..

I need some help, I spent over 7 hours yesterday on this and just can't seem to work out whats going wrong.

When I click on 6 / 49 I get the following output from the software

Match 6 of 6 from 49 : = 13,983,816.0000000000 to 1 Match 5 of 6 from 49 : = 54,200.8372093024 to 1 Match 4 of 6 from 49 : = 1,032.3968992248 to 1 Match 3 of 6 from 49 : = 56.6559273965 to 1 Match 2 of 6 from 49 : = 7.5541236529 to 1 Match 1 of 6 from 49 : = 2.4211934785 to 1 Match 0 of 6 from 49 : = 2.2937622428 to 1

The above answers are obtained from the follow equation

Result = 1 / ( (F3 * F2) / F1 ) = 56.6559273965 to 1

My question is How do I arrange the equation to take into account the following.

Draw with 1 bonus number from main pool Draw with 2 bonus numbers from main pool

Draw with 1 bonus number from unique pool Draw with 2 bonus numbers from unique pool

Any help would be much appriciated plus I will give a free key to my software http://www.lsa-lottery-software.com to the person that solves this for me using the above format.

mid-Ohio United States Member #9 March 24, 2001 19828 Posts Online

Posted: January 20, 2011, 3:21 pm - IP Logged

Quote: Originally posted by Developer on January 20, 2011

Hi, I am a software developer , many of you have proberbly used or herd of my software at some point, I am currently writing a true lottery odds calculator as an addition to the software..

I need some help, I spent over 7 hours yesterday on this and just can't seem to work out whats going wrong.

When I click on 6 / 49 I get the following output from the software

Match 6 of 6 from 49 : = 13,983,816.0000000000 to 1 Match 5 of 6 from 49 : = 54,200.8372093024 to 1 Match 4 of 6 from 49 : = 1,032.3968992248 to 1 Match 3 of 6 from 49 : = 56.6559273965 to 1 Match 2 of 6 from 49 : = 7.5541236529 to 1 Match 1 of 6 from 49 : = 2.4211934785 to 1 Match 0 of 6 from 49 : = 2.2937622428 to 1

The above answers are obtained from the follow equation

Result = 1 / ( (F3 * F2) / F1 ) = 56.6559273965 to 1

My question is How do I arrange the equation to take into account the following.

Draw with 1 bonus number from main pool Draw with 2 bonus numbers from main pool

Draw with 1 bonus number from unique pool Draw with 2 bonus numbers from unique pool

Any help would be much appriciated plus I will give a free key to my software http://www.lsa-lottery-software.com to the person that solves this for me using the above format.

Regards Jamie

Ohio once had a game that picked an extra ball for its 6/49 game from its main pool.

combination size 6 basic pool size 49 (B) bonus = 7th number drawn smallest match no (B) number 3 largest match with bonus 5 smallest match with bonus 3 tickets or chances per draw 1 possible combos of 6/49 numbers = 13983816 MATCHES ODDS WINNING COMBOS 6/6+0 1 : 13983816 1 5/6+B 1 : 2330636 6 5/6+0 1 : 55491 252 4/6+B 1 : 22197 630 4/6+0 1 : 1083 12915 3/6+B 1 : 812 17220 3/6+0 1 : 61 229600 __________________________________________________ overall odds are 1 : 53.6 260624 winning combos = 1.86 % of possible combos

Now with its Classic Lotto, it just has a plain 6/49 with no bonus numbers.

combination size 6 basic pool size 49 (B) bonus numbers none smallest match 3 tickets or chances per draw 1 possible combos of 6/49 numbers = 13983816 MATCHES ODDS WINNING COMBOS 6/6 1 : 13983816 1 5/6 1 : 54201 258 4/6 1 : 1032 13545 3/6 1 : 57 246820 _________________________________________________ overall odds are 1 : 53.6 260624 winning combos = 1.86 % of possible combos

If in the future they decide to add a bonus pool of 29 numbers then it would look like this.

combination size 6 basic pool size 49 (B) Bonus pool size 29 smallest match no (B) number 3 largest match with bonus 6 smallest match with bonus 0 tickets or chances per draw 1 possible combos of 6/49 + 1/29 numbers = 405530664 MATCHES ODDS WINNING COMBOS 6/6+B 1 : 405530664 1 6/6+0 1 : 14483238 28 5/6+B 1 : 1571824 258 5/6+0 1 : 56137 7224 4/6+B 1 : 29940 13545 4/6+0 1 : 1069 379260 3/6+B 1 : 1643 246820 3/6+0 1 : 59 6910960 2/6+B 1 : 219 1851150 1/6+B 1 : 70 5775588 0/6+B 1 : 67 6096454 ____________________________________________________ overall odds are 1 : 19 21281288 winning combos = 5.24 % of possible combos

* you don't need to buy more tickets, just buy a winning ticket *

United States Member #59354 March 13, 2008 3972 Posts Offline

Posted: January 20, 2011, 4:19 pm - IP Logged

Quote: Originally posted by Developer on January 20, 2011

Hi, I am a software developer , many of you have proberbly used or herd of my software at some point, I am currently writing a true lottery odds calculator as an addition to the software..

I need some help, I spent over 7 hours yesterday on this and just can't seem to work out whats going wrong.

When I click on 6 / 49 I get the following output from the software

Match 6 of 6 from 49 : = 13,983,816.0000000000 to 1 Match 5 of 6 from 49 : = 54,200.8372093024 to 1 Match 4 of 6 from 49 : = 1,032.3968992248 to 1 Match 3 of 6 from 49 : = 56.6559273965 to 1 Match 2 of 6 from 49 : = 7.5541236529 to 1 Match 1 of 6 from 49 : = 2.4211934785 to 1 Match 0 of 6 from 49 : = 2.2937622428 to 1

The above answers are obtained from the follow equation

Result = 1 / ( (F3 * F2) / F1 ) = 56.6559273965 to 1

My question is How do I arrange the equation to take into account the following.

Draw with 1 bonus number from main pool Draw with 2 bonus numbers from main pool

Draw with 1 bonus number from unique pool Draw with 2 bonus numbers from unique pool

Any help would be much appriciated plus I will give a free key to my software http://www.lsa-lottery-software.com to the person that solves this for me using the above format.

Regards Jamie

Developer

If I were doing this I would use different code for each. The first for non-bonus ball games and

then one for each of the other four. Just prompt the user for bonus ball infomation and then route

it to the correct code. Using one formula to cover all the different options would be a hair puller.

Below is the code I used for a combo, odds and probability calculator written in qb64 for non bonus

games. As you can see I was not concerned with the lines of code . The Download link for this calculator

is below if you want to check it out. I plan to include bonus options at a later date when I get the time

DIM COMBO AS LONG DIM cal1 AS LONG DIM cal2 AS LONG DIM cal3 AS DOUBLE

SCREEN _NEWIMAGE(480,360, 256): _TITLE "RL'S Lottery Calculator Ver. 1.0" color 29,29 1 cls color 0, 29 locate 1, 2: PRINT "lottery Odds Calculator" locate 3, 2: INPUT "Enter numbers per set-> ", b if b > 6 then locate 4, 2: print "overrange 6 Numbers Max" if b > 6 then _delay 1 if b > 6 then goto 1 if b < 2 then goto 1 locate 4, 2: INPUT "Enter total numbers --> ", a if a > 99 then locate 4, 2: print "Overrange 99 Numbers Max" if a > 99 then _delay 1 if a > 99 then goto 1 if a <= b then goto 1 c = a - b

END1: Locate 22, 2: print "press n for next. e to exit"; do _LIMIT 200 k1$ = right$(inkey$, 1) if k1$ ="n" or k1$ = "N" then goto 1 if k1$ ="e" or k1$ = "E" then exit do loop system

'function code by Galleon FUNCTION Factorial# (n AS DOUBLE) CONST maxNToCache = 99 STATIC resultCache() AS DOUBLE STATIC firstCall AS INTEGER IF firstCall = 0 THEN firstCall = -1 REDIM resultCache(maxNToCache) AS DOUBLE resultCache(0) = 1 resultCache(1) = 1 resultCache(2) = 2 END IF IF n <= maxNToCache THEN IF resultCache(n) <> 0 THEN Factorial = resultCache(n) EXIT FUNCTION END IF END IF resultCache(n) = INT(n) * Factorial(INT(n) - 1) Factorial = resultCache(n) END FUNCTION