Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Random Number Generator, Lottery, and duplicats

  1. Aug 31, 2006 #1
    Random Number Generator, Lottery, and duplicates

    Hi, I'm new here and looking for a bit of help and some overall conversation on a new project I'm working on. It fundamentally surrounds an international online lottery pool where visitors can join, buy a lottery ticket and then use the power of numbers to decrease the odds of a potential win, and then share in the winnings equally.

    We will be purchasing tickets on the order of 50,000 at a time.

    A few questions that I have, some quite simple, so I apologize! Your help and insight is much appreciated.

    I have written all the necessary scripts to generate a set of numbers - 6 number from 1-49. The script doesn't allow the same number to be chosen twice, for obvious reasons. I know need to ensure that any set of 6 numbers is unique, and hasn't been chosen before (sitting in the database). I of course need to compare all the possible variations of this 6 number set to the existing numbers in the db. I can't quite remember how to calculate how many variations a set of numbers can have - so I need to figure this out as well as some logic on how to run through all possibilities and do a compare. Can anyone shed a little light on this one?

    Also, I'm looking for some collaboration on overall lottery probabilities and figures - If you are legitimately interested in this field and would like to help out in any capacity, please get in touch.

    Thanks again! Thomas
    Last edited: Aug 31, 2006
  2. jcsd
  3. Aug 31, 2006 #2


    User Avatar
    Homework Helper

    Well, a quick rule of thumb if you don't want to calculate anything is to consider the jackpot to be between 1/4 and 1/2 of the purse (of course it could be far less). So for instance, if the jackpot is 1 million dollars, consider the purse to be 2-4million per week or whatever. Divide that by the price of the ticket, which is probably $1 or so, and you get 2-4million to 1. In other words, you can perhaps stand to win every 40-80 weeks (buying 50000 per week), so let's round that to once per year.

    In a year you'll spend say 2 million dollars on lottery tickets. Doesn't seem like such a good deal, does it? That's only a 50% return at most. Of course, that 50% is the same as we assumed at the start by assuming that the jackpot is 1/2 of the purse. Your odds don't increase by buying more tickets.

    You'd get far better odds by learning to play blackjack properly, and possibly far better odds yet if you bet in a speculative arena like the stock-market.
    Last edited: Aug 31, 2006
  4. Oct 15, 2006 #3
    Dear ThomasM,

    Are you referring to the 6/49 lottery ?

    If so, can you tell me if, for each draw, the draw sequence could be considered truly random ?

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook