When two measurement processes are used to measure the same set of objects, the readings on both the horizontal and the vertical axis may deviate from their respective true values. Deming regression brings the measurement errors on both sides into the line fit, but it first needs to know, or estimate, the relative size of the two error variances. Setting this ratio to 1 means assuming that the measurement error variances on the two axes are equal, not merely acknowledging that both axes have error.[1]

First define the errors on both sides

Let ξᵢ be the latent true value on the horizontal axis for the i-th object, with the two observations satisfying xᵢ = ξᵢ + τᵢ and yᵢ = a + bξᵢ + εᵢ. Here a and b describe the straight-line relationship between the latent true values, and τᵢ and εᵢ are the errors of the X and Y measurement processes, respectively. The classical model assumes that the errors have mean zero, that the errors of the two processes are independent of each other, and that each has constant variance; the NIST documentation also builds the model on normal errors.[1]

This article consistently writes λ = σ²ε/σ²τ, the Y measurement error variance divided by the X measurement error variance. λ = 1 means the two variances are equal; λ = 0.25 means the error variance of Y is one quarter that of X. The ratio that the NIST page writes in terms of replicate-measurement variances, δ = s²τ/s²ε, runs in the opposite direction from the one used here, so the correspondence is δ = 1/λ. Before using a reference or a piece of software, check how the ratio is defined before entering a number.[1]

Why does this ratio change the line?

An ordinary least squares fit usually minimizes only the sum of squared vertical residuals. A Deming fit instead uses the relative size of the errors on the two axes to decide how a point's departure from the line should be apportioned between horizontal and vertical deviations. After the latent true value of each object is eliminated, this can be understood through the objective ∑(yᵢ − a − bxᵢ)²/(σ²ε + b²σ²τ): the denominator contains both the Y error variance and the X error variance converted through the slope.

Let Sxx = ∑(xᵢ − x̄)², Syy = ∑(yᵢ − ȳ)², and Sxy = ∑(xᵢ − x̄)(yᵢ − ȳ). Under the conditions of this example, Sxy > 0 and λ > 0, the Deming slope is b̂ = [Syy − λSxx + √((Syy − λSxx)² + 4λSxy²)]/(2Sxy), and the intercept is â = ȳ − b̂x̄. The formula shows directly that, with the observed points unchanged, changing λ alone changes the fitted result.

When the two axes use the same scale and the error variances are equal, λ = 1 gives horizontal and vertical deviations symmetric standing. It is not an automatic consequence of "both axes have error." For example, if only the Y readings and their errors are rescaled to 10 times their original values, the Y error variance becomes 100 times as large, and λ must be multiplied by 100 accordingly; otherwise a change of units would change the fitting assumption along with it.

The same simulated data, different error ratios

Next, 30 pairs of simulated observations are generated: the latent ξ lies on an evenly spaced grid from 0 to 10, and the latent relationship is y* = 1 + 1.5ξ; independent normal errors with standard deviations 1.2 and 0.6 are added to X and Y, respectively. The λ used in generating the data is therefore 0.6²/1.2² = 0.25, corresponding to δ = 4 in the NIST notation. The random seed is 20261120.

Scatter plot of simulated measurements comparing the dashed generating relationship with the ordinary least squares line and three Deming fitted lines

An actual computation on 30 pairs of simulated measurements, seed 20261120; λ = σy²/σx², generating value 0.25 (corresponding to NIST δ = 4), comparing OLS with Deming lines for different λ. The lines for different λ are a sensitivity illustration, not calibration results from several actual instruments.

The centered sums for these data are Sxx = 278.339, Syy = 584.868, and Sxy = 379.891. Keeping the data unchanged and substituting each of the three error ratios gives:

Fit or assumption λ in this article: Y/X error variance NIST δ: X/Y error variance Slope Intercept
Deming 0.25 4 1.521 0.417
Deming 1 1 1.482 0.625
Deming 4 0.25 1.422 0.944
Ordinary least squares — — 1.365 —

In this one simulation, using the λ = 0.25 with which the data were generated gives a slope of 1.521, close to the generating slope of 1.5; setting it to 1 or 4 changes the slope to 1.482 and 1.422, respectively. The three Deming lines use the same set of points, and the differences come from the assumption about the measurement error ratio. This finite sample shows that the assumption affects the result; it cannot be used to assert that fitting with the correct λ will always come closer to the generating slope than ordinary least squares does.

Where does the error variance ratio come from?

One route is to take replicate measurements of X and of Y on the same objects: first compute the mean of each object's replicate readings, then pool the squared deviations of the readings around their own means, and compute the error variance using each process's replicate-measurement degrees of freedom. The number of replicates need not be the same on the two sides, but every object needs replicate readings under each process. Finally, following the direction used in this article, divide the estimated Y error variance by the X error variance.[1]

Error variance information from an independent precision study or an existing measurement model can also be used. The key is that this information must correspond to the current measurement processes, units, and conditions. The overall spread across different objects, Syy/Sxx, cannot be taken directly as the measurement error variance ratio: true differences between objects also enter these two measures of spread. When there are no prior variance estimates and no replicate data, NIST Dataplot provides a default ratio based on the overall spread, but the default cannot by itself identify the true measurement error ratio.[1]

If the available evidence can give only a plausible range, choose several values of λ within that range, report the slope and intercept for each, and see whether the conclusion changes with them. The range should come from precision information or a measurement model, not from fitting once and then picking the slope one likes best. If the conclusion is sensitive to λ within the plausible range, the next step is more informative replicate measurements or a precision study.

References

  1. [1] NIST Dataplot. Deming Fit / Deming Regression.