curve.fit

Linear

A straight line. Use it for proportional relationships, calibration lines and any data you expect to change at a constant rate.

Fit the example dataStart with your own data

Example: Pearson’s data with York’s weights, 10 points with x and y uncertainties, opened as a new copy you can edit.

Parameters

Slope: the change in y per unit of x.
Intercept: the value of y at x = 0.

Tips

  • With δx selected, curve.fit uses orthogonal distance regression, so uncertainties in x count as well as uncertainties in y.
  • To force the line through the origin, enter 0 as the Guess for b and check Fix.
  • When x = 0 is far from your data, b is an extrapolation: its uncertainty is large and strongly correlated with m.

Related models

Guide: Weighted least squares and a linear fit