lackattack wrote:Very interesting. I think "farang%" might have the best qualities then:
* Goes from 0% to 100% (well, I suppose 99% is max) where 50% is "average"
* Weighs in difficulty of wins and difficulty of losses
Downside #1: Hard to compute. Can anyone derive a formula or algorithm for this?
NOTE: In the meantime I've found a simpler, more practical way to approximate the percentile and I have described this practical method in one of the following posts. Read this post at your own risk if you are interested in how to find the exact calculation out of pure mathematical curiosity, because it is too tedious to code and does not scale for large numbers of games.
Calculation of expectation uses binomial probability.
Probability of k successes in n trials with each trial having probability of success p:
P_n(k)=(n choose k) * p^k * (1-p)^(n-k)
What makes our problem a little more difficult is that we can have 7 different values of p floating around at the same time (1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8). For example, to calculate the probability of winning 10 games from 6 2-player games and 7 3-player games, you could get 10 wins four different ways: (6-4), (5-5), (4-6) or (3,7) where the first number means 2-player wins and the second number means 3-player wins. So it is necessary to implement the above function multiple times with different parameters and then sum up the results to determine the probability of getting that many wins any which way. I think creative construction of FOR loops could automatically do this.
Next is an example of how to use Binomial Theorem to do the exact calculation using multiple p-values. So if you have two 3-player games and one 8-player game...
note: P(n,k,p) below refers to the binomial probability formula above
P(3-0) = p(win 2 of 2 3-player games) * p(win 1 of 1 8-player games) = P(n=2, k=2, p=1/3) * P(n=1, k=1, p=1/8)
P(2-1) = p(win 2 of 2 3-player games) * p(win 0 of 1 8-player games) + p(win 1 of 2 3-player games) * p(win 1 of 1 8-player games) = P(n=2, k=2, p=1/3) * P(n=1, k=0, p=1/8) + P(n=2, k=1, p=1/3) * P(n=1, k=1, p=1/8)
P(1-2) = p(win 1 of 2 3-player games) * p(win 0 of 1 8-player games) + p(win 0 of 2 3-player games) * p(win 1 of 1 8-player games) = P(n=2, k=1, p=1/3) * P(n=1, k=0, p=1/8) + P(n=2, k=0, p=1/3) * P(n=1, k=1, p=1/8)
P(0-3) = p(win 0 of 2 3-player games) * p(win 0 of 1 8-player games) = P(n=2, k=0, p=1/3) * P(n=1, k=0, p=1/8)
SIMPLE APPROXIMATION THAT MIGHT WORK
To avoid this complexity, a simple approximation we could try out would be to limit the problem to just one probability of winning p = geometric mean of the probabilities of winning each game played. That would mean if you played 2 3-player games and 1 8-player game, p = 3rd root of ( (1/3)^2 * (1/8)^1) = 0.24
Then you don't have to write all those FOR loops, you just use the binomial probability formula once to compute the probability of winning k times. Sum all the probabilities of all the k-values below your score to determine your percentile.
P_n(k)=(n choose k) * p^k * (1-p)^(n-k)
Comparison
exact vs approx
3-0 = 99th vs 99th
2-1 = 84th vs 85th
1-2 = 39th vs 44th
0-3 = 0th vs 0th