What is curve fitting
Approximation replaces a set of points with a simple formula that passes close to them, smoothing measurement errors. Parameters are found by least squares.
Models
| Model | Formula |
|---|---|
| Linear | y = a + bx |
| Quadratic | y = a + bx + cx² |
| Cubic | y = a + bx + cx² + dx³ |
| Exponential | y = a·ebx |
| Power | y = a·xb |
| Logarithmic | y = a + b·ln x |
| Hyperbolic | y = a + b/x |
Exponential, power and logarithmic models are linearised by taking logarithms; R² is always computed on the original y so models can be compared fairly. The best model is chosen by adjusted R², which penalises extra parameters.
Example
Points (1; 3.3), (2; 5.5), (3; 9.1), (4; 15), (5; 24.6), (6; 40.5) are best described by y ≈ 2·e0.5x.