Orthogonal Regression — Definition, Formula & Example
Orthogonal regression is a way to fit a straight line to paired data by making the perpendicular distances from the points to the line as small as possible. It treats x and y symmetrically, so it suits data where both variables contain measurement error.
For data , the orthogonal regression line minimizes the sum of squared Euclidean distances from the points to the line, . The minimizing line passes through . Its direction is the eigenvector of the scatter matrix for the largest eigenvalue, and the minimum sum equals the smallest eigenvalue. For a line in two variables, this method is the same as total least squares and the same as Deming regression with an error-variance ratio of 1.
Key Formula
Where:
- = Sum of squared deviations of x:
- = Sum of squared deviations of y:
- = Sum of cross-products: , assumed nonzero
- = Slope and y-intercept of the orthogonal regression line
- = Means of the x-values and the y-values
Worked Example
Problem: Both variables in the data (1, 3), (2, 4), (3, 5), (4, 10), (5, 8) were measured with error. Find the orthogonal regression line. Then compare its total squared perpendicular distance with that of the ordinary least-squares line.
Step 1: Find the means. Then find the three sums of deviations. The y-deviations are .
Step 2: Substitute into the slope formula. Then use the centroid to find the intercept.
Step 3: The vertical gaps from the line are . Divide their squared total by to get the squared perpendicular distances. The result, 2, equals the smaller eigenvalue of the scatter matrix. The least-squares line gives a larger perpendicular total, about 2.36.
Answer: The orthogonal regression line is . Its sum of squared perpendicular distances is 2, the smallest possible for any line. Its slope of 2 lies between the y-on-x least-squares slope (1.6) and the slope implied by regressing x on y ().
Why It Matters
Labs use orthogonal (Deming) regression in method-comparison studies. For example, a lab may check whether a new blood-glucose meter agrees with a reference instrument, and both instruments have measurement error. Ordinary least squares would underestimate the slope in that setting. The orthogonal line also points along the first principal component, so it is the two-variable case of principal component analysis.
Common Mistakes
Mistake: Applying orthogonal regression when x and y are in different units, such as inches and pounds, and treating the result as unit-free.
Correction: Perpendicular distance mixes the two units, so the fitted line depends on the scales you choose. Switching x from inches to feet changes the line itself, not just how its slope is labeled. Use the method when both variables share units and have similar error sizes. Otherwise, standardize the variables first or use Deming regression with a known error-variance ratio.
