Simple linear regression

Enter the paired x and y values.

Result
No result yet.

For x = 1, 2, 3 and y = 2, 4, 6 the line is y = 2x.

Example

Fit a straight line to paired data with least squares.

For x = 1, 2, 3 and y = 2, 4, 6 the line is y = 2x.

Processed locally in your browser.

Methodology

The line minimizes the sum of squared vertical residuals.