Construct a probability–probability plot with an explicit plotting-position rule, then read its center and tail limits without confusing it with a Q–Q plot.
P–P plots: compare observed probabilities with a fixed reference CDF
Ask a probability-scale question
A P–P plot checks whether an observed distribution agrees with a specified cumulative distribution function. Sort the observations. For each ordered value, put the reference CDF probability on one axis and an empirical plotting position on the other. If the two distributions agree, the points follow the diagonal within sampling variation. Both axes run from zero to one, so the coordinates are comparable across measurement units. This is a descriptive diagnostic, not a certificate that a model is correct. State which axis carries which probability: the sign of a deviation reverses if the axes are swapped. A persistent arc above the diagonal means the empirical cumulative share exceeds the proposed reference at those thresholds; it does not by itself name a physical cause. Empirical CDFs show the same cumulative story against measured values, while Q–Q plots put values rather than probabilities on the axes.
Fix the reference before inspection
Choose the reference distribution and its parameters from an external specification, an earlier frozen baseline or a fitting procedure whose use is declared. If mean and spread are estimated from the same sample, the resulting P–P points are drawn closer to the reference by construction; a line that looks good is then weaker evidence. Fitting after spotting a discrepancy compounds the problem. For a fresh validation set, keep the baseline version and population definition fixed. The worked contract uses a normal reference with a predeclared center of 71 and spread of 20. A normal CDF can assign probability to impossible negative values when the underlying measure cannot be negative, so choose a reference family consistent with the measurement domain. The plot should carry the exact center, spread, sample count and reference revision. Chart export metadata and unit-of-analysis rules make that comparison repeatable.
Declare a plotting position and treat ties honestly
For N sorted observations this lesson uses the midpoint position (rank minus one half) divided by N. It stays inside the open interval and gives every observation one ordinate. Other conventions are valid, but changing conventions moves the endpoints, especially when N is small. If measured values tie because a sensor rounds to whole units, several observations share a reference-CDF coordinate while their plotting positions differ. That vertical run is data, not a rendering error. If the reference has discrete jumps, the continuous midpoint convention requires a more careful discrete diagnostic; do not interpret the diagonal with continuous-case intuition. Missing, infinite and mixed-unit values must be resolved before sorting. Histograms can reveal rounding and mass points that a probability plot hides, and small-sample guidance keeps isolated deviations in perspective.
Know what a probability scale suppresses
Because both axes are bounded by zero and one, P–P plots are often easy to read through the center of a distribution. They compress extreme-value differences: a large change in the far tail may correspond to a tiny probability change near zero or one. Use a Q–Q plot or an explicit tail exceedance display when the operating decision depends on rare extreme values. Do not silently crop the first and last points; doing so makes a bad fit look quieter. Keep a square plotting region, equal numeric scales and a visible forty-five-degree reference line. An accessible companion table can list measured threshold, proposed CDF, empirical position and their difference. For two populations, use comparable panels or a stated two-sample construction rather than passing one estimated empirical CDF off as an independent fixed standard. Shared-scale panels and text alternatives preserve the evidence.
Worked contract
from math import isfinite
from statistics import NormalDist
def probability_probability_points(
response_ms: list[float], reference_center: float,
reference_spread: float,
):
if (not response_ms or not isfinite(reference_center) or
not isfinite(reference_spread) or reference_spread <= 0 or
any(not isfinite(value) for value in response_ms)):
raise ValueError("finite observations and a positive reference spread are required")
reference = NormalDist(mu=reference_center, sigma=reference_spread)
ordered = sorted(response_ms)
sample_size = len(ordered)
return [(value, reference.cdf(value), (rank - 0.5) / sample_size)
for rank, value in enumerate(ordered, start=1)]
latency_sample = [59.0, 71.0, 83.0, 71.0, 97.0]
points = probability_probability_points(latency_sample, 71.0, 20.0)
assert [row[0] for row in points] == [59.0, 71.0, 71.0, 83.0, 97.0]
assert [row[2] for row in points] == [0.1, 0.3, 0.5, 0.7, 0.9]
assert points[1][1] == points[2][1] == 0.5
assert points[0][1] < 0.5 < points[-1][1]Performance and operating cost
For N observations, validation is O(N), sorting is O(N log N), and one reference-CDF evaluation per row is O(N) under the standard constant-cost numerical model. The returned ledger and sorted copy require O(N) space. The five-value arithmetic check includes a repeated 71-millisecond reading: two points share reference probability 0.5 but occupy different empirical positions, 0.3 and 0.5. Five records are not enough to judge distributional fit; gather a representative, independently selected validation sample before interpreting the shape. A displayed diagonal is an expected relationship, not a formal acceptance test or a confidence band.
Common Mistakes
- Calling a P–P plot a Q–Q plot while labeling its axes in measurement units.
- Estimating reference parameters on the inspection sample without disclosing the fit.
- Treating tied measured values as duplicates to delete before assigning ranks.
- Using center-focused visual agreement to dismiss a consequential extreme tail.
Validation drill
Freeze a 71-millisecond center and 20-millisecond spread from a prior release. Plot 83 new, independently selected response times using midpoint positions; include an accessible table and compare the tail diagnosis with a Q–Q plot before changing the reference.
