Recently, I have read a post from a forum which calculate the probability of getting 20 wins in No tilt in Clash Royale. IMO, this is a clever, and objective way to tell others that how hard, and how valuable to get 20 wins from No tilt!
For example, even you are top players with 80% win rate, you still only get 15.45% chance for having 20 wins. For modest players with 60% win rate, you only have 0.16% for having 20 wins!
Since the author does not expose the formula for the calculation, I would like to find it out here due to curiosity.
For Chinese readers, you can take a look the spreadsheet I wrote here
Facts
Before the calculations, we need to know following facts:
- At most 20 wins
- In any time, you can have at most 3 loses
- You always start from 0 wins
Calculation
I strongly recommend you to cross check with the spreadsheet while reading below steps.
Step 0: Denote symbols
For brevity, we denote following symbols
W: Win rate. Chance to win a match
L: Lost rate. Chance to lose a tournament (IE 3 loses)
X: Number of wins in a tournament
N: Number of matches
Step 1: Define the win rate
To determine the probability for you to get 20 wins, we need the win rate of yourself. Generally, you can pick this up from your player’s statistic.
Step 2: Calculate the lose rate
L = (1-W)(1-W)(1-W)
This value is essential for us to calculate following 3 interested probabilities:
- Probability of only X wins
- Probability of at most X wins
- Probability of at least X wins
Step 3: Probability of only X wins
Generally, we just need to pay attentions on 3 scenarios before we can deduce a formula to fit P(only x wins)
- P(0 win)
- P(Only 1 win)
- P(Only 2 wins)
Step 3.1: P(0 win)
Probability for 0 wins equals to the Lose rate. IE, you lose 3 consecutive times since the tournament start.
P(0wins) = L
Step 3.2: P(Only 1 win)
You get 1 win, and lose 3 times.
P(wlll) = LW
Recall the combination theory you learn from secondary school, you can also get following combinations for achieving 1 win 3 loses.
- wlll
- lwll
- llwl
- lllw
The last one (lllw), however, is an invalid combination due to facts above. So, we need to cross out it. Finally, the result will be like this:
P(1w3l) = p(wlll) + p(lwll) + p(llwl) = WL * 3
Step 3.3: P(Only 2 wins)
- Firstly, we need to calculate the probability of wwlll first.
P(wwlll) = LWW
- Then, we just need to sum up valid combinations of 2 wins 3 loses in order to get the result we need.
P(wwlll) = LWW * Z, where Z is number of valid combinations.
The question is how to determine Z? Luckily, we can rely on Combinations Calculator (nCr) to do the mathematics for us.
The combinations of 5 matches with 3 loses = 5C3 = 10
- Thirdly, we need to minus invalid combinations (LLL, LWLL, LLWL, LLLW) from above combinations:
Number of valid combinations = 5C3 - 4 = 5C3 - 4C3
- Finally, we have following results
P(2W3L) = WWLLL (5C3 - 4C3) = WWLLL 6
Step 3.4: P(Only X wins)
It is obvious that there are 2 factors in the formula:
- First part is the x win in N
- Second part is how many of valid combinations for x win in N
The first part can be deduced as L(W)^x.
The second part can be deduced as (N)C3 - (N-1)C3 since number of invalid combinations for N matches equals to the valid combination for (N - 1) matches.
Finally, we have
P(Only x win) = L(W)^x * ((x+3)C3 - (x+3-1)C3)
Step 4: P(at most X wins)
Since we know P(only x wins), we can calculate probability of at most X wins by following:
P(at most 0 win) = P(0 win)
P(at most x win) = P(only x win) + P(at most (x-1) win), for x ranges from 1 to 20
Step 5: P(at least X wins)
Since we know P(at most x win), and P(only x win), we can calculate P(at least X wins) as following:
P(at least 0 win) = 1
P(at least x win) = P(at least (x-1) wins) - P(only (x-1) win)
Congratulation. That’s the end of the calculation.
At last
If you can read up to here, thanks for the reading. I hope you enjoy the path for solving the probabilities by ourselves especially that no ones want to explain just like the comments in the original forum post.
沒有留言:
張貼留言