Can you win super lotto by quick pick?

rc5

Platinum Member
Oct 13, 1999
2,464
1
0
By my secondary school math, the odd to match all 6 numbers out of 49 numbers is:

49!
1 : ---------------------
(49-6)! 6!

or

1 : 13983816, about 1: 14 million

However, when I write a program to simulate that, it takes more than 280 million tickets to match one, do I just have a bad random number generator?


#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include &quot;stdafx.h&quot;

int main(int argc, char* argv[])
{
long count=0, millcount=0;
int lottnum, lottwinnum[6], match=0;

for(int i=0;i<6;i++){
lottwinnum=int(double(rand())/RAND_MAX*49)+1;
printf(&quot;%d &quot;, lottwinnum);
}
printf(&quot;\n&quot;);

while(match!=6){
for (int j=0;j<6;j++){
lottnum=int(double(rand())/RAND_MAX*49)+1;
if (lottnum==lottwinnum[j])
match++;}

count++;
if (count>1000000){
count=0;
millcount++; }}

printf(&quot;The lotto numbers are matched after %ld million %ld tickets!\n&quot;, millcount, count);

return 0;
}


Run:

The lotto numbers are matched after 288 million 571671 tickets!
 

snakesnfrogs

Banned
Mar 1, 2001
3,411
0
0


<< Can you win super lotto by quick pick? >>




I recall reading somewhere that most winning tickets are of the quick pick variety
 

rc5

Platinum Member
Oct 13, 1999
2,464
1
0
snakesnfrogs, that's because most people purchasing lot's of tickets have to use quick pick. I can't imagine filling 1000 tickets manually. My point is if quick pick has a lower odd to win due to some &quot;nature&quot; of the random generator.
 
Oct 9, 1999
15,216
3
81
humm.. it didnt compile right.. something up with vc++ on my side.

anywyay I am too lazy to debug.

Cool though.. later I will debug the system.
 

d0ofy

Golden Member
Oct 11, 1999
1,404
0
0
It doesn't compile because he used [.i] in the for loop for the array. The forums made read it as italics.
You draw 280M tickets, but a big chunk of that are repeats. If you disallow repeated tickets, you'd have a much smaller number.
 

rc5

Platinum Member
Oct 13, 1999
2,464
1
0
Ouch, you have to turn off #include &quot;stdafx.h&quot;.

When you are doing quick pick, there's no way for you to delete &quot;repeated&quot; tickets. :)
Does anyone know if the computer in lottery center saves all quick pick numbers and doesn't issue them again?

 

kranky

Elite Member
Oct 9, 1999
21,019
156
106
I doubt that the quick pick algorithm keeps track of already-issued combinations. Your odds of winning should be identical regardless of whether you pick or let the computer do it.

However, there is a theory that claims, while your odds of winning can't be increased, you can improve the odds of not sharing with another player. Most people who pick their own numbers choose numbers which are meaningful to them, typically birthdays. That means numbers 31 and lower. If you purposely choose numbers higher than 31, there are fewer other players with those numbers, and if you win you increase your chances of having the entire jackpot to yourself.
 

Vincent

Platinum Member
Oct 9, 1999
2,030
2
81
kranky has the right idea. People also tend to pick numbers that are multiples of 5. If you pick your own you can avoid those numbers and increase your chances of not having to share the jackpot.