Linear and Nonlinear Fitting
Fitting linear and nonlinear models to experimental data with uncertainty.
Conceptual context
In experimental physics, a cloud of points is not yet a law. Every datum combines system response, instrumental resolution, fluctuations, and possible bias. Fitting a model means proposing a relation between and , estimating its parameters, and checking whether disagreement between data and prediction is compatible with . The task is not to select the prettiest curve, but the simplest explanation that retains physical meaning, respects units, and leaves no pattern in . A linear model describes constant sensitivity, whereas a nonlinear model allows the response rate to change. Model choice therefore requires parameters, residuals, experimental domain, and measurement quality to be read together.
🟢 Essential level
A fit turns a collection of measurements into an interpretable relation. First, plot against and decide whether the trend looks straight, curved, or divided into regimes. In a linear model, states how much the response changes per unit input, while describes the extrapolated starting level. In a power law, sets the scale and controls how growth accelerates or slows. Selection must not rely only on . Inspect as well: positive and negative values scattered without a pattern support the model, whereas curves, fans, or bands suggest missing physics or an incorrect uncertainty description. helps decide whether deviations have the size expected from .
A good choice also remains stable when one ordinary point is removed and gives parameters with sensible units. A good fit should also remain reasonable when a single ordinary point is removed: if the result changes drastically, either the model or the datum itself must be reviewed before accepting the obtained parameters.
🔵 Formal level
Basic formulas
The linear model represents a response with constant rate and a possible offset:
Linear model
Ordinary least squares estimates by minimizing the sum of squared vertical deviations:
Least-squares slope
When the response follows scaling behavior, the power-law model introduces and :
Power-law model
Real student questions
Is the model with the largest always best? No. Extra flexibility can raise it while leaving structured residuals or meaningless parameters.
Why inspect if the curve already looks good? The eye is dominated by the global scale. Residuals amplify small systematic deviations.
Does near one prove the model is correct? It only indicates compatibility with stated uncertainties under specific assumptions.
When should I use a nonlinear model? When physical reasoning, persistent curvature, or changing sensitivity cannot be captured linearly.
Can I linearize a power law with logarithms? Yes, if the transformation is valid and uncertainties are handled properly, because transformation changes the error structure.
What should I do with an outlier? Investigate it. Automatic deletion can hide physics or manufacture a clean fit.
Final synthesis
Choosing between linear and nonlinear fitting requires more than comparing curves. Units, parameters, , , global metrics, and mechanism must agree. The best model is the simplest one that explains the observed dependence without structure, preserves physical meaning, and states its validity limits honestly.
Formal development
This section is part of the complete theory. See the subscription options to access it.
🔴 Structural level
This section is part of the complete theory. See the subscription options to access it.
Deep physical interpretation
This section is part of the complete theory. See the subscription options to access it.
Order of magnitude
This section is part of the complete theory. See the subscription options to access it.
Personalized resolution method
This section is part of the complete theory. See the subscription options to access it.
Special cases and extended example
This section is part of the complete theory. See the subscription options to access it.
Cross-cutting connections and study paths
This section is part of the complete theory. See the subscription options to access it.