123xyz
123xyz
  • Threads: 4
  • Posts: 11
Joined: May 7, 2019
May 22nd, 2019 at 1:07:39 AM permalink
Hello wizard community,

I'm wondering, how do you calculate the standard deviation of the games ?

I especially need to calculate it for the THU poker.

Thank you for your help,
Sara
RS
RS
  • Threads: 62
  • Posts: 8626
Joined: Feb 11, 2014
May 22nd, 2019 at 3:13:39 AM permalink
Quote: 123xyz

Hello wizard community,

I'm wondering, how do you calculate the standard deviation of the games ?

I especially need to calculate it for the THU poker.

Thank you for your help,
Sara


Variance is the average of the squared differences from the mean (EV).

Standard Deviation is the square root of variance.
odiousgambit
odiousgambit
  • Threads: 327
  • Posts: 9644
Joined: Nov 9, 2009
May 22nd, 2019 at 3:16:50 AM permalink
If you want to do it yourself, you have to determine the mean and take some other steps, I think there are online calculators you can use.

For many games, the S.D. has been calculated for you:

https://wizardofodds.com/gambling/house-edge/
the next time Dame Fortune toys with your heart, your soul and your wallet, raise your glass and praise her thus: “Thanks for nothing, you cold-hearted, evil, damnable, nefarious, low-life, malicious monster from Hell!”   She is, after all, stone deaf. ... Arnold Snyder
123xyz
123xyz
  • Threads: 4
  • Posts: 11
Joined: May 7, 2019
May 22nd, 2019 at 3:28:15 AM permalink
I know but I need a method to calculate it for each game. for example I d like to have the formula to get the standard deviation of baccarat
123xyz
123xyz
  • Threads: 4
  • Posts: 11
Joined: May 7, 2019
May 22nd, 2019 at 3:29:25 AM permalink
It's not calculated for THU poker. also I need the theoric SD not the empiric one.
DogHand
DogHand
  • Threads: 2
  • Posts: 1643
Joined: Sep 24, 2011
Thanked by
MichaelBluejay
May 22nd, 2019 at 6:12:29 AM permalink
Quote: 123xyz

I know but I need a method to calculate it for each game. for example I d like to have the formula to get the standard deviation of baccarat



123xyz,

I'll show you how to calculate the standard deviation for the Banker bet at Baccarat.

You didn't specify the number of decks, so I assumed 8. According to the Wizard of Odds:

https://wizardofodds.com/games/baccarat/basics/#toc-Odds

for the Banker bet, wins pay 0.95 with a probability of 0.458597,
losses pay -1 with a probability of 0.446247, and
ties pay 0 with a probability of 0.095156.
The average result of a Banker bet is -0.010579, which means the house edge is about 1.06%.

Note that these numbers from the WoO are from exact calculations, not simulations. The values shown for the probabilities and average are truncated to six decimal places, so if you want more precise values, go to the webpage and use the exact fractions. For example, the exact probability of a win is

(2,292,252,566,437,888)/(4,998,398,275,503,360) = 0.45859742263...

When we know the probability distribution, we can calculate the SD with this formula:

SD = √{sum(p_i*(x_i-mu)²)}

where we sum over all three events, p_i is the probability of event i, x_i is the payout for event i, and mu is the average result.

In our case, we have three events: wins, losses, and ties (all with the pays and probabilities given above), so we have three terms in our summation. Plugging in the values gives this result:

SD_Banker = √{0.458597*(0.95-(-0.010579))²+0.446247*(-1-(-0.010579))²+0.095156*(0-(-0.010569))²} = 0.92737...

Hope this helps!

Dog Hand
123xyz
123xyz
  • Threads: 4
  • Posts: 11
Joined: May 7, 2019
May 22nd, 2019 at 6:58:21 AM permalink
thank you it helps a lot !
so the SD of the game baccarat is RACINE(0,93*0,458597+0,95*0,446247+2,64*0,095156)=1,049591206 ?
it's supposed to equal 1 but may be it's just because the numbers are not exact

and where does this formula of the SD comes from ?
ChesterDog
ChesterDog
  • Threads: 9
  • Posts: 1601
Joined: Jul 26, 2010
May 22nd, 2019 at 4:39:33 PM permalink
Quote: 123xyz

..and where does this formula of the SD comes from ?




See this Wikipedia page: https://en.wikipedia.org/wiki/Variance


The formula for the SD is simply the square root of the variance. And the formula for the variance comes from its definition, which is:

Var(X) = E[(X-𝜇)2]


Var(X) is the variance. 𝜇 is the mean (which is the EV of the bet.) And E[(X-𝜇)2] means the expected value of the square of the difference between the payout and the EV.


For the Banker bet, there are three possible outcomes: win, loss, and tie with payouts of 0.95, -1, and 0, respectively. Their probabilities are 0.459, 0.446, and 0.095, respectively. And the Wizard tells us that the mean for 8-deck baccarat Banker bet is -0.011. (I'm rounding to three places, but you may round to any number of places.)


So, the expected value of the square of the difference between the payout and the EV is:

0.459(0.95+0.011)2

+0.446(-1+0.011)2

+0.095(0+0.011)2


These three terms are 0.424, 0.436, and 0.000, respectively. And their sum is 0.860, which is the variance. So the SD is the square root of 0.860, which is 0.927, which is close to Dog Hand's more exact value of 0.92737...

0.927 is only roughly equal to 1. The SD is less than 1 because of the approximately 10% chance of a tie.

(By the way, your biggest error was in the 3rd term. You have 2.65*0.0905..., instead of something like 0.00012*0.0905.)
DogHand
DogHand
  • Threads: 2
  • Posts: 1643
Joined: Sep 24, 2011
May 22nd, 2019 at 8:37:05 PM permalink
Quote: 123xyz

thank you it helps a lot !
so the SD of the game baccarat is RACINE(0,93*0,458597+0,95*0,446247+2,64*0,095156)=1,049591206 ?
it's supposed to equal 1 but may be it's just because the numbers are not exact

and where does this formula of the SD comes from ?



123xyz,

The formula comes at the end of the "Discrete random variable" section of this Wikipedia page:

https://en.m.wikipedia.org/wiki/Standard_deviation#Discrete_random_variable

When you say "the SD of the game baccarat", I'm unclear what you mean. Each of the three bets in baccarat, Banker, Player, and Tie, has a different standard deviation. I showed how to calculate the SD for the Banker bet: if you follow the same procedure, using the appropriate probabilities and returns for each bet (they're all given in the WoO page I quoted in my previous post), you can find the SD's for the other two bets.

Finally, I didn't understand your formula at all. What is RACINE?

Dog Hand
123xyz
123xyz
  • Threads: 4
  • Posts: 11
Joined: May 7, 2019
May 23rd, 2019 at 1:39:20 AM permalink
sorry racine is in french, it means the square root. I have a book about the maths of gambling and it says : "a single wager of an even money game such as baccarat has a standard deviation of one unit. for blackjack SD= 1.1 and for roulette = 5.7"
So I guess it's a ponderation of the probability of the banker, the player and the tie.

what is EV ? Expected value ? where can I find it ?
DogHand
DogHand
  • Threads: 2
  • Posts: 1643
Joined: Sep 24, 2011
May 23rd, 2019 at 7:02:43 PM permalink
Quote: 123xyz

sorry racine is in french, it means the square root. I have a book about the maths of gambling and it says : "a single wager of an even money game such as baccarat has a standard deviation of one unit. for blackjack SD= 1.1 and for roulette = 5.7"
So I guess it's a ponderation of the probability of the banker, the player and the tie.

what is EV ? Expected value ? where can I find it ?



123xyz,

The book you have is not precisely accurate: perhaps the author meant to say that the SD is APPROXIMATELY 1 for the Banker or Player bet. Because of ties and the 5% commission on winning Banker bets, the SD for both the Banker and Player bets is less than 1.

The EV is what I called the "average value" in my original post. EV is short for Expected Value, and is commonly expressed as a percentage and used to describe the games. If the EV is negative, the house has the advantage over the player; if positive, the player has the advantage over the house. For example, if you bet on Banker in baccarat, the EV is -0.0106, or -1.06%, so in the long run, you should expect to lose 1.06% of the total amount that you wager.

Hope this helps!

Dog Hand
kubikulann
kubikulann
  • Threads: 27
  • Posts: 905
Joined: Jun 28, 2011
June 18th, 2019 at 3:16:29 PM permalink
There is a simple way of calculating the variance.
« Average of the squares minus square of the average »
E[X^2] — E[X]^2

So if you have a table from the Wizard about the game you’re interested in,
with columns: [value] , [probability] and [return=val x prob],
you just need to add a column [value x return] (or, equivalently, val x val x prob).

Note: watch the signs ! Your column should only have positive values.

The summation of [returns] gives the Expectation a.k.a. the House edge, given by WoO.
Summation of the new column gives E[X^2], to which you subtract the SQUARE of the House edge to get the variance.

Pour l’écart-type, prendre la racine.
Last edited by: kubikulann on Jun 18, 2019
Reperiet qui quaesiverit
kubikulann
kubikulann
  • Threads: 27
  • Posts: 905
Joined: Jun 28, 2011
June 18th, 2019 at 3:30:19 PM permalink
Quote: 123xyz

oot. I have a book about the maths of gambling and it says : "a single wager of an even money game such as baccarat has a standard deviation of one unit. for blackjack SD= 1.1 and for roulette = 5.7"
So I guess it's a ponderation of the probability of the banker, the player and the tie.
?



The book does not say « baccarat has a SD of x », it says « a wager in baccarat has etc. »
Making a (weighted) average of SDs is irrelevant and mathematically unsound.

The book is wrong , as Dog said. SD would be 1 only if the game was 50/50 and no house edge. For a -1/+1 bet with probability P of win, the expectation (a.k.a. EV or HEdge) would be 2P-1 and the std deviation is = 2 * SQRT [P(1-P)]

But in Baccarat, this does not apply: firstly because to the Banco bet is applied a vigorish (5% in America, half pay on a winning 6 in our longitudes) — secondly, you don’t lose your bet if a tie , so it is a -1/0/+1 situation.

Blackjack is not a -1/+1 game and French roulette neither (if you play a simple bet, you get the prison if zero comes out). But it is easy to compute the variance in roulette or Bacc. NOT in Blackjack !!!
Reperiet qui quaesiverit
kubikulann
kubikulann
  • Threads: 27
  • Posts: 905
Joined: Jun 28, 2011
June 18th, 2019 at 3:51:18 PM permalink
Beware!
In Belgium and I suppose in France, instead of a 5% commission, they use a reduced pay on a winning Banco bet if the Banker won with a total of 6. Check the Wizards table: the H.E.for Banco is then 1.454%, which is WORSE than the 1,237% for Punto (or, for what it’s worth, simple chance in French roulette with 1.35%).
So: play Punto for minimum house edge.

Or better, if you are looking for better variance, play Caribbean Stud « à la Belge » where the element of risk is -0.87% — better than Bacc, worse than BJ but with higher variance (StDev 2,5 instead of 1,3). One hand of CS’’B’’ is grossly similar, in terms of EV and SD, to three successive (I.e. independent) hands of BJ. But the distribution is more skewed (more loss, higher gains).
Last edited by: kubikulann on Jun 18, 2019
Reperiet qui quaesiverit
  • Jump to: