# cash pot lottery

Page 1 of 1

## 3 Replies - 9642 Views - Last Post: 09 November 2007 - 01:30 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=37121&amp;s=5c19b12c32c9f5234352a6e064951a76&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 batlass

Reputation: 0
• Posts: 2
• Joined: 09-November 07

# cash pot lottery

Posted 09 November 2007 - 08:32 AM

ok here is what i am supposed to do for my assignment. cash pot is an actual lottery game played in jamaica. which plays one random number out of a possible 36. the payout for getting the correct number is 26 to 1. so i should build a program that store all previous drawings (three times a day 6 days a week) and guess 15 numbers with the strongest probability of winning. keep an account of correct guess and in correct guess and show a percentage of each. and there goes

Is This A Good Question/Topic? 0

## Replies To: cash pot lottery

### #2 no2pencil

• Professor Snuggly Pants

Reputation: 6630
• Posts: 30,893
• Joined: 10-May 07

## Re: cash pot lottery

Posted 09 November 2007 - 08:35 AM

batlass, on 9 Nov, 2007 - 08:32 AM, said:

ok here is what i am supposed to do for my assignment. cash pot is an actual lottery game played in jamaica. which plays one random number out of a possible 36. the payout for getting the correct number is 26 to 1. so i should build a program that store all previous drawings (three times a day 6 days a week) and guess 15 numbers with the strongest probability of winning. keep an account of correct guess and in correct guess and show a percentage of each. and there goes

That sounds like a great assignment. Are you receiving any errors, or do you have a specific question? Or do you just want to keep us up to date with your day to day responsibilities?

Best of luck with your assignment!

### #3 batlass

Reputation: 0
• Posts: 2
• Joined: 09-November 07

## Re: cash pot lottery

Posted 09 November 2007 - 08:59 AM

well i have quite started right now i'm just mentally rehearsing how i am gonna construct it so here are a few of my ideas that i have for it so feel free to add your input

i'm thinking first a small db just to store about 100 previous drawings (can't input every drawing from the past i would never finish) and in this data base i would like have a counter for how many times each number has ever been played sorta to help in the guessing part. then some where in it i would have the average number of draws it would take before a number was repeated still to help with the guessing. so in theory the last number that played would have the least probability of being played so what i want to do is have the program run though the last 36 drawings and then select the numbers that were never played and that gives you the first numbers of the 15 and if these numbers are less than 15 (which it most likely is) then find the next need numbers to make up to 15 numbers. so i want to use to the average number of draws it takes a number to repeat as a key ingredient in determine the numbers that are to be guessed numbers and like number just drawn to have the least probabilty and the OLDER the number the higher the probabilty .

### #4 jjhaag

• me editor am smartastic

Reputation: 48
• Posts: 1,789
• Joined: 18-September 07

## Re: cash pot lottery

Posted 09 November 2007 - 01:30 PM

Well, the plan for implementing a db or file for storing the numbers sounds solid, and that's probably how I'd do it.

However, I think that you (or your teacher) may be a little shaky on the probability stuff involved here. If the numbers are drawn at random, there is no way to predict what the next number is going to be. No matter what was drawn previously, each number has a 1/36 probability of being chosen in the next round - that's what makes the draw random. Just because a number hasn't come up for a while does not make it any more likely that it will come up next; and just because a number was just drawn last time doesn't make it any less likely.

So really, choosing the 15 numbers most likely to be drawn is impossible, unless of course the drawing is rigged somehow.

And unless there's something about how the draw takes place that you're not telling us.

-jjh

Page 1 of 1

 .related ul { list-style-type: circle; font-size: 12px; font-weight: bold; } .related li { margin-bottom: 5px; background-position: left 7px !important; margin-left: -35px; } .related h2 { font-size: 18px; font-weight: bold; } .related a { color: blue; }