NationalLottery, opinions on my program

This is a discussion on NationalLottery, opinions on my program within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Hi, Any statistics heads out there? I am interested to know anybodys opinion on the following.... I have written a ...

  1. #1
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,425

    NationalLottery, opinions on my program

    Hi,

    Any statistics heads out there?

    I am interested to know anybodys opinion on the following....

    I have written a little program to test various betting systems for the 1to49 english national lottery game.

    I would like to know which of these types of bet you think would return a win of three numbers the fastest (i.e least amount of bets )

    this is the first bet:
    (ten goes)

    123456
    234567
    345678
    456789
    56789 10
    678910 11
    7 8 9 10 11 12
    8 9 10 11 12 13
    9 10 11 12 13 14
    10 11 12 13 14 15

    123456 234567
    etc

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,541
    Only if you believe that the numbers appear in anything other than a random order.
    http://mathworld.wolfram.com/topics/...tatistics.html
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,467
    The only way to affect odds is to play multiples.

    A sequence of bets, no matter the numbers involved always has the same chance as any other, if the number of bets in each sequence is equal. And this is basically so because the act of drawing all numbers is considered one single event against which your bets are compared.

    Or maybe I'm missing your question. But unless you play multiples, there is no way you can influence the odds.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,541
    > But unless you play multiples, there is no way you can influence the odds.
    Do you think those balls spinning around in the machine care about how much money you spent?

    You might increase your chance of winning, but you're also increasing the rate at which you spend money.

    Sure, just buy 13983816 lottery tickets each week and write out every possible combination of numbers and you're guaranteed to win.

    No biggie - just 23 tickets per second non-stop.
    Also, at 1g per ticket, those 14 tons of paper in your wallet will be easily transported to the nearest sales station.

    > I would like to know which of these types of bet you think would return a win of three numbers the fastest
    Since matching 3 only wins you a tenner, and it costs a quid to enter, I'd say the quickest way to £10 is to not play for 10 weeks.
    Or don't buy 10 tickets in one week, and there you have it - £10 in your pocket - magic!
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  5. #5
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,467
    Hmm.. not sure if i uderstand what you mean Salem.

    Only thing i'm saying is that his odds increase if he plays 7 numbers instead of 6 numbers. that's all. I thought the issue here was simply about odds. Not money spent.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  6. #6
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    ohh, I had to write a loto649 sim for my second year stats class. We simulated a person playing twice a week for 10,000 years. Nobody ever won the jackpot and everyone's simulations always ended up way in the negative, no matter how many times you run them.

  7. #7
    Moderately Rabid Decrypt's Avatar
    Join Date
    Feb 2005
    Location
    Milwaukee, WI, USA
    Posts
    300
    The lottery is a tax on people that are bad at math.

    That said, the only thing you can do as far as what to play is pick the least popular numbers (not least popular as in least picked by the lotto, but least popular as in least picked by the players.) That way you don't increase your odds of winning, but you do increase your expected value of playing by decreasing the chance you'll spilt the jackpot with someone. It's still not a good idea.

    My high-school algebra/computer science teacher held a lottery during algebra class every semester. Each student picked five numbers, like powerball without the powerball. He had every kid stand up, and sit down when he called a number they didn't have (he had a computer come up with a "random" sequence). Anyone who won the lottery got an A+ for the semester. No one ever made it past 3 numbers in all of his years of teaching.
    There is a difference between tedious and difficult.

  8. #8
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,069
    I knew someone personally that won the lottery.

    It happens. Obviously, the odds are ridiculously bad, that's why they can get away with giving away a cash sum rather than odds to the winner, but regardless, people play for the excitement. Imagine actually winning it. Of all the possible numbers drawn, what if yours was drawn? That to some can be better than the prize itself. (ok, that last line is bull........ but whatever)
    Sent from my iPad®

  9. #9
    Moderately Rabid Decrypt's Avatar
    Join Date
    Feb 2005
    Location
    Milwaukee, WI, USA
    Posts
    300
    I can agree with that. It's a game. My wife likes buying the scratch off tickets now and then. Sort of a tradition if we go on a road trip somewhere. She just likes playing. What bothers me is when people say "I gotta win sometime..."
    There is a difference between tedious and difficult.

  10. #10
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,467
    But it's less upsetting than when we hear "I really really need to win this time"
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  11. #11
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,069
    Quote Originally Posted by Decrypt
    What bothers me is when people say "I gotta win sometime..."
    Nothing wrong with an optimistic attitude. So long as you don't plan your life around it and start spending your winnings before you get it, you should feel free to be optimistic about winning the lottery.
    Sent from my iPad®

  12. #12
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,703
    Every time I've ever played the lottery I always won $2.00 - it's pretty awesome to at least have my money back. I guess that's lucky.

  13. #13
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    I've been trying to tell my father this for years and years that the lottery is not a game of how many times you lose=how many more times you don't have to lose.

    The lotteries are nearly impossible to predict simply because of the following factors:

    • The collisions of all the balls in the air filled canister are nearly impossible to track
    • Air currents inside of the canister are equally as hard to track, quantify, and perform calculations on how they affect nearby balls.
    • The time at which the top of the canister is opened is extremely important as to which ball will come up. This time is varied so slightly every drawing. This may not seem like a major factor but it is. .01 seconds of delay will produce completely different numbers in each 'slot'.
    • Temperature of the air inside the canister is unknown
    • Force of the air pressure into the canister is also unknown
    • Type of air emitted into the canister is unknown
    • Ball mass, radius, and contents (if not solid) are unknown
    • It is unknown if the balls vary every so slightly in mass - this would not be to favor other balls, but to add another element of randomness to the system
    • Size of the canister's are unknown, unpublished, and kept secret - perhaps may also be altered just a tad per drawing


    See...way to many factors here. Try to program an fluid dynamics simulation of 50 or so balls blowing around a small canister and then attempt to predict which one will come up to the top if you open it. Have fun.

    Since it is impossible to predict many have come up with numerical programs to detect patterns. The only problem with this is that the 'patterns' are simply not there. The lottery system is totally random and not pseudo random, or it would not be called a lottery.
    I, personally, do not feel that any amount of numerical prediction/statistics could ever produce a winning combination.

    My father tracked the lottery for 10 years vigorously writing down all the numbers, patterns, etc, and plugging them into his program. Nothing. You are essentially attempting to track down a combination of numbers that follows a set algorithm - when there is no set algorithm.
    It is my feeling that the algorithm for the winning combo changes per numerical slot - in other words in every drawing each container follows a completely different algorithm - if one at all.
    I believe the entire system is based on the theory of chaos and thus is impossible to predict correctly.
    Last edited by VirtualAce; 08-13-2006 at 01:46 PM.

  14. #14
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,425
    Dude, i am not chasing the jacpot i realise that is simply a matter of lady luck , i did not get chance to finish my origian l thread either as i had to shoot off out, i reposted it cin complete form on this forum if anyone fancies a look...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Issue with program that's calling a function and has a loop
    By tigerfansince84 in forum C++ Programming
    Replies: 9
    Last Post: 11-12-2008, 12:38 PM
  2. Need help with a program, theres something in it for you
    By engstudent363 in forum C Programming
    Replies: 1
    Last Post: 02-29-2008, 12:41 PM
  3. Replies: 4
    Last Post: 02-21-2008, 09:39 AM
  4. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21