User blog:Tricoro/Counting Stacking Abilities

Cookie Run is a game full of chances. There are some treasures that only appears by chance, meaning that it won't 100% come and bombardier the whole game.

An example of this effect are:
 * Chances of Invincibility (from hitting obstacles)
 * Chances of creating ice bridges.

Remember. In probability, chances are NOT additive. They are multiplicative. I'll take Snow Blossom and Snow Blossom's Sparkling Crust as an example.

I'll go through both of these effects.


 * Snow Blossom (at Lv.8) - Creates Ice Bridges. Covers 75% of holes in the game.
 * Snow Blossom's Sparkling Crust (at +9) - Creates Ice Bridges. Covers 30% of holes in the game.

For some people, it can be seen as covering ALL holes in the game. Why? Because 75% + 30% = 105%? It doesn't work that way.

75% + 30% invulnerability will not give you a 105% invulnerability. Basically, if we do the logic, the 30% from the treasure covers out of the overall chance, not only the remaining 25% that Snow Blossom did not cover.

So let me make this clear. The nature of probability is multiplicative.

How can we calculate the probability then? If you're thinking 75% x 30% = 22.5%, you're partially correct. That's the chances of BOTH abilities are active.

There are four outcome in this.
 * Neither of them are active
 * Snow Blossom's effect is active.
 * Snow Blossom's Treasure is active.
 * Both effects are active.

If one of the ability is active, it means it's active. The only way the holes isn't covered is only when neither Snow Blossom's and Snow Blossom's Treasure effects are active. If you get the logic, we're good to go.

Now if we were to combine both outcome, we need to use this formula. x1 + x2(100%-x1) Why do we need to use 100% - x1? Because it's not fair if the treasure effect can cover 25% of the remaining percentage that Snow Blossom did not cover. Remember, when both abilities are active, they had their own probability. Now back to the formula.

Snow Blossom's Chance (X1) = 75% Snow Blossom's Treasure Chance (X2) = 30%

Therefore: 75% + 30%(100% - 75%) 75% + 30%(25%) 75% + 7.5% 82.5%

So, if combined, there's an 82.5% chance that the holes will be covered, and 17.5% chance that the hole will not be covered. The 82.5% can be either the pet effect is active, the treasure effect is active, or both are active.

Let's see all the percentages for all our four outcomes. So back to our chances:

For Snow Blossom:
 * Active Chance (x) = 75%
 * Inactive Chance (x') = 25%

For Snow Blossom's Sparkling Crust:
 * Active Chance (y) = 30%
 * Inactive Chance (y') = 70%

From here, we will use the variable to detect which probability should we use. It's simple. If we want to count the chances that only Snow Blossom's ability is active, use Snow Blossom's active chance and the treasure's inactive chance, and multiply it. You will get the probability that you want. Here are the table for all outcomes that we discussed.

Therefore, the 82.5% that the holes will be covered consist of 52.5% from Snow Blossom, 7.5% from the treasure, and 22.5% by both.

Hopefully this can help you calculate a stacking abilities, and how it can be counted by probability.