Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- This is my solution to a problem involving chances made by JL2579, described here: http://strawpoll.me/3342513
- So, to start, let's find the function which calculates the average gain from a given stake. As part of the problem, the stake has to be constant. We won't use $-signs in our equations as they don't affect the results and make things more complex.
- The average money you gain in this game is equal to the average gain of winning minus the average loss of every gamble, all with a given stake of course. We play until we win or run out of money, so we don't necessarily always win.
- As we already stated, we only consider stakes which can wholly divide $100. This way, we can write the maximum amount of gambles as 100/stake. Now, let's calculate the chance of losing: after gambling all your money away you still didn't win. In this case, you hit a 99% chance, the losing chance per gamble, for every gamble. This can be written as
- 99%^gambles = 99%^(100/stakes) = (99/100)^(100/stakes)
- Now, to get the winning chance, we simply subtract this from 1. Then we multiply it with the gain from winning, a 1000 times the stake, to get the average gain through winning with a given stake. Our total average gain is now this:
- G(stake) = (1 - (99/100)^(100/stakes))*1000*stakes - C(stake) = 100*stakes*(10*(1 - (99/100)^(100/stakes))) - C(stake)
- with C(stake) is the average loss through gambling given a specific stake.
- Calculating the average loss will be more difficult. As stated earlier, we will continue to gamble until we win or are out of money. As a result, the average amount of money spent on gambling is the sum of the chances of you actually getting to that gamble (or in other words, losing all the previous ones) times the stake spent on that gamble. We discussed how to calculate this chance earlier, so let's get right to the equation:
- C(stake) = stake*(99/100)^0 + stake*(99/100)^1 + stake*(99/100)^2 + ... + stake*(99/100)^(100/stakes)
- This, of course, is the sum of a geometric series and can be simplified to the following:
- C(stake)
- = stake*(1 - (99/100)^(100/stake + 1))/(1 - 99/100)
- = stake*(1 - (99/100)^(100/stake + 1))/(1/100)
- = 100*stake*(1 - (99/100)^(100/stake + 1))
- Let's fill this in in our original formula:
Advertisement
Add Comment
Please, Sign In to add comment