blackbaron Joined: Jun 5, 2015
• Threads: 3
• Posts: 9
July 15th, 2015 at 11:34:03 AM permalink
I need to understand some details about slot standard deviation calculation. I use a simple function to calculate SD based on win value after each spin. Is right ? Or i must calculate SD only when win is not 0 ?
Used algorithm is this:

N++;
sumXi += Math.pow(x, 2);
tmp += x;
sumXiSquare = Math.pow(tmp, 2);
sigma = 1/N * Math.sqrt((N*sumXi) - sumXiSquare);

where x is Totalwin (includes win bonus), N is number of spin, meanwhile sumXi and SumXiSquare variables are sum of previos values.

Testing it on simple series SD (sigma) get rigth value, but i'm not sure if assing to "x" totalWin or assign "Total Bet - TotalWin" value.
ThatDonGuy Joined: Jun 22, 2011
• Threads: 99
• Posts: 4764
July 15th, 2015 at 12:56:56 PM permalink
I don't think so - unless you happen to be playing that one slot machine (which I don't think exists any more) where the only symbols were red 7s and blank spaces, and either you got three 7s or you lost.

Somebody correct me if I'm wrong, but I think the method for calculating the SD for a slot machine is:
(a) Calculate the mean payout
(b) For each distinct payout amount, including zero, multiply the probability of getting that amount by (payout - mean)2
(c) Add up all of the values in (b) (this should be the game's variance)
(d) Take the square root of the sum in (c).

Note that this is for one spin - for N spins, I think you multiply the one-spin SD by the square root of N.

The problem is, there's no way of knowing the probabilities with any degree of certainty.
DRich Joined: Jul 6, 2012
• Threads: 76
• Posts: 7378
July 15th, 2015 at 1:05:34 PM permalink
Quote: ThatDonGuy

The problem is, there's no way of knowing the probabilities with any degree of certainty.

Sure there is, just look at the PAR sheet. :)
Order from chaos
blackbaron Joined: Jun 5, 2015
• Threads: 3
• Posts: 9
July 15th, 2015 at 1:20:39 PM permalink
I take simple numerical serie to test my SD calculation, below link as you can see numerical example

Using these values : 2,4,4,4,5,5,7,9 standar dev result to be 2 as my function return.
Now i need to deep under the hood and discover your quote about the probability...
Any suggestion will be very appreciate :)

About slot machine doesn't exist yet, but i develop a visual simulator that use virtual reel taken from atkins diet slot, as i tested with accuracy algorithm and statistical value. To complete my goal remains to calculate SD and Volatility.
blackbaron Joined: Jun 5, 2015
• Threads: 3
• Posts: 9
July 15th, 2015 at 1:28:45 PM permalink
But why use probabilities on SD ? In my case i can simulate N spin and give real win values.
it is not enough to ponder these real values ?
ThatDonGuy Joined: Jun 22, 2011
• Threads: 99
• Posts: 4764
July 15th, 2015 at 2:14:00 PM permalink
Quote: blackbaron

But why use probabilities on SD ? In my case i can simulate N spin and give real win values.
it is not enough to ponder these real values ?

You can do it that way, but it's not quite as accurate.

To answer your original question, you do have to include all of the spins where the result is zero.

Think about it; if you were doing it with tossing a coin, but not counting the losses, then all of the results would be 1, and the standard deviation would be 0.
blackbaron Joined: Jun 5, 2015
• Threads: 3
• Posts: 9
July 15th, 2015 at 3:43:30 PM permalink
Quote: ThatDonGuy

You can do it that way, but it's not quite as accurate.

To answer your original question, you do have to include all of the spins where the result is zero.

Think about it; if you were doing it with tossing a coin, but not counting the losses, then all of the results would be 1, and the standard deviation would be 0.

Tossing coin is a simple example to count zero too :)

what about sd value for not progressive slot in production mode ? i read some different value accepted, any indication from real experience ?
ThatDonGuy Joined: Jun 22, 2011
• Threads: 99
• Posts: 4764
July 15th, 2015 at 5:13:52 PM permalink
Quote: blackbaron

what about sd value for not progressive slot in production mode ? i read some different value accepted, any indication from real experience ?

There's no way of knowing the SD without knowing the particulars of the payouts.

In "the old days," most slot machines had 3 reels, and each reel had 20 stops, so there were 8000 different possible results.
Suppose you were at a machine that advertised, "99% payback" - that is, the expected return for a \$1 bet was \$0.99.
Now, if the machine had 7920 combinations that lost and 80 that paid \$99, the mean return is (80 x 99)/8000 = 0.99, and the SD is:
sqrt( ( (7920 x (0 - 0.99)2 + 80 x (1 - 0.99)2 ) / 8000 ) = 0.011
However, if the machine has 800 combinations that lose and 7200 that pay \$1.10, the mean return is still (7200 x 1.1) = 0.99, but the SD is now:
sqrt( ( (800 x (0 - 0.99)2 + 7200 x (1.1 - 0.99)2 ) / 8000 ) = 0.33, or about 30 times as high.

• Jump to: