Log5

Log5 is a method of estimating the probability that team A will win a game against team B, based on the odds ratio between the estimated winning probability of Team A and Team B against a larger set of teams.

Let $$p_A$$ and $$p_B$$ be the average winning probabilities of team A and B and let $$p_{A,B}$$ be the probability of team A winning over team B, then we have the following odds ratio equation

$$\frac{p_{A,B}}{1 - p_{A,B}} = \frac{p_A}{1 - p_A}\times \frac{1 - p_B}{p_B}.$$

One can then solve

$$p_{A,B} = \frac{p_A-p_A\times p_B}{p_A+p_B-2\times p_A\times p_B}.$$

The name Log5 is due to Bill James but the method of using odds ratios in this way dates back much farther. This is in effect a logistic rating model and is therefore equivalent to the Bradley–Terry model used for paired comparisons, the Elo rating system used in chess and the Rasch model used in the analysis of categorical data.

The following notable properties exist:
 * If $$p_A = 1$$, Log5 will give A a 100% chance of victory.
 * If $$p_A = 0$$, Log5 will give A a 0% chance of victory.
 * If $$p_A = p_B$$, Log5 will give each team a 50% chance of victory.
 * If $$p_A = 1/2$$, Log5 will give A a $$1-p_B$$ probability of victory.
 * If $$p_A + p_B = 1$$, Log5 will give A a $$(p_A)^2/((p_A) ^ 2 +(p_B)^ 2)$$ chance of victory.

Additional applications
In addition to head-to-head winning probability, a general formula can be applied to calculate head-to-head probability of outcomes such as batting average in baseball.

Sticking with our batting average example, let $$p_B$$ be the batter's batting average (probability of getting a hit), and let $$p_P$$be the pitcher's batting average against (probability of allowing a hit). Let $$p_{L}$$ be the league-wide batting average (probability of anyone getting a hit) and let $$p_{B,P}$$ be the probability of batter B getting a hit against pitcher P.

$$p_{B,P} = \frac{\frac{p_B\times p_P}{p_L}}{\frac{p_B\times p_P}{p_L} + (1 - p_B)\times \frac{1-p_P}{1-p_L}}.$$

Or, simplified as

$$p_{B,P} = \frac{p_B \times p_P \times (1 - p_L)}{(p_B \times p_P) - (p_L \times p_B) - (p_L \times p_P) + p_L}.$$