# Statistics question to apply bell curve to formula

I am trying to write a formula that would give a person a score, based on a formula.

It's for a video game, and I have worked up a formula using aggregate stats like total kills divided by total deaths, win percentage, etc. They are all ratios.

I also would like to multiply this by the number of games that they have played, but I am finding this dramatically effects the score when people have massive amounts of games.

How would I normalize this over my population?

For instance:

Score = (Kills / Deaths) * (Wins / Games) * ( Games )

Is there anyway to give people credit for doing well over many games? I have people with 5000 games that have a massive score, even though the stats used in the rest of the formula are very bad. I don't want to do 5000 / 2 or 5000 / .1 because the problem persists. I'd like to somehow apply a normal distribution

Thanks

-
Note that (Kills / Deaths) * (Wins / Games) * Games = (Kills / Deaths) * Wins. If you first divide and then multiply by Games, they cancel out (assuming Games ≠ 0). –  Ilmari Karonen Jul 19 '11 at 13:51
Just to clarify what you're asking for: would you prefer a player with 6000 wins out of 10000 games to have a significantly higher score than one with 600 wins out of 1000 games, or should their scores be about equal? And what if the win counts were 2000 and 200 respectively? –  Ilmari Karonen Jul 19 '11 at 15:39
The more games, their score would be slightly higher for holding such a good win percent. But it's hard to find a formula to be 'slightly', it's a lot higher. I need a way to slow down gain, but keep some gain, not nullify their efforts. –  bladefist Jul 27 '11 at 20:19
In that case, Gortaur's $G^\alpha$ solution looks good. If you want even slower growth, you could also try $S = \frac K D \frac W G \log(G)$. –  Ilmari Karonen Jul 27 '11 at 21:29

So you would like to make a fair score. You're right, for a person who played too many games but still is not a good player, your score is not fair. This also depends on the information which you would like to store.

1. If you store only total of: $K$ (kills), $D$ (deaths), $W$ (wins) and $G$ Games then your current score $S_1$ is $$S_1 = \frac KD W$$ so it does not depend on how often the player wins. I would advise to use here $$S_2 = \frac KD \frac WG$$ which takes into account both personal-performance $\frac KD$ and team-performance $\frac WG$. What is the drawback of $S_2$ is that people who played couple of times but were lucky will have a high score, while good players with pure performance in the beginning will have the low score. Maybe that was the reason why you included $G$ in the formula. To avoid this situation you can also use $$S_3 = \frac KD \frac WG (G)^{\alpha} = \frac KD \frac {W}{G^{1-\alpha}}$$ for $\alpha<1$. Then the overall number of games will still have the influence but less than the team-performance ratio $\frac WG$.

2. Finally, if you can also store the history of last $n$ games, where e.g. $n = \frac N2$ and $N$ is an average number of games for all players, then you can build up the score by $$S_4 = \frac{K_n}{D_n}\frac{W_n}{G_n}$$ which takes into account only the last performance (e.g. here $K_n$ is the number of kills for the last $n$ games only).

Anyway, if you formulate what do you want to take into account, I hope the help will be more useful.

By the way, with regards to normal distribution: roughly speaking you use it to find an average accumulated over some "center" point. I do not think it's useful in you problem, you better can use Poisson-like distribution to assign less importance to the last games and more importance to new ones.

-
Noob Question: In your example, what is alpha? Is it a constant or a derived value? –  bladefist Jul 19 '11 at 14:10
@bladefist: $\alpha = 0.5$ for example. You can take whatever value you want in $[0,1)$. The bigger $\alpha$ the importance total number of games has. –  Ilya Jul 19 '11 at 14:24
Thanks for your help, I got some more to figure out but this has given me a great start –  bladefist Jul 19 '11 at 18:31

If you're worried about users with few games skewing your statistics (such as a user with one game and one win having a 100% wins-per-game ratio), part of the solution might be to use the rule of succession to estimate the "true" wins per game ratio as $$P_\text{win} = \frac{\text{Wins}+1}{\text{Games}+2}.$$

In effect, this is equivalent to adding one extra win and one extra loss to each player's statistics; from a Bayesian perspective, it is equivalent to assuming that any wins-per-game ratio is equally likely a priori (such that a random new player with no games would be expected to have a 50% wins-per-game ratio on average). You can tweak the number of "extra" wins and losses (known as pseudocounts), possibly to fractional or even negative values, if you want to adopt some other beta distribution as the prior.

-
This was an issue, so we put a minimum games required for a score. My biggest problem is people with massive numbers of games. I can't use a negative pseudocount because some people have min games, some people have had up to 10,000 –  bladefist Jul 19 '11 at 14:33