It works by plotting the two cumulative distribution functions against each other; if they are similar, the data will appear to be nearly a straight line.
The degree of deviation makes it easy to visually identify how different the distributions are, but because of sampling error, even samples drawn from identical distributions will not appear identical.
[2] As an example, if the two distributions do not overlap, say F is below G, then the P–P plot will move from left to right along the bottom of the square – as z moves through the support of F, the cdf of F goes from 0 to 1, while the cdf of G stays at 0 – and then moves up the right side of the square – the cdf of F is now 1, as all points of F lie below all points of G, and now the cdf of G moves from 0 to 1 as z moves through the support of G. (need a graph for this paragraph) As the above example illustrates, if two distributions are separated in space, the P–P plot will give very little data – it is only useful for comparing probability distributions that have nearby or equal location.
However, it has found some use in comparing a sample distribution from a known theoretical distribution: given n samples, plotting the continuous theoretical cdf against the empirical cdf would yield a stairstep (a step as z hits a sample), and would hit the top of the square when the last data point was hit.
The resulting goodness of fit of the 45° line gives a measure of the difference between a sample set and the theoretical distribution.
A P–P plot can be used as a graphical adjunct to a tests of the fit of probability distributions,[4][5] with additional lines being included on the plot to indicate either specific acceptance regions or the range of expected departure from the 1:1 line.