Wednesday, 18 March 2009

The Ratio Equation.

Fascinating post from Clan of one Man at the COD forums about the maths behind the kill:death ratio.

The full post is here, but I'll put the whole thing below anyway (not sure if you have to register to see the forum).


Mathematical PROOF that K/D Ratio Does NOT Equal Skill

I will begin by working through a specific example with numbers (Part 1). This is the easiest way for most people to understand the underlying logic behind the mathematical arguments. After that, I will solve the equations for the completely general case (Part 2). This will demonstrate that the arguments are valid, regardless of the specific numbers involved.

------------------------------------------------------------------------------------------------------------
OVERVIEW


Edit: Since people seem to be getting upset, let me explain the jist of the idea first. Your spread is really what is important when considering how effective you are as a player. You would rather have a player who is +10 than a player who is +5 regardless of the K/D. As an example, would you rather have a teammate who goes 6/1 (+5, 6:1 K/D) or one who goes 20/10 (+10, 2:1 K/D). I think the answer to that question is pretty obvious. I have derived a formula to express your average spread as a function of Kills per Minute and Kills/Deaths. It turns out that a player with a lower K/D can have a better average spread if his KpM is higher. If all other factors are EXACTLY equal, the player with the better average spread will win the game. This means that average spread is a better indicator of player skill than K/D. Don't get me wrong, it is obvious that K/D and player skill are highly correlated. I am just saying that K/D is a poor predictor of performance unless it is qualified by the amount of time in which that ratio is achieved. K/D is not the end all be all predictor of how good you are as a player that many people think it is. Like all statistics, this will have to be calculated individually for each game type to be meaningful. You can't compare apples to oranges.

------------------------------------------------------------------------------------------------------------
DEFINITIONS


Spread : This is the quantity (Kills - Deaths) for a particular player in a particular match

KpM : This is the average kills per minute over a players entire gaming career. It is their total Kills divided by their play time in Minutes

K/D : This is the average Kill to Death ratio over a players entire gaming career. It is their total Kills divided by their total Deaths.

X : For the sake of this argument, X will represent the elapsed time for a particular match in minutes

----------------------------------------------------------------------------------------------------------

PART 1

Let us consider two players. We will call them player A and player B. Player A has an outstanding 2.0:1 K/D ratio and averages 1.5 KpM. Player B has a very respectable 1.6:1 K/D ratio and averages 2.1 KpM. Both players are on the 10th prestige. They each have thousands of games played and more than 16 days of play time. As a result, their respective K/D ratios are fixed and have not changed in several hundred games.

One day, player A decides to get a group of friends together and challenge player B to a friendly game of Team Death Match. Player B accepts the challenge and gets his own group of friends together. Everyone checks the enemy teams stats while waiting in the pre-game lobby. As it turns out, both teams have exactly identical stats except for player A and player B. The match begins with player A's team feeling sure of their victory since player A is "better" than player B.

Now we will assume that we are living in an ideal mathematical world. This means that everyone will always perform exactly according to their statistics. The match progresses and finally draws to a close with player B's team being the victor. Player A thinks "that was just a coincidence" and challenges player B's team to a rematch. They end up playing 100 games and player B's team wins every time. Player A is finally forced to accept that player B has the better team but cannot understand how this is possible. Player B then explains.

Remember that we are living in an ideal mathematical world. Since both teams have identical statistics (except for player A and player B) both teams will always put out identical performances. Therefore, the outcome of the match is solely determined by the performance of player A and player B.

Now we must compare the performance of player A and player B to determine the winner. Please note that not every match will end in the score limit being reached. I am sure that everyone has played in a match where the time limit was reached before the score limit was reached. As a result, we need more information than just K/D to determine the winner. The other piece of information that we need is the average Kills per Minute (KpM).

In examining player performance, we must take into account both the player's kills and the player's deaths. The player with the better spread will win the game. We will now define Spread:

Spread = Kills - Deaths

Both the amount of Kills and Deaths are dependent upon the length of the match. We can determine the kills as follows:

Kills = KpM*X - where X is the length of the match in minutes

Similarly, the number of deaths can be expressed by the total Kills divided by the K/D ratio. A quick dimensional analysis verifies this expression (K/1)/(K/D) = (K*D)/K = D. We then have:

Deaths = (KpM*X)/(K/D)

The expression for the player's spread at any arbitrary time X is then given by:

Spread(X) = KpM*X - (KpM*X)/(K/D)

For the sake of example, lets assume that the score limit was not reached. The match had a 10 minute time limit.

Player A: KpM = 1.5, K/D = 2.0
Spread(10) = (1.5*10) - (1.5*10)/(2) = +7.5

Player B: KpM = 2.1, K/D = 1.6
Spread(10) = (2.1*10) - (2.1*10)/(1.6) = +7.875

Remember that the performance of both teams are identical except for player A and player B. We can clearly see that player B's team wins by the slimmest of margins, despite player B having a much worse K/D than player A! Note that our argument remains self consistent. Player A still had a K/D of 2.0 for the match and player B still had a K/D of 1.6. Both players performed exactly as predicted by their statistics yet player B was the victor. As I will discuss in the next section, player B's team will always win, regardless of the length of the match.

------------------------------------------------------------------------------------------------------------

Part 2

We can easily examine the spread of each player as a function of any arbitrary time X. Simply grab a graphing calculator and enter in the two equations for spread as follows:

Player A:
Y1 = (1.5*X)-(1.5*X)/2

Player B:
Y2 = (2.1*X)-(2.1*X)/1.6

The time is plotted along the X axis. The player's spread is plotted along the y axis. Note the form of the equation for spread. Both terms in the equation are directly proportional to X. This means that when time = 0, spread = 0. This is what you would expect since you can't kill anyone before the match has started. Note that the plot of spread is linear with intersection at X = 0. This means that at any time X>0 the equation with the greater slope will have the greater spread. In other words, player B's team will always win, regardless of when the match ends.

From the above arguments, it is clear that what really determines the winner of the game is the slope of the player's spread as a function of time. In the most general case:

Spread(X) = KpM*X-(KpM*X)/(K/D)

The slope is then given by the first order time derivative of the spread, ds/dx

ds/dx = KpM - KpM/(K/D)

We will call this new quantity (ds/dx) the "effective impact" that a player will have on the game. The effective impact is a far better predictor of player performance than either K/D or KpM alone. Like all of our current statistics for WaW, this quantity should be calculated independently for each game type and then once overall. The accuracy of this quantity could be improved by some relatively simple statistical techniques. Any proper matchmaking system should rate players with a complex formula (similar to the way the BCS works in college football) that utilizes the effective impact as one of its cornerstones. The teams could then be divided up according to the player ratings to provide the closest possible match of skill.

Now that we have finished our analysis, lets take a moment to go back and qualify our assumptions. We have assumed that we are living in a perfect mathematical world when clearly we are not. Player performance is highly variable from game to game. The results of any given game are questionable at best. However, we can be reasonably confident in the accuracy of the K/D ratio and KpM once enough data has been acquired. If we assume these numbers are close to their "true" values, then the results of many matches between player A and player B will be accurately predicted by their effective impact on the game.

In conclusion:

Let us define player "skill" as the ability to win the game. We can clearly see that player skill is correlated to K/D ratio. However, K/D ratio alone is an extremely poor predictor of player performance and must be qualified by the time in which that ratio was achieved.

No comments:

Post a Comment