You are Here: Home >< Maths

# Interesting Mathematical Problem - Bespoke Lottery System Watch

1. So, I'm making a sort of lottery system for my own forum, and I'm just planning stuff out at the moment, like the prizes etc. I've chosen two different options for prizes for different lottery rounds. The first one, which is the one I need help with, is.. weird.

Here's how it goes:

There are 5 variables as far as I know:
-Total pot (the money available to win), P
-Numbers (the amount of numbers that has to be chosen on the lottery ticket, for example in the national lottery you choose 6), N
-Max winnings (percentage, for example if it's 50%, then the person who gets all numbers matched wins 50% of the pot, W0
-Numbers matched (just how many you match, M
-Winnings (the percentage a certain person wins), W

Okay, so I tried working a way out, where I could calculate what percentage of the pot is given out, depending on how many numbers you match. Lets use the following information as an example:

P = £1,000
N = 4
W0 = 50%

Now, I didn't want it to be a stupid scale, like 25% for 1 number, 50% for two, 75% for three etc, so I decided to do it with exponential decay.

I tried the following equation out:

Okay, that seemed to work alright. So I drew a table, with a column for both numbers matched (M), and winnings (W, percentage).

It went as follows:

M - W
0 - 0.915
1 - 2.48
2 - 6.76
3 - 18.39
4 - 50
I was quite happy, you get a small sum of money if you match 1 number, and for every extra matched number, you get even more money (on an exponential scale). And, if you get all the numbers you 50% of the winnings. However, I then realised that if you add up those values of W, it doesn't total 100% (it's less), meaning some of the pot will be left at the end, which I don't want. Even worse, if I set W0 to 90(%), then draw the same table, the sum of the winnings, W is greater than 100(%)! Obviously that's not what I want. I want it to TOTAL to 100%.

Does anyone have any ideas on how to do this?

EDIT: Sorry for the tl;dr, but this is very important, and well I'm sure others will find this interesting :P . Also, in terms of the winnings, if someone matches 0 numbers, I would like them to win nothing at all - if that is possible with exponential decay?
2. Okay.. I worked it out .

I had to work out the value Wo as a constant, and from there was able to do the rest.

Basically, if W is the winnings, i.e. is the winnings for one specific matching, I know that all of the winnings for each matching added together = 100, as W is a percentage of the pot.

In short; add W for 0 matches, 1 match, 2 match etc and that gives you the pot.

Or in mathematical terms:

where n is the total amount of numbers chosen (in national lottery, it's 6). Can someone verify this formula for me?

Now, let's try an example, using n = 3 (i.e you can choose 3 numbers in this lottery).

So, I now have the value for the constant, Wo, and can work out the winnings (percentage) for each possible outcome.

If you match 0 numbers, you automatically win 0%.
Match 1:
Match 2:
Match 3/3:

Now, add all of those percentage winnings up, and you get the total of 100% (without the rounding errors). Thought this might be interesting to some of you so.. yeah .
3. Hmm, I got negative rep for asking for help ><
4. (Original post by ViralRiver)

If you match 0 numbers, you automatically win 0%.
Match 1:
Match 2:
Match 3/3:

Now, add all of those percentage winnings up, and you get the total of 100% (without the rounding errors). Thought this might be interesting to some of you so.. yeah .
I know this was 5 days ago but, do you mean anyone who gets 1 number shares the 9%, anyone who gets 2 shares the 24.5% etc. ? as to be honest you could just choose your own percentages that add too 100% (or less ). Remember many more people will get one number than two or three. You should estimate how many people will enter, then work out the chance of getting 1 number, then maybe set a prize for getting just one like the real lottery.
5. Yes, the prize is shared, so if 2 people gets 1 number, they get 4.5% each. I can't choose percentages myself, as this needs to be able to work out the percentages for any number, n, of numbers to choose from. For example, if I were to replicate the national lottery, n = 6, but I could always make n = 100 if I wanted to.
6. Your formula is right (as far as I can tell from skimming what you've written).

It might be of interest to note that there is a "closed form" for that:

It's a geometric progression.
7. (Original post by SimonM)
Your formula is right (as far as I can tell from skimming what you've written).

It might be of interest to note that there is a "closed form" for that:

It's a geometric progression.
Thanks, that helped a lot .

TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

This forum is supported by:
Updated: December 20, 2010
Today on TSR

Find out how.

### Homophobic parents forcing me far away

Discussions on TSR

• Latest
• ## See more of what you like on The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

• Poll
Useful resources

### Maths Forum posting guidelines

Not sure where to post? Read the updated guidelines here

### How to use LaTex

Writing equations the easy way

### Study habits of A* students

Top tips from students who have already aced their exams

## Groups associated with this forum:

View associated groups
Discussions on TSR

• Latest
• ## See more of what you like on The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

• The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.