# Find standard deviation of arbitrary game with multiple payouts

This earlier question asked how to get a 5.76 standard deviation for a single number bet on Roulette. The answer gave the formula, but unfortunately, the formula doesn't easily generalize to more than two payout outcomes.

For example, Baccarat (Banker) has three outcomes. Here they are:

• 0.4587 probability with a profit of 0.95
• 0.0951 probability with a profit of 0
• 0.4463 probability with a profit of -1

The standard deviation is apparently 0.93. How do you get from the previous numbers to 0.93? In other words, what's the magic formula? I want the formula as general as possible so it can be extended to even 10 or more outcomes.

• The variance of a random variable $X$ is $\sigma^2 = \text{E}[(X - \mu)^2]$, where $\mu = \text{E}(X)$, and the s.d. is the square root of this. In your example, calculate the expected payout, subtract this from each value, square it, and then take the expected value of this new random variable. – dsaxton Jul 20 '15 at 1:13
• @dsaxton: By "expected payout", I presume you mean 0.4587*0.95 + 0.0951*0 + 0.4463*-1 = -0.010535? But where you say 'each value' in the text "subtract this from each value", is the sum 0.4587*0.95 = 0.435765 the first of these 'values'? If so, the resulting value is 0.199183 since (0.435765 - -0.010535)^2 = 0.199183. The other two values are 0.00011 and 0.18989. I'm not sure how to interpret the last bit of your comment to act upon these three values - "and then take the expected value of this new random variable". – Dan W Jul 21 '15 at 12:59
• Calculate $0.4587 (0.95 - \mu)^2 + 0.0951 (0 - \mu)^2 + 0.4463 (-1 - \mu)^2$ where $\mu = 0.4587 \cdot 0.95 - 0.4463$, the expected payout. – dsaxton Jul 21 '15 at 14:42

The variance of a random variable $X$ is $\sigma^2 = \text{E}[(X−\mu)^2]$, where $\mu = \text{E}(X)$, and the s.d. is the square root of this. In your example the variances becomes $$0.4587 ( 0.95 − \mu)^2+0.0951(0 − \mu)^2+0.4463(−1− \mu)^2$$ where $μ=0.4587⋅0.95−0.4463$, the expected payout.
• ....And it works! Though I had to squareroot the final answer at the end. You may wish to expand the μ sum to 0.4587⋅0.95 + 0.0951⋅0 + 0.4463⋅-1 for clarity, even if you can simplify that as you've done). – Dan W Jul 22 '15 at 15:33