I am currently programming a betting system.
I am a little confused as to the logic for working out the payouts (math is not my strong point)
I will explain this the best i can.
Scenario:
Max Bet = 500 Racers: John, Mark, Lewis, Kate
- Matt Bets 10 on Mark
- Sky Bets 500 on Mark
- Kate Bets 40 on Mark
- Smackie Bets 500 on Lewis
- John Bets 500 on John
Winner = Mark
What i know: ( {} denote variables )
{pot} = 10+500+40+500+500 = 1550
So what i need to know, is how much of the pot Matt, Sky and Kate each win?
The total amount bet on the winner is $550$.
Matt should get $(10/550)\times1550$; Sky, $(500/550)\times1550$; Kate, $(40/550)\times1550$.