Both error bars count
Spreadsheet trendlines ignore measurement uncertainty. curve.fit uses orthogonal distance regression (ODRPACK95, through the odrpack package) when students supply δx and δy, so every point is weighted by its uncertainty in both directions. With δy only it runs weighted least squares; with neither, ordinary least squares.
- Uncertainties come from a table column per point, or from one constant or percentage for the whole dataset.
- Students choose how parameter uncertainties are reported. Absolute uses the supplied 1σ values as given. Nominal, the default, rescales by √χ²red, the same default as SciPy, lmfit and Origin.
- Every fit shows a model uncertainty band and a residual plot.
- The Model Evaluator predicts y ± δy at any x, propagating parameter uncertainty and an optional δx.
| Uncertainties supplied | Fitting method | Checked against |
|---|---|---|
| None | Ordinary least squares in y | NIST reference datasets and a closed-form linear regression |
| δy only | Weighted least squares in y | An independent weighted linear regression, including parameter uncertainties |
| δx only | Orthogonal distance regression, exact-y limit | An independent regression of x on y, transformed back |
| δx and δy | Weighted orthogonal distance regression | The Pearson–York benchmark and an independent implementation of York’s equations |
Checked against published reference results
Before every release, an automated suite fits reference datasets with known answers and compares parameters, standard errors and residual sums of squares. The details, tolerances and references are published in the Help.
NIST Statistical Reference Datasets
21 datasets, 4 linear and 17 nonlinear, fitted from 55 certified and published starting points. Parameters, standard errors and residual sums of squares must match NIST’s certified values.
Pearson–York benchmark
The classic test for fitting with errors in both variables: Pearson’s data with York’s weights, compared with the published results in Cantrell (2008). Load it in one click to show a class.
- Pearson, K. (1901). On lines and planes of closest fit to systems of points in space. Philosophical Magazine, 2, 559–572.
- York, D. (1966). Least-squares fitting of a straight line. Canadian Journal of Physics, 44, 1079–1086.
- Cantrell, C. A. (2008). Technical Note: Review of methods for linear least-squares fitting of data and application to atmospheric chemistry problems. Atmospheric Chemistry and Physics, 8, 5477–5487. doi:10.5194/acp-8-5477-2008
- NIST Statistical Reference Datasets, nonlinear and linear regression. nist.gov/itl/sed
A one-page report for every fit
Every fit exports a PDF with the model and equation, fitted parameters and uncertainties, reduced χ², the plot with error bars and uncertainty band, and the residuals.
- Single PDF for one report. Double PDF prints two copies side by side for lab partners.
- Titles and axis labels accept LaTeX math, typeset with TeX.
- Browser Report opens the fit with full-precision tables and model samples, with CSV and JSON downloads for further analysis.
- Each report is stamped with its session, fit ID and time, so an instructor can open the fit behind a submitted report.
Productive in minutes
Paste the data
Copy x, δx, y and δy straight from a spreadsheet, or import a CSV file of up to 10,000 rows.
Choose a model
Pick one of 26 models or type an equation. Starting values are automatic.
Fit
Read the parameters, reduced χ² and residuals. Each fit opens in its own tab.
Predict
Use the Model Evaluator to get y ± δy at any x.
Export
Download the PDF for the lab report, or the data as CSV.
- A guided walkthrough fits a sample dataset in about five minutes, in a separate practice tab.
- Custom equations use x and up to five parameters, A to E, with common functions and π. The equation is checked as students type, and a matching built-in model is suggested when there is one.
- Every fit is saved to a session link. Students can return later, compare earlier fits, or fork a copy to try something new.
Models for physics, chemistry and biology labs
Easy to adopt across sections
One method for every section
Every student uses the same fitting method and reporting conventions, whatever computer they have.
Share a dataset as a link
Fit an example once and share its session link. Reference examples such as Pearson–York and several NIST datasets load in one click.
Documented methods
The Help explains the fitting modes, uncertainty conventions, model bands and validation, with references students can cite.
Reproducible in Python
A short SciPy template performs the same kind of ODR fit, for courses that want students to see the code.
Nothing to administer
No installs, licenses or student accounts. It runs in any modern browser on lab computers and laptops.
Free to use
There is no cost to students or departments.