I'm writing a program for a simple gambling machine simulation with configurable expected return and variance.
For a given stake, the machine always pays out a return of either {nothing, 2:1, 5:1, 20:1, or 100:1}
The expected return to player value is a configurable variable. For example, if it were 95%, the player would expect the machine to payout \$9,500 for having played a \$1 stake 1000 times.
The variance of the machine is also a configurable value, from some preset list of sensible values. A machine with a low variance value would pay out regular, smaller wins, whereas a machine with a high variance would payout fewer, bigger wins.
Given an RTP and variance value, I need a way of calculating sensible probabilities for the payouts. Obviously, the probabilities should be strictly decreasing as the payout increases, and I'd imagine decreasing in some kind of exponential/logarithmic manner (although I'm not sure about that).
I'm not really sure how to go about doing this. Any help or pointers would be greatly appreciated!
Please excuse the wording, I'm not from a maths background so I hope I'm describing the problem clearly enough.
This is just a suggestion. It's hard for me to know how it would work out in practice without some actual values for expected return to the player and the variance. I can guess that the expected return is somewhere in the neighborhood of $95\%$, but I have no idea about the variance.
Any, for $k=2,5,20,100$ let $p_k$ be the probability that the machine returns $k$ on a $1$ bet, let $\mu$ be the desired return, and let $\sigma^2$ be the desired variance. We have $$\begin{align} \mu&=2p_2+5p_5+20p_{20}+100p_{100}\\ \sigma^2&=4p_2+25p_5+400p_{20}+10000p_{100}-\mu^2 \end{align}$$ If you set the values of $2$ of the probabilities, you will have $2$ linear equations in $2$ unknowns. I presume there are customary values for $p_2$ and $p_5$ or at least, that you can guess what reasonable values would be. Then solve for $p_{20}$ and $p_{100}$ and see if the values are reasonable. Or perhaps it would be better to start from the other end, assigning values for $p_{100}$ and $p_{20}$ since the variance will be sensitive to these probabilities.