# Probability as it applies to slot machines...

This topic is 2900 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi,

I'm currently working on a slot machine designer tool that will allow the user to see, at a glance, the payout percentages and probabilities of each win coming onto the winline. So far it's been going really well and I have a partial implementation in C#.

However, I'm having a problem with scattered wins.

Currently, the probabilitys for a win on the winline (from left to right are)

(Num Symbols) / (Total Symbols on Reel) = Probability

1 / (Probability) = Hit Rate

(Number of Combinations*) / (Hit Rate) = Odds.

(Win Value) / (Hit Rate) * 100 = Payout Percentage.

This works fine when calculating the odds of winning from left to right, and from right to left. However, when you're looking for symbols anywhere on a winline it doesn't translate so well;

Anyone got any ideas how I could adapt this, or even better, have a formula for calculating this?

Sorry for rambling, but I've been scratching my head with this for a few days now and cohesive thought has abandoned me! ;)

Thanks,
Michael.

##### Share on other sites
Do you have a more specific question? What probability are you trying to compute exactly?

##### Share on other sites
Sorry, it was a bit of a ramble;

I'm currently trying to work out the probabilities for any combination of symbols along the reel strips.

For example, in a 5 reel slot game - what would the probability of 5 BAR symbols appearing anywhere on a winline, 4 BARS, 3 BARS etc...

They don't have to be in sequence, just on the winline itself - so you could have this;

 X    X    X    X    X BAR  X    BAR  BAR  BAR  X    X    X    X    X

That would be 4 x BARS anywhere on the win line. I just can't seem to work out the probability of this happening correctly...

##### Share on other sites
As long as the probability of getting a bar is the same for each reel, then the probability is

<number states in which the win can be acheived> * <probability of a single state occurring>

Say there are 4 reels, with the chance of getting a bar on one reel 1/5

For the chance of getting 2 bars:

You can get 2 bars on 4 reels in 6 different ways. This can be calculated using the nCr calculation, (see http://www.calculatorsoup.com/calculators/discretemathematics/combinations.php for an explanation)

Of all the possible states the reels can be in, we are interested in (in this case) 6 of them, the chances of getting any one of these 6 states is 6 times the chance of any one state, so 6 * ((1/5)^4) or 6/625

(Quick edit as I messed up the last bit - should be ok now)

##### Share on other sites
Find the probability of a BAR coming up on each single reel (Num BAR / Total Symbols on Reel) so you've got P1..Pn (where n is number of reels).

Then you've got to go through all the permutations (the different ways you can get N BARs) and add them together.
e.g. for a 5 reel game
5 BAR has only 1 permutation = P1*P2*P3*P4*P54 BAR has 5 permutations = P1*P2*P3*P4 + P1*P2*P3*P5 + P1*P2*P4*P5 + P1*P3*P4*P5 + P2*P3*P4*P53 BAR has 10 permutations = P3*P4*P5 + P2*P4*P5 + P2*P3*P5 + P2*P3*P4 + P1*P4*P5 + P1*P3*P5 + P1*P3*P4 + P1*P2*P5 + P1*P2*P4 + P1*P2*P3
When I worked in 'gaming', we'd check these percentages by doing the math (like this), and double-check by writing a simulation of the game in C and seeing if it produced the same result (withing a statistically relevant error margin) after millions of random tests.

BTW We had some fancy custom built software for helping do this kind of math, but Excel was actually easier to use and more flexible in most cases ;)

##### Share on other sites
Ok, I think I understand what you're saying - but if we had multiple weightings for each reel, how would I proceed with that?

Currently i'm checking for any two symbols (s1) on a three reel game, the chances of s1 appearing on each reel are; 2/7, 3/7 and 1/4 (i'm trying to make this as basic as possible for myself ;)).

So how would I calculate the chance of any two bars appearing based on those weightings? Would an 'nCr' calculation still be useful in this instance?

##### Share on other sites
Quote:
 Original post by HodgmanFind the probability of a BAR coming up on each single reel (Num BAR / Total Symbols on Reel) so you've got P1..Pn (where n is number of reels).Then you've got to go through all the permutations (the different ways you can get N BARs) and add them together.e.g. for a 5 reel game*** Source Snippet Removed ***When I worked in 'gaming', we'd check these percentages by doing the math (like this), and double-check by writing a simulation of the game in C and seeing if it produced the same result (withing a statistically relevant error margin) after millions of random tests.BTW We had some fancy custom built software for helping do this kind of math, but Excel was actually easier to use and more flexible in most cases ;)

Ahhhhhh, that's where I'm going wrong!

I've been doing;

4 BAR= P1*P2*P3*P4* P1*P2*P3*P5* P1*P2*P4*P5* P1*P3*P4*P5* P2*P3*P4*P5

So if I add the different outcomes together, rather than multiplying, the results should be statistically correct?

##### Share on other sites
Quote:
 Original post by HL706So if I add the different outcomes together, rather than multiplying, the results should be statistically correct?
Yep - this is also what BattleMetalChris did when he assumed that each reel had the same weightings and then multiplied by the number of permutations (i.e. that's equivalent to adding the permutations together).

##### Share on other sites
Ah fantastic! Cheers for that guys, I really appreciate it.

##### Share on other sites
slot machines arent random... at all.

• 10
• 9
• 48
• 12
• 10
• ### Forum Statistics

• Total Topics
631383
• Total Posts
2999688
×