# Pairwise Probability Equation

The paper, Learning to Rank using Gradient Descent, notes an equation in Section 3.1 which gives

Equation (4):

$\mathbf{P_{ij}} = \frac{e^{x_{ij}}}{1 + e^{x_{ij}}}$

And states

Given $\mathbf{P_{ij}}$ and $\mathbf{P_{jk}}$ and gives Equation (5):

$\mathbf{P_{ik}} = \frac{\mathbf{P_{ij}}\mathbf{P_{jk}}}{1 + 2\mathbf{P_{ij}}\mathbf{P_{jk}} - \mathbf{P_{ij}} - \mathbf{P_{jk}}}$

How did the authors get from Equation (4) to Equation (5) given $\mathbf{P_{ij}}$ and $\mathbf{P_{jk}}$?

• What have you done so far? Did you try to substitute the values of $P_{ij}$ and $P_{jk}$ on the right side and try to simplify it? – Kavi Rama Murthy Jun 13 '18 at 6:07
Authors also say that $x_{ij} = x_i-x_j$. So $$P_{ij} = \frac{e^{x_i-x_j}}{1 + e^{x_i-x_j}} = \frac{1}{1 + e^{x_j-x_i}} = : \frac{1}{Q_{ij}},$$ where we denote $Q_{ij} = 1 + e^{x_j-x_i}$. It's easy to see that $$Q_{ij}Q_{jk} + 2 - Q_{ij} - Q_{jk} = Q_{ik},$$ so $$\frac{P_{ij}P_{jk}}{1 + 2P_{ij}P_{jk} - P_{ij} - P_{jk}} = \frac{1}{Q_{ij}Q_{jk} + 2 - Q_{ij} - Q_{jk}} = \frac{1}{Q_{ik}} = P_{ik}.$$