TExcelTAD
Home › Lab Skills: Measurement, Uncertainty & Graphs › Error Bars and the Uncertainty of a Gradient

Error Bars and the Uncertainty of a Gradient

A question to start

You found a resistance of 4.77 Ω4.77\ \Omega from the gradient of a UU–II graph. Every voltage reading was uncertain by ±0.12 V\pm 0.12\ \text{V}, so the line could have been drawn a little steeper or a little shallower. How much could the gradient change? Error bars show the uncertainty of each point, and from them you get the uncertainty of the gradient.

The idea: error bars

An error bar (thanh sai số) is a short line through a plotted point, reaching Δy\Delta y above and below it (and Δx\Delta x left and right, if xx is uncertain too). It says: "the true point is very likely somewhere along here".

  • A good best-fit line passes through all, or nearly all, of the error bars. If it misses several of them by a lot, either the uncertainties were underestimated or the relationship is not a straight line.
  • An error bar that is too small to draw at the graph's scale is simply left out, and you say so.

Steepest and shallowest lines

Draw two more lines that still pass through the error bars:

  • the steepest line: from the bottom of the first error bar to the top of the last one;
  • the shallowest line: from the top of the first error bar to the bottom of the last one.

Then

Δm=msteep−mshallow2,result: m=mbest±Δm\Delta m = \frac{m_{steep} - m_{shallow}}{2}, \qquad \text{result: } m = m_{best} \pm \Delta m

This quick school method uses the ends of the first and last bars. (A more careful version draws the steepest and shallowest lines that still go through every bar; for evenly scattered data the two agree closely.) The intercepts of the same two lines give the uncertainty of the intercept in the same way.

0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 current I / A voltage U / V best fit:4.77 V/A steepest:5.28 V/A shallowest:4.32 V/A error bars+/- 0.12 V

Worked example: a resistor

Given: current and voltage for a resistor, every voltage ±0.12 V\pm 0.12\ \text{V}.

II / A 0.10 0.20 0.30 0.40 0.50 0.60
UU / V 0.50 1.10 1.54 1.97 2.52 2.90

Find: RR with its uncertainty from the gradient. Formula: R=m=ΔUΔIR = m = \frac{\Delta U}{\Delta I}; Δm=msteep−mshallow2\Delta m = \frac{m_{steep} - m_{shallow}}{2}. Solve: the best-fit line (least squares) has gradient 4.77 V/A4.77\ \text{V/A}. The first point is (0.10,0.50±0.12)(0.10, 0.50 \pm 0.12), the last (0.60,2.90±0.12)(0.60, 2.90 \pm 0.12):

msteep=(2.90+0.12)−(0.50−0.12)0.60−0.10=3.02−0.380.50=5.28 V/Amshallow=(2.90−0.12)−(0.50+0.12)0.60−0.10=2.78−0.620.50=4.32 V/AΔm=5.28−4.322=0.48 V/A≈0.5 V/A\begin{aligned} m_{steep} &= \frac{(2.90 + 0.12) - (0.50 - 0.12)}{0.60 - 0.10} = \frac{3.02 - 0.38}{0.50} = 5.28\ \text{V/A} \\ m_{shallow} &= \frac{(2.90 - 0.12) - (0.50 + 0.12)}{0.60 - 0.10} = \frac{2.78 - 0.62}{0.50} = 4.32\ \text{V/A} \\ \Delta m &= \frac{5.28 - 4.32}{2} = 0.48\ \text{V/A} \approx 0.5\ \text{V/A} \end{aligned}

Answer: R=(4.8±0.5) ΩR = (4.8 \pm 0.5)\ \Omega, a 10%10\% uncertainty. Check: the steepest and shallowest lines cross the UU axis at −0.15 V-0.15\ \text{V} and +0.19 V+0.19\ \text{V}; zero lies between them, so the data agree with Ohm's law (a line through the origin).

The simulation uses the same points (rounded to two decimal places in the table). Press Play: the points arrive one by one, then the least-squares line and the steepest and shallowest lines appear, with the result 4.8±0.5 Ω4.8 \pm 0.5\ \Omega. Then change the scatter or the number of points and see how Δm\Delta m changes.

00.10.20.30.40.50.60.701234I (A)U (V)your lineleast-squares fitsteepest / shallowestyour gradient: 4.20 Ωyour Σr² = 0.0702best gradient: 4.770 Ωintercept: 0.086 Vbest Σr² = 0.0134 (least)steepest: 5.28 Ωshallowest: 4.32 ΩΔm = half the gap = 0.48resistance R:4.8 ± 0.5 Ωerror bars ±0.12 V

How to make Δm\Delta m smaller

  • Smaller error bars: better instruments, more repeats.
  • A wider range of xx: the same bars over a longer run allow less tilt.
  • More points help the best-fit line, but in the quick method Δm\Delta m only depends on the first and last bars, so spread the points over the whole range.

Try it: draw your own

On graph paper, plot the table above with error bars of ±0.12 V\pm 0.12\ \text{V} (±\pm a little over one small square if 0.1 V0.1\ \text{V} is one small square). Draw your best line by eye, then the steepest and shallowest lines with a ruler. Do you get within about 0.2 Ω0.2\ \Omega of the numbers above?

Common mistakes

  • Error bars of the wrong length: ±Δy\pm\Delta y means the bar is 2Δy2\Delta y long in total.
  • A best-fit line that misses most error bars without comment.
  • Taking the steepest minus shallowest without halving it.
  • Too many figures in the result: (4.77±0.48) Ω(4.77 \pm 0.48)\ \Omega should be (4.8±0.5) Ω(4.8 \pm 0.5)\ \Omega.
  • Forgetting units: the gradient's unit (V/A=Ω\text{V/A} = \Omega) belongs to the result.

Practice

  1. On a graph of extension (cm) against load (N), the first point is (1.0,2.5±0.3)(1.0, 2.5 \pm 0.3) and the last (6.0,15.0±0.3)(6.0, 15.0 \pm 0.3). Find the steepest and shallowest gradients and Δm\Delta m. The best-fit gradient is 2.50 cm/N2.50\ \text{cm/N}.
Answer

msteep=15.3−2.25.0=2.62 cm/Nm_{steep} = \frac{15.3 - 2.2}{5.0} = 2.62\ \text{cm/N}; mshallow=14.7−2.85.0=2.38 cm/Nm_{shallow} = \frac{14.7 - 2.8}{5.0} = 2.38\ \text{cm/N}; Δm=2.62−2.382=0.12 cm/N≈0.1 cm/N\Delta m = \frac{2.62 - 2.38}{2} = 0.12\ \text{cm/N} \approx 0.1\ \text{cm/N}. Result (2.5±0.1) cm/N(2.5 \pm 0.1)\ \text{cm/N}.

  1. From Practice 1, find the spring constant k=1mk = \frac{1}{m} with its uncertainty, in N/m\text{N/m}.
Answer

k=12.50 cm/N=0.400 N/cm=40.0 N/mk = \frac{1}{2.50\ \text{cm/N}} = 0.400\ \text{N/cm} = 40.0\ \text{N/m}. A reciprocal has the same relative uncertainty: 0.122.50=4.8%\frac{0.12}{2.50} = 4.8\%, so Δk=0.048×40.0=1.9 N/m≈2 N/m\Delta k = 0.048 \times 40.0 = 1.9\ \text{N/m} \approx 2\ \text{N/m}. k=(40±2) N/mk = (40 \pm 2)\ \text{N/m}.

  1. A best-fit line misses four of six error bars. Give two possible reasons.
Answer

The uncertainties were underestimated (the readings scatter more than the error bars say), or the relationship is not a straight line (a curve would fit, or the law doesn't hold over this range).

Test yourself

A point is plotted at U=2.50 VU = 2.50\ \text{V} with ΔU=0.10 V\Delta U = 0.10\ \text{V}. Its error bar goes from ...

  1. 2.402.40 to 2.60 V2.60\ \text{V}
  2. 2.452.45 to 2.55 V2.55\ \text{V}
  3. 2.502.50 to 2.60 V2.60\ \text{V}
  4. 2.302.30 to 2.70 V2.70\ \text{V}

The steepest line has gradient 5.45.4 and the shallowest 4.64.6. What is Δm\Delta m?

  1. 0.80.8
  2. 0.40.4
  3. 5.05.0
  4. 0.20.2

The steepest line in the quick method joins ...

  1. the top of the first bar to the bottom of the last
  2. the bottom of the first bar to the top of the last
  3. the first and last points
  4. the origin and the last point

How can you make the uncertainty of a gradient smaller?

  1. Use a smaller range of xx
  2. Draw the graph bigger
  3. Use a wider range of xx and smaller error bars
  4. Round the gradient