Graphs and Curve Fitting
Free preview Lesson 28 of 71
plot and interpret graphs, and fit a straight line by least squares.
Rules for plotting graphs
• Plot the independent variable on the x-axis and the dependent variable on the y-axis.
• Label axes with quantity and unit, for example .
• Choose scales that use more than half of the graph area; avoid awkward scales such as 3 or 7 units per division.
• Plot points clearly, and add error bars where the uncertainties are significant.
• Draw a best-fit line or curve; do not join points "dot-to-dot" unless the data justify it.
• Give a figure number and a caption. Take the slope with a large triangle using points on the line, not data points.
• Where possible linearise the relationship. For plot against ; the slope is .
Linear least squares
For a straight line fitted to points:
,
,
where .
Worked Example
Fit a straight line to (1, 2.1), (2, 3.9), (3, 6.2), (4, 7.8), (5, 10.1).
Solution
,
,
,
,
.
.
.
.
Best-fit line: .
Spreadsheets (Excel, LibreOffice Calc), Origin, Python (NumPy, SciPy, Matplotlib) and similar tools perform fits and report the uncertainty in slope and intercept; understand what the software is doing and do not accept the output uncritically. The goodness of fit is judged by the residuals and by the reduced chi-squared, divided by the degrees of freedom; a value near 1 indicates a fit consistent with the stated uncertainties.
You are viewing a free preview. Enrol to unlock the rest of the course and track your progress.