wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> medium >> A personal lotto game
(Message started by: pcbouhid on Jun 16th, 2009, 7:55am)

Title: A personal lotto game
Post by pcbouhid on Jun 16th, 2009, 7:55am
48 members of our social group use the weekly results of our national lotto draw for our competition.

Each person selects a set of 5 numbers from just one of the four grids of the map shown below, such that they are all in a row (e.g. row 15: 92, 13, 36, 24 and 79) or in a column (e.g. column 28: 75, 42, 14, 99 and 60) or diagonally (e.g. diagonal 37: 32, 65, 93, 76 and 10).

http://img231.imageshack.us/img231/3581/bolotoi.th.jpg (http://img231.imageshack.us/i/bolotoi.jpg/)

Our national lotto draws, each week, 5 numbers from the set of 100 numbers (00-99), and we permanently mark these 5 numbers in our map. The winner in our competition will be the person who firstly has his 5 numbers marked.

What is the probability that our competition:
a) ends in the first week?
b) ends in the second week?
c) ends in the third week?

And the most important:
d) What is the expected number of weeks for us to have a winner?

Title: Re: A personal lotto game
Post by towr on Jun 16th, 2009, 8:42am

on 06/16/09 at 07:55:53, pcbouhid wrote:
(Iīm not succeeding in attaching the grid example)
Do you get an error?
You could always put it on imageshack, and just insert it with [img] tags.

Title: Re: A personal lotto game
Post by pcbouhid on Jun 16th, 2009, 8:53am
Hi towr, good to "see" you again.

When submiting the problem, I clicked the attached file, selected the .jpeg image, but itīs not loaded.

Iīve been away for a long time. What is "imageshack"? I know how to insert the tags.

Title: Re: A personal lotto game
Post by towr on Jun 16th, 2009, 9:18am

on 06/16/09 at 08:53:31, pcbouhid wrote:
Hi towr, good to "see" you again.
Yeah, you too, it's been a while, hasn't it.


Quote:
When submiting the problem, I clicked the attached file, selected the .jpeg image, but itīs not loaded.

Iīve been away for a long time.
Did you preview before posting, because that removes the attachment. Aside from that if anything goes wrong, it should give an error as far as I know.


Quote:
What is "imageshack"? I know how to insert the tags.
It's a free image host, http://www.imageshack.us/

Title: Re: A personal lotto game
Post by pcbouhid on Jun 16th, 2009, 9:44am
Ty, towr, I used "imageshack". But it seems not too visible. What do you think?


Edited to say that I realized that clicking in it, it enlarges. Ty... and Iīm waiting some probabilities, that it seems to me, will be evaluated with a computer program.

Title: Re: A personal lotto game
Post by towr on Jun 16th, 2009, 10:28am
Does everyone pick a different set of 5 numbers? i.e. are you basically asking how long before one of the rows/columns/diagonals is filled in?

Title: Re: A personal lotto game
Post by pcbouhid on Jun 16th, 2009, 5:15pm
Yes, towr. We are altogether 48 friends, each one with a set of 5 numbers. The numbers outside the grid identify each one of us. But, as you can see, one number is shared by 2 or 3 (if it is in a diagonal) persons. Clear?

Title: Re: A personal lotto game
Post by towr on Jun 17th, 2009, 1:23am
Experimental results, a simulation of 1,000,000 trials:
[hide]2, 158, 1354, 5186, 13413, 27022, 46190, 68631, 90756, 109891, 120713, 120513, 109923, 91615, 71121, 49880, 32202, 19601, 10866, 5778, 2840, 1343, 602, 230, 104, 42, 14, 7, 3 [/hide]
expected number of weeks until there's a winner: [hide]11.728[/hide]

Title: Re: A personal lotto game
Post by Ronno on Jun 17th, 2009, 3:54am
What is the sequence? If they are the number of weeks then how do they average to [hide]11.728[/hide]?

Title: Re: A personal lotto game
Post by towr on Jun 17th, 2009, 4:15am

on 06/17/09 at 03:54:13, Ronno wrote:
What is the sequence? If they are the number of weeks then how do they average to [hide]11.728[/hide]?

The sequence is the number of trials that end in that week out of the total1,000,000 trials.
The expected number of weeks is the weighted average, i.e. the sum of week-number times proportion of trials ending that week.

Title: Re: A personal lotto game
Post by pcbouhid on Jun 17th, 2009, 6:50am
Towr, the numbers you got [hide]are very much close to the numbers a friend (in another site) got with his program, which are: 0  103  1123  4791  12950  25175  42652  63851  87470  101577  116655  119701 110794  92946  75606  54705  38340  23298  13551  7667  3834  1853  790  335 131  59  14  14  15  trials that took 1 through 29 weeks respectively. There were no cases requiring over 29 weeks.  This made the expected number of weeks  11.95692.[/hide].

[hide]I became surprised with the expected number of weeks to end the competition (12 weeks... 3 months) because I didnīt recall a competition that lasted too long.[/hide] We do this a long time, each one pays something like US$20 and the winner (or winners) receives US$960. Not bad return - if you are the winner, of course -, donīt you think?

Ty for your great help. Cheers.

Title: Re: A personal lotto game
Post by towr on Jun 17th, 2009, 8:00am
Hmmm, after a million trials, I'd think your friend's number and my numbers should be closer. The error should be in the order of 1/100th (=10/http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/surd.gif#trials), not 1/4th
The results seem to be skewed with respect to eachother, mostly; where I have higher results for early weeks, and lower results for later weeks. If I had to guess, I might suspect he didn't pull 5 distinct numbers for each lotto draw, but rather drew them with replacement. And that suspicion is confirmed by introducing that same error in my program, which then gives [hide]11.976[/hide] (for 100k trials).
But I suppose if the accuracy is good enough for your purposes, it doesn't really matter.

Title: Re: A personal lotto game
Post by pcbouhid on Jun 17th, 2009, 11:16am
I accessed the forum to post the same comment, raised by him ("the results should be much closer"). Since we use the official results of a federal loto draw, the solution must consider "replacement" (every week is a "new game" for the people in general). Obviously that for my purpose, the number [hide]12[/hide] found by you two fills my need.

Title: Re: A personal lotto game
Post by SMQ on Jun 17th, 2009, 11:29am
But could they draw, e.g. "13, 28, 56, 77, 13" for a single week's results?  I think that's was towr is saying: that your friend's program appears to be allowing that possibility while towr's program guarantees the five numbers for a single drawing are distinct.

--SMQ

Title: Re: A personal lotto game
Post by towr on Jun 17th, 2009, 1:02pm

on 06/17/09 at 11:29:24, SMQ wrote:
But could they draw, e.g. "13, 28, 56, 77, 13" for a single week's results?  I think that's was towr is saying: that your friend's program appears to be allowing that possibility while towr's program guarantees the five numbers for a single drawing are distinct.
That is indeed precisely what I'm saying.

The numbers in a given week have to be distinct, but those of different weeks may overlap.
So (keeping the order of the balls), there are 100!/95! ways to draw the balls for a given week, and not 1005; a difference of 10% in valid draws.

Title: Re: A personal lotto game
Post by pcbouhid on Jun 17th, 2009, 2:24pm
Sorry, I misunderstood your question, and I was wondering: if there are no replacement how can towr found results for more than 20 weeks?

Ok. As I said, itīs a federal lottery here in Brazil, so the 5 numbers drawn, each week, are all different.

Iīll ask my friend about his drawings, but I think this point is clear to him. Probably I made myself clearer to him than here.

Btw, isnīt 100!/(95!*5!)?

Title: Re: A personal lotto game
Post by towr on Jun 17th, 2009, 2:44pm

on 06/17/09 at 14:24:18, pcbouhid wrote:
Btw, isnīt 100!/(95!*5!)?
That's without order. This makes it easier to compare (since removing order from the 1005 case is a bit more difficult)

Title: Re: A personal lotto game
Post by pcbouhid on Jun 17th, 2009, 3:07pm
Yes, youīre right.

Title: Re: A personal lotto game
Post by towr on Jun 18th, 2009, 4:11am
It might interest you to know that this isn't really a fair game. The people that choose the diagonals have a smaller probability to win.
Well, ok, technically they have the same probability to win, but when they win chances are greater that they have to share that win with someone else. And assuming the prize money is shared amongst the winners, this means they get less on average. And it's quite noticeable, around 6-7%.

[edit]The middle row/column of each square also seems to have an ever so slight smaller expected payoff; but the difference is much less noticeable (about 0.2%).[/edit]

Title: Re: A personal lotto game
Post by pcbouhid on Jul 1st, 2009, 8:54am
Thank you one more time, towr. I had that feeling about diagonals (each number is shared by 3 people, and the others by 2 only) but without a computer itīs hard to find the percentages you found.



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright Đ 2000-2004 Yet another Bulletin Board