konglify
konglify
  • Threads: 28
  • Posts: 160
Joined: Aug 28, 2014
March 1st, 2017 at 8:59:43 AM permalink
Hi all,
I am reading a book about simple math for slot game. One concept about the volatility index of a slot game is confusing me. Let's take a line game as example. If we consider a unit bet (1 credit), let's say the return to player is R. The possible line win pays W_n and total hit to give that W_n is H_n. According to the book I read, the volatility index is

VI = CI * SQRT( [SUM( H_n x (W_n -R)^2 ) + H_0xR^2 ]/CYCLE )

where H_0 corresponding to the hit for non-winning spin. CI is the index for confident level. My first question is: the above formula computes each win independently, so it calculates how each win contributes to fluctuate the payout around the expectation pay (RTP). But there could be some spin gives multiple wins at the same time, does above formula reflect that? Let me give one example, in one spin, we may end up with winning 5xKING (pays 1000), 3xACE (pays 300) and 2xJACK( pays 50) so total win is 1350. In above formula, we should find out how many hits will give 1000, 300 and 50 individually, let assume there will be 65253 hits given 5xKING, 1234255 hits given 3XACE and 24524243 hits given 2xJACK, so they contribute to VI as

... + 65253 x (1000-R)^2 + 1234255 x (300-R)^2 + 24524243 x (50-R)^2 + ...

But even we play one line per spin, it is still possible to win a multiple winning (e.g. a line win plus a scatter win), so will it more realistic to compute all unique total wins and hits for that win. So for above example, we should find out how many screen will pay 1350 etc.

My second question is if the bet per spin is not unit how should we modify the formula to fit it. I know we cannot use above formula because R is computed by assuming 1 unit bet.
ThatDonGuy
ThatDonGuy
  • Threads: 117
  • Posts: 6219
Joined: Jun 22, 2011
March 1st, 2017 at 10:19:04 AM permalink
Question: is each Hn (or H_n, as you put it) a count, and do all of the Hn values, including H0. add up to the "cycle" value?

If so, then your formula appears to be Volatility Index = Confidence Level x Standard Deviation.

Standard Deviation has to be calculated at spin level; a separate win value needs to be determined for each possible position of the reels. While the mean return per line bet "should be" the same regardless of how many lines you play, the standard deviation will not, because of the possibility of multiple lines. Also, it depends on whether or not a scatter pays extra for multiple lines or not.

I am not entirely sure that Confidence Level is, but somebody with a firmer grasp of statistics than I have can help me out - if we know the layout of the reels, shouldn't the confidence level be 1 (i.e. 100%)? I have a feeling that formula for VI is used when you don't know for certain how the reels are laid out, and are using some sort of sampling.
konglify
konglify
  • Threads: 28
  • Posts: 160
Joined: Aug 28, 2014
March 1st, 2017 at 11:04:45 AM permalink
Quote: ThatDonGuy

Question: is each Hn (or H_n, as you put it) a count, and do all of the Hn values, including H0. add up to the "cycle" value?

If so, then your formula appears to be Volatility Index = Confidence Level x Standard Deviation.

Standard Deviation has to be calculated at spin level; a separate win value needs to be determined for each possible position of the reels. While the mean return per line bet "should be" the same regardless of how many lines you play, the standard deviation will not, because of the possibility of multiple lines. Also, it depends on whether or not a scatter pays extra for multiple lines or not.

I am not entirely sure that Confidence Level is, but somebody with a firmer grasp of statistics than I have can help me out - if we know the layout of the reels, shouldn't the confidence level be 1 (i.e. 100%)? I have a feeling that formula for VI is used when you don't know for certain how the reels are laid out, and are using some sort of sampling.



For your first question, yes, they all add up to CYCLE. I see many example in books that SD should be calculated in spin level, I just don't understand why.

I have another question regarding the total bet. As you mentioned that R is the mean return per line bet, so it is normalized to the bet per line. What happens if the bet per line is not ONE? For R it doesn't matter since it is always normalized to whatever the bet is. However, W_n in my formula is given as pay when the desire bet is given, if bet is not one, shall we normalize that W_n by bet so to get correct calculation on standard deviation? It makes sense to me to calculate standard deviation as follow when bet is not one because we would like to keep R and W_n/Bet same unit

SD = SQRT( [SUM( H_n x (W_n/BET -R)^2 ) + H_0xR^2 ]/CYCLE )

However, I saw example somewhere that they do the following


SD = SQRT( [SUM( (H_n/BET) x (W_n -R)^2 ) + H_0xR^2 ]/CYCLE )

which is very confusing and I don't understand why they divide the HIT by BET.
ThatDonGuy
ThatDonGuy
  • Threads: 117
  • Posts: 6219
Joined: Jun 22, 2011
March 1st, 2017 at 12:03:35 PM permalink
R is not the "per line" mean, but the "per spin" mean, which takes all lines, scatters, and bonuses into account. This takes the possibility that different lines have different bets on them into account, although I don't think I have ever seen a slot machine where you could do this.

As for single-line vs. multi-line, the lines are not independent, although each line does have the same mean.
Here is a simplistic example:
Suppose you have a slot machine with three reels, and each reel has 10 symbols. Reel 1 has two 7s - a red 7, and immediately below it on the reel, a blue 7 - and eight blanks; reel 2 has a purple 7 and nine blanks; reel 3 has a green 7 and nine blanks. Each line has a bet of 1, and there are three possible payouts: three 7s (regardless of colors) pays 100; 7s on the first two reels but not the third pays 10; a 7 on the first reel but not the second pays 1 (whether or not there is a 7 on the third reel).

If you play just one line, the mean is 0.56, and the variance is (2/1000 x (100 - 0.56)2 + 18/1000 x (10 - 0.56)2 + 180/1000 x (1 - 0.56)2 + 800 x (0 - 0.56)2) = 21.6654; the standard deviation is the square root of the variance, or 4.6547.

If you play two lines, and one is directly on top of the other, then there are 28 possible results:
1 spin of R 7 7 / B x x pays 50.5 (101, divided by the 2 bet)
1 spin of R 7 x / B x 7 pays 5.5
8 spins of R 7 x / B x x pay 5.5 each
1 spin of R x 7 / B 7 x pays 5.5
1 spin of R x x / B 7 7 pays 50.5
8 spins of R x x / B 7 x pay 5.5 each
8 spins of R x 7 / B x x pay 1 each
8 spins of R x x / B x 7 pay 1 each
64 spins of R x x / B x x pay 1 each
1 spin of B 7 7 / x x x pays 50
1 spin of B 7 x / x x 7 pays 5
8 spins of B 7 x / x x x pay 5 each
1 spin of B x 7 / x 7 x pays 0.5
1 spin of B x x / x 7 7 pays 0.5
8 spins of B x x / x 7 x pay 0.5 each
8 spins of B x 7 / x x x pay 0.5 each
8 spins of B x x / x x 7 pay 0.5 each
64 spins of B x x / x x x pay 0.5 each
1 spin of x 7 7 / A x x pays 0.5
1 spin of x 7 x / A x 7 pays 0.5
8 spins of x 7 x / A x x pay 0.5 each
1 spin of x x 7 / A 7 x pays 5
1 spin of x x x / A 7 7 pays 50
8 spins of x x x / A 7 x pay 5 each
8 spins of x x 7 / A x x pay 0.5 each
8 spins of x x x / A x 7 pay 0.5 each
64 spins of x x x / A x x pay 0.5 each
The other 800 spins pay 0
The mean is also 0.56, but the variance is 43.9392, and the standard deviation is 6.6287.
konglify
konglify
  • Threads: 28
  • Posts: 160
Joined: Aug 28, 2014
March 1st, 2017 at 5:36:03 PM permalink
Quote: ThatDonGuy

R is not the "per line" mean, but the "per spin" mean, which takes all lines, scatters, and bonuses into account. This takes the possibility that different lines have different bets on them into account, although I don't think I have ever seen a slot machine where you could do this.

As for single-line vs. multi-line, the lines are not independent, although each line does have the same mean.
Here is a simplistic example:
Suppose you have a slot machine with three reels, and each reel has 10 symbols. Reel 1 has two 7s - a red 7, and immediately below it on the reel, a blue 7 - and eight blanks; reel 2 has a purple 7 and nine blanks; reel 3 has a green 7 and nine blanks. Each line has a bet of 1, and there are three possible payouts: three 7s (regardless of colors) pays 100; 7s on the first two reels but not the third pays 10; a 7 on the first reel but not the second pays 1 (whether or not there is a 7 on the third reel).

If you play just one line, the mean is 0.56, and the variance is (2/1000 x (100 - 0.56)2 + 18/1000 x (10 - 0.56)2 + 180/1000 x (1 - 0.56)2 + 800 x (0 - 0.56)2) = 21.6654; the standard deviation is the square root of the variance, or 4.6547.

If you play two lines, and one is directly on top of the other, then there are 28 possible results:
1 spin of R 7 7 / B x x pays 50.5 (101, divided by the 2 bet)
1 spin of R 7 x / B x 7 pays 5.5
8 spins of R 7 x / B x x pay 5.5 each
1 spin of R x 7 / B 7 x pays 5.5
1 spin of R x x / B 7 7 pays 50.5
8 spins of R x x / B 7 x pay 5.5 each
8 spins of R x 7 / B x x pay 1 each
8 spins of R x x / B x 7 pay 1 each
64 spins of R x x / B x x pay 1 each
1 spin of B 7 7 / x x x pays 50
1 spin of B 7 x / x x 7 pays 5
8 spins of B 7 x / x x x pay 5 each
1 spin of B x 7 / x 7 x pays 0.5
1 spin of B x x / x 7 7 pays 0.5
8 spins of B x x / x 7 x pay 0.5 each
8 spins of B x 7 / x x x pay 0.5 each
8 spins of B x x / x x 7 pay 0.5 each
64 spins of B x x / x x x pay 0.5 each
1 spin of x 7 7 / A x x pays 0.5
1 spin of x 7 x / A x 7 pays 0.5
8 spins of x 7 x / A x x pay 0.5 each
1 spin of x x 7 / A 7 x pays 5
1 spin of x x x / A 7 7 pays 50
8 spins of x x x / A 7 x pay 5 each
8 spins of x x 7 / A x x pay 0.5 each
8 spins of x x x / A x 7 pay 0.5 each
64 spins of x x x / A x x pay 0.5 each
The other 800 spins pay 0
The mean is also 0.56, but the variance is 43.9392, and the standard deviation is 6.6287.



Thanks for your reply. I understand the math and example now. But I still don't know what should it look like if the game required to bet at least, says, 13 credits per line. I know in your example, no matter what's the minimum bet is, the R will be the same since they normalized to the minimum bet (for each spin). But now the pays is not the normalized pay for each winning line, so should I divide the pay with 13credits or divide the hit with 13 to make it correct? In your example, you are talking about two separately line so the bet doubled. But in my question I am talking about the minimum bet is required to be non-one for one line. They are not quite the same thing.
ThatDonGuy
ThatDonGuy
  • Threads: 117
  • Posts: 6219
Joined: Jun 22, 2011
March 2nd, 2017 at 6:27:03 AM permalink
Quote: konglify

Thanks for your reply. I understand the math and example now. But I still don't know what should it look like if the game required to bet at least, says, 13 credits per line. I know in your example, no matter what's the minimum bet is, the R will be the same since they normalized to the minimum bet (for each spin). But now the pays is not the normalized pay for each winning line, so should I divide the pay with 13credits or divide the hit with 13 to make it correct? In your example, you are talking about two separately line so the bet doubled. But in my question I am talking about the minimum bet is required to be non-one for one line. They are not quite the same thing.


It depends on how you are calculating R.

If R is the mean return for a bet of 1, then divide the pay by the amount bet per line; since the mean is actually in terms of a multiple of the amount bet, then the win amounts need to be expressed in the same terms. A slot machine that requires 13 bets of 1 credit per line is the same as one that requires 1 bet of 13 credits per line. However, keep in mind that the standard deviation will now also be in terms of a bet of 1.
konglify
konglify
  • Threads: 28
  • Posts: 160
Joined: Aug 28, 2014
March 2nd, 2017 at 5:35:41 PM permalink
Quote: ThatDonGuy

It depends on how you are calculating R.

If R is the mean return for a bet of 1, then divide the pay by the amount bet per line; since the mean is actually in terms of a multiple of the amount bet, then the win amounts need to be expressed in the same terms. A slot machine that requires 13 bets of 1 credit per line is the same as one that requires 1 bet of 13 credits per line. However, keep in mind that the standard deviation will now also be in terms of a bet of 1.



Thanks. That's what I am thinking as well. But I saw several examples in different resource, in which, R is computed by normalized to 1 credit bet (actual bet is not unity), but they do not divide the pay by actual bet instead they divide the hit with actual bet. I don't understand why.
konglify
konglify
  • Threads: 28
  • Posts: 160
Joined: Aug 28, 2014
March 8th, 2017 at 6:21:58 AM permalink
Let me rephrase my question on the calculation in the following example. I setup a very simple 3-reel slot game, each screen is 3 rows total 3 symbols, no wild, no scatter, each reels has 10 symbols, so the cycle is 1000.

The reels looks like

A A A
B C B
B C B
C C B
C B C
B B A
C A B
C C C
B C C



3xA pays 6 credits
2xA pays 3 credits
3xB pays 5 credits
2xB pays 2 credits
3xC pays 4 credits
2xC pays 1 credit

One could count that there are
8 3xA
32 2xA
48 3xB
72 2xB
80 3xC
120 2xC

If each spin cost 1 credit, the payback is r = (8*6 + 32*3 + 48*5 + 72*2 + 80*4 +120*1)/1000 = 96.8%. The standard deviation is then calculated as

SD = sqrt((8*(6-r)^2 + 32*(3-r)^2 + 48*(5-r)^2 + 72*(2-r)^2 + 80*(4-r)^2 + 120*(1-r)^2 + (1000-8-32-48-72-80-120)*(0-r)^2)/1000) = 1.589

In above calculation, we assume that everything is calculated when 1 credit, 1 line is played. As you mentioned in previous reply, payback and standard deviation should be independent of number of lines played. Now let's redesign the game with same reels set, symbols and pays but player must play 3 lines (top/middle/bottom row across) each spin and the bet becomes 3 credits this time. Do the math we get the hit

24 3xA
96 2xA
144 3xB
216 2xB
240 3xC
360 2xC

calculate the payback in similar way bet using 3 credits/bet gives

r = (24*6 + 96*3 + 144*5 + 216*2 +240*4 + 360*1)/(1000*3) = 96.8%

But when comes to the standard deviation, I get lost

SD = sqrt((24*(6/3-r)^2 + 96*(3/3-r)^2 + 144*(5/3-r)^2 + 216*(2/3-r)^2 + 240*(4/3-r)^2 + 360*(1/3-r)^2 + (1000-24-96-144-216-240-360)*(0-r)^2)/1000) = 0.4665

I have idea why they give two different number.
ThatDonGuy
ThatDonGuy
  • Threads: 117
  • Posts: 6219
Joined: Jun 22, 2011
March 8th, 2017 at 12:39:51 PM permalink
First of all, I assume you left A B C off at the bottom of your reels.

Your second standard deviation calculation is incorrect - 1000-24-96-144-216-240-360 is a negative number. Also, if you multiply the wins by 3, you have to multiply the losses by 3 as well, and then divide by 3000 instead of 1000. I think this will result the same standard deviation as for one line - but I am pretty sure the standard deviations are supposed to be different in this case.

This is because while the three reels are independent, the three lines are not. If the middle line has A A A, then the top line is either B B C or A B C, and the corresponding bottom line is A C B or B C B (that is, if the top line is B B C, the bottom is A C B, and if the top is A B C, then the bottom is B C B).

You need to determine the per-line payout for each of the 1000 possible three-reel settings, subtract the one-coin mean, and square that value, then sum those 1000 values and take the square root of that.
konglify
konglify
  • Threads: 28
  • Posts: 160
Joined: Aug 28, 2014
March 9th, 2017 at 4:44:34 AM permalink
Quote: ThatDonGuy

First of all, I assume you left A B C off at the bottom of your reels.

Your second standard deviation calculation is incorrect - 1000-24-96-144-216-240-360 is a negative number. Also, if you multiply the wins by 3, you have to multiply the losses by 3 as well, and then divide by 3000 instead of 1000. I think this will result the same standard deviation as for one line - but I am pretty sure the standard deviations are supposed to be different in this case.

This is because while the three reels are independent, the three lines are not. If the middle line has A A A, then the top line is either B B C or A B C, and the corresponding bottom line is A C B or B C B (that is, if the top line is B B C, the bottom is A C B, and if the top is A B C, then the bottom is B C B).

You need to determine the per-line payout for each of the 1000 possible three-reel settings, subtract the one-coin mean, and square that value, then sum those 1000 values and take the square root of that.



If I understand this correctly, it seems that what I was thinking before. I iterate each possible screen out of 1000 settings. Compute the total pay for each screen (call P_n), sum up each of the following expression

SQRT[ SUM[(P_n/3 - r)^2]/1000]

Is this what you mean? Since you mention that the reels are independently but the lines not. I just wonder in many online slot game (or some advertise for slots machine in some casinos), they always mentioned that the volatility is constant for a certain game. But the truth is that it will change when the player change the bet option? As I can see as well, the payback is constant when you bet more line, the volatility drops?
ThatDonGuy
ThatDonGuy
  • Threads: 117
  • Posts: 6219
Joined: Jun 22, 2011
March 9th, 2017 at 6:40:48 AM permalink
Quote: konglify

If I understand this correctly, it seems that what I was thinking before. I iterate each possible screen out of 1000 settings. Compute the total pay for each screen (call P_n), sum up each of the following expression

SQRT[ SUM[(P_n/3 - r)^2]/1000]

Is this what you mean? Since you mention that the reels are independently but the lines not. I just wonder in many online slot game (or some advertise for slots machine in some casinos), they always mentioned that the volatility is constant for a certain game. But the truth is that it will change when the player change the bet option? As I can see as well, the payback is constant when you bet more line, the volatility drops?


Yes, that is what I mean.

Yes, the volatility drops with more lines. Suppose on your example machine, the tenth symbol on each line was D, and three Ds paid 100 (but two Ds paid nothing). When you play one line, 1/1000 of the time, you will win 100. However, with three lines, you will not win 300 1/1000 of the time as you cannot get three Ds on all three lines at once. You are three times as likely to get three Ds, since there are three lines, but each one pays 1/3 of what it would pay (in terms of how much you bet) with a single-line bet. In effect, the machine changes from one payout of 100 to three payouts of 33 1/3. This clearly reduces the standard deviation.
Last edited by: ThatDonGuy on Mar 9, 2017
  • Jump to: