# Graphical Analysis and Curve Fitting

Physics I · Principles of Laboratory Practice · https://tryals.app/learn/physics-i/graphical-analysis-and-curve-fitting

## Graphical Analysis Basics

**Graphical analysis** extracts physical relationships from data. If your data doesn't linearise as expected, your assumed model may be wrong.

**Plotting conventions**:
- Independent variable on $x$, dependent on $y$.
- Label axes with **quantity, symbol, and units** (e.g., Force $F$ (N)).
- Include **error bars** for measurement uncertainty.

**Linearisation** transforms non-linear laws into straight lines:

| Law | Plot | Slope |
| --- | --- | --- |
| $y = ax + b$ | $y$ vs $x$ | $a$ |
| $y = ax^{2}$ | $y$ vs $x^{2}$ | $a$ |
| $y = ae^{bx}$ | $\ln y$ vs $x$ | $b$ |
| $y = ax^n$ | $\log y$ vs $\log x$ | $n$ |

**Common pitfall**: Fitting a curve proves little; enough parameters fit anything. Linearise so theory predicts a **straight line**, then check residuals. Structure in residuals means the model is wrong.

## Least-Squares Fitting

A **best-fit line** $y = mx + b$ minimises squared residuals using the **least-squares fit** formula:

$$\chi^2 = \sum_{i=1}^N \frac{(y_i - mx_i - c)^2}{\sigma_i^2}$$ 

Here, $y_i$ and $x_i$ are data points, and $\sigma_i$ is uncertainty.

**Reduced chi-squared** is defined as $\chi^{2}_\nu = \chi^{2}/(N-p)$, where $p$ is the number of fit parameters. A good fit yields $\chi^{2}_\nu \approx 1$.

The **correlation coefficient** $r^{2}$ quantifies fit quality, where 1 is perfect and 0 is none. 

**Pitfall**: A poor fit or poor $r^2$ may indicate systematic errors or an incorrect theoretical model.

## Practice questions

6 of this lesson's 14 practice questions, with answers. The full set is in the app.

### 1. Theory says the pendulum obeys $T = 2\pi\sqrt{L/g}$. You want a **straight-line** plot whose slope reveals $g$. What should you plot?

A. $T^{2}$ against $L$, slope $4\pi^{2}/g$
B. $T$ against $L$, slope $2\pi/g$
C. $L$ against $\sqrt{T}$, slope $g/4$
D. $T$ against $L^{2}$, slope $\sqrt{g}$

**Answer:** A. $T^{2}$ against $L$, slope $4\pi^{2}/g$

**Why:** Linearization turns curve-guessing into line-fitting: plotting $T^{2}$ vs $L$ makes the law a straight line through the origin with slope $4\pi^{2}/g$. Straight lines are the only shapes the eye, and least squares, can judge reliably.

Page: https://tryals.app/practice/physics-i/graphical-analysis-and-curve-fitting/theory-says-the-pendulum-obeys-t-2-l-g-you-want-a-straight-line

### 2. Experimenters often plot data so the expected relationship becomes a straight line. Why go to that trouble instead of fitting the curve directly?

A. Because a straight line is easy to judge by eye
B. Because linear relationships are more accurate than nonlinear ones
C. Because curved fits cannot be performed without a computer
D. Because the uncertainty is smaller for a linear fit

**Answer:** A. Because a straight line is easy to judge by eye

**Why:** The eye is an excellent straight-line detector and a poor curve detector. Linearising turns model-checking into something you can do by looking.

Page: https://tryals.app/practice/physics-i/graphical-analysis-and-curve-fitting/experimenters-often-plot-data-so-the-expected-relationship-becomes-a

### 3. Order the steps for graphical analysis of experimental data.

**Answer:**

1. Plot the raw data with error bars
2. Choose an appropriate model (linear, polynomial, etc.)
3. Perform the curve fit (least squares)
4. Examine the residual plot for patterns
5. Extract physical parameters (slope, intercept) with uncertainties

**Why:** Start with visualization, fit a model, check residuals, then interpret parameters.

Page: https://tryals.app/practice/physics-i/graphical-analysis-and-curve-fitting/order-the-steps-for-graphical-analysis-of-experimental-data

### 4. Your $T^{2}$ vs. $L$ pendulum plot has slope **4.0 s²/m**. Using slope $= 4\pi^{2}/g$, compute $g$ in m/s². (Use $\pi^{2} \approx 9.87$.) **Set the slider to your answer.**

**Answer:** 9.87 (within ±0.3)

**Why:** $g = 4\pi^{2}/4.0 \approx 9.87$ m/s². Note the workflow: the slope of a linearized plot, built from **all** data points at once, delivers the physical constant, with the scatter of points around the line giving its uncertainty for free.

Page: https://tryals.app/practice/physics-i/graphical-analysis-and-curve-fitting/your-t-vs-l-pendulum-plot-has-slope-4-0-s-m-using-slope-4-g

### 5. One data point sits far off an otherwise perfect straight-line trend. The honest first move is to…

A. Adjust it toward the line "to correct the obvious error"
B. Keep it and force the line through it
C. Delete it, it spoils the fit
D. Check the notebook and, if possible, re-measure it

**Answer:** D. Check the notebook and, if possible, re-measure it

**Why:** Outliers get investigated, never silently deleted or "adjusted". Most are mundane mistakes traceable in the notebook; occasionally one is a discovery. Either way, the decision and its reason belong in the report, that audit trail **is** scientific integrity.

Page: https://tryals.app/practice/physics-i/graphical-analysis-and-curve-fitting/one-data-point-sits-far-off-an-otherwise-perfect-straight-line-trend

### 6. Sort each element into its role in graphical analysis.

**Answer:**

- Graph component: Axis labels with units, Error bars, Title
- Fit quality metric: $R^{2}$ (coefficient of determination), Residual plot, Chi-squared per degree of freedom

**Why:** Graphs need labels, titles, and error bars; fit quality is judged by $R^{2}$, residuals, and χ².

Page: https://tryals.app/practice/physics-i/graphical-analysis-and-curve-fitting/sort-each-element-into-its-role-in-graphical-analysis
