Hey there! Sign in to join this conversationNew here? Join for free

Interesting Mathematical Problem - Bespoke Lottery System Watch

    • Thread Starter
    Offline

    16
    ReputationRep:
    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:

    W=W_0e^{M-N}

    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?
    • Thread Starter
    Offline

    16
    ReputationRep:
    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. W = W_0e^{M-N} 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:

    100 = W_o\displaystyle\sum_{r=0}^{n-1}e^{-r} 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).

    100 = W_0\big(e^0+e^{-1}+e^{-2}\big) \Rightarrow W_0=66.5

    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: W = W_0e^{1-3} = 9.0\%
    Match 2: W = W_0e^{2-3} = 24.5\%
    Match 3/3: W = W_0e^{3-3} = W_0 = 66.5\%

    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 .
    • Thread Starter
    Offline

    16
    ReputationRep:
    Hmm, I got negative rep for asking for help ><
    Offline

    0
    ReputationRep:
    (Original post by ViralRiver)

    If you match 0 numbers, you automatically win 0%.
    Match 1: W = W_0e^{1-3} = 9.0\%
    Match 2: W = W_0e^{2-3} = 24.5\%
    Match 3/3: W = W_0e^{3-3} = W_0 = 66.5\%

    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 :rolleyes:). 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.
    • Thread Starter
    Offline

    16
    ReputationRep:
    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.
    Offline

    16
    ReputationRep:
    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:

    \displaystyle \sum_{r=0}^{n-1} e^{-r} = \frac{1-e^{-n}}{1-e^{-1}}

    It's a geometric progression.
    • Thread Starter
    Offline

    16
    ReputationRep:
    (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:

    \displaystyle \sum_{r=0}^{n-1} e^{-r} = \frac{1-e^{-n}}{1-e^{-1}}

    It's a geometric progression.
    Thanks, that helped a lot .
 
 
 
  • 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
    What newspaper do you read/prefer?
    Useful resources

    Make your revision easier

    Maths

    Maths Forum posting guidelines

    Not sure where to post? Read the updated guidelines here

    Equations

    How to use LaTex

    Writing equations the easy way

    Student revising

    Study habits of A* students

    Top tips from students who have already aced their exams

    Study Planner

    Create your own Study Planner

    Never miss a deadline again

    Polling station sign

    Thinking about a maths degree?

    Chat with other maths applicants

    Can you help? Study help unanswered threads

    Groups associated with this forum:

    View associated groups
  • 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

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