# Ordinary Regression and Orthogonal Regression in the Plane

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

Fitting a straight line to a given collection of points in the plane may be accomplished using different criteria, the most commonly used being the minimization of the sum of the squares of the vertical distances from each point to the line (ordinary regression). Another criterion is to minimize the sum of the squares of the perpendicular distances between each point and the line (orthogonal regression). Try to determine visually the lines of best fit (blue for ordinary regression, and red for orthogonal regression) by varying the respective intercepts and slopes with the sliders. For each point, the dashed blue segment joins it vertically to the blue line, while the dashed red segment connects it orthogonally to the red one. Pressing the button will yield the two lines of best fit.

Contributed by: Tomas Garza (March 2011)

Open content licensed under CC BY-NC-SA

## Snapshots

## Details

detailSectionParagraph## Permanent Citation

"Ordinary Regression and Orthogonal Regression in the Plane"

http://demonstrations.wolfram.com/OrdinaryRegressionAndOrthogonalRegressionInThePlane/

Wolfram Demonstrations Project

Published: March 7 2011