doPhysics.in
All chapters
Measurement and Error · Lesson 5 of 5

The Best Straight Line through Data

15 min read3 ideas5 checks1 figure to playBy Asheshanand Acharya
What you will learn 0 / 3
Plotting readings on a graph
Look around
A voltmeter that measures Planck's constant

In Photons and the Photoelectric Effect, light of six known frequencies falls on a sodium surface. For each frequency a voltmeter gives the stopping potential. Einstein's equation says the six points lie on a straight line whose slope is \(h/e\). But the six readings do not lie exactly on any one line. A ruler can be laid through them in many ways. Which line is the right one?

you will draw the best straight line through scattered readings and read Planck's constant and the work function of sodium from its slope and intercept.

Axes and scales

A graph of readings begins with two choices. The quantity that the experimenter sets, here the frequency \(\nu\), goes along the x axis. The quantity that responds, here the stopping potential \(V_0\), goes up the y axis. Each axis carries the name of its quantity and its unit, such as \(V_0\) (V).

The scales are then chosen so that the readings fill most of the graph. One division stands for a simple step, such as 1, 2 or 5 units. A point can then be placed and read without awkward arithmetic. A graph squeezed into one corner wastes the paper and hides the slope.

A false origin spreads the readingsSix measured stopping potentials of a sodium surface, from 0.16 volt at 7 times 10 to the 14 hertz to 2.22 volts at 12 times 10 to the 14 hertz, plotted two ways. Chip 1: the frequency axis starts at zero, and the six points crowd into the right part of the graph, 5 of its 13 units. Chip 2: the frequency axis starts at 6, a false origin marked by a break in the axis, and the same six points spread across nearly the whole width, so the slope can be read more finely. 0.5 1.0 1.5 2.0 2.5 V0 (V) ν (10¹⁴ Hz) 0 2 4 6 8 10 12 6 7 8 9 10 11 12 the readings fill 5/13 of the width
Fig 5.1The six stopping potentials of sodium, plotted two ways. Use the chips. With the frequency axis starting at zero, the points crowd into the right part of the graph. With a false origin at \(6 \times 10^{14}\,\text{Hz}\), marked by a break in the axis, they spread across it.

The frequencies run only from \(7\) to \(12 \times 10^{14}\,\text{Hz}\). Starting the axis at zero spends more than half the width on frequencies never measured. So the axis starts at \(6 \times 10^{14}\,\text{Hz}\), a false origin, shown by a small break in the axis. The price is that the intercept on the \(V_0\) axis, at \(\nu = 0\), is now off the graph. It must be calculated instead of read.

CheckpointUnanswered

A student plots load against extension for a wire, with loads from \(10\) to \(40\,\text{N}\) and extensions from \(0.80\) to \(3.20\,\text{mm}\). Should she use a false origin?

The best straight line through data
Maths you need
RememberSlope and intercept of the best line
\[ \begin{gathered} m = \dfrac{y_2 - y_1}{x_2 - x_1} \\ y = mx + c \end{gathered} \]
Holds whenfor two points \((x_1, y_1)\) and \((x_2, y_2)\) taken on the drawn line, far apart, not two readings. The intercept \(c\) is the value of \(y\) at \(x = 0\), found by \(c = y_1 - m x_1\) when the origin is false.
Symbols\(m\) the slope; \(c\) the intercept on the y axis
Units\(m\) in the unit of \(y\) per unit of \(x\); \(c\) in the unit of \(y\)

A line among the points

Each reading carries a random error, so the points scatter about the true line. The best line is the one that the scatter fits most evenly. Lay a transparent ruler on the graph and turn it until the points lie as much above it as below, along its whole length. The line need not pass through any single reading.

Turning a line to fit the readingsThe six stopping potentials of a sodium surface plotted against frequency on a false origin at 6 times 10 to the 14 hertz. A straight line passes through G, the mean point of the readings, at 9.5 and 1.19 volts, and a slider turns it by setting its slope from 0.30 to 0.50 volt per 10 to the 14 hertz. A red bar joins each reading to the line. The readouts give the slope, Planck's constant h as e times the slope, and the sum of the squares of the six gaps. The gaps are smallest, their squares adding to only 0.0008, at a slope of 0.414, which gives h = 6.62 times 10 to the minus 34 joule second to three figures. There the points lie evenly on both sides of the line. 0.5 1.0 1.5 2.0 2.5 6 7 8 9 10 11 12 V0 (V) ν (10¹⁴ Hz) G slope = 0.360 V per 10¹⁴ Hz h = 5.76 × 10⁻³⁴ J s, Σ gap² = 0.0523 V²
SimThe line passes through G, the mean point of the six readings. Move the slider to turn it. The red bars are the gaps between the readings and the line. A slope of \(0.36\) leaves the low points below and the high points above. Near \(0.414\) the gaps are smallest and balanced, and \(h = e \times \text{slope} = 6.6 \times 10^{-34}\,\text{J s}\).

Two facts from the figure above guide the eye. The best line passes through the mean point, G, whose coordinates are the mean of the x values and the mean of the y values. And when the line is turned too far either way, the gaps at the two ends grow and all lie on one side. At the best slope the gaps are small and alternate in sign.

principle 2.2
The best straight line

The best straight line through a set of readings passes through their mean point. It leaves the readings scattered evenly on both sides along its length. Its slope is found from two points on the line that are far apart.

Once the line is drawn, the readings have done their work. Take two points on the line itself, near its two ends, and read their coordinates. Two readings would carry their own random errors; two points on the line carry the average of all six. Points far apart also make the differences \(y_2 - y_1\) and \(x_2 - x_1\) large compared with the error of reading the graph.

Deeper

The figure above is a picture of the method of least squares. The best line is the one that makes the sum of the squares of the gaps smallest, 0.0008 V² here. Adrien-Marie Legendre published the method in 1805, and Gauss used it to find the orbits of planets. A calculator's "linear regression" does exactly this. The line drawn by eye through the mean point comes very close to it.

CheckpointUnanswered

Why is the slope found from two points on the drawn line, and not from the first and the last readings?

Reading slope and intercept

What the slope and the intercept mean

Compare the law with the equation of a line. Einstein's equation, divided by \(e\), reads \(V_0 = (h/e)\,\nu - \phi/e\). This has the form \(y = mx + c\). So the slope \(m\) is \(h/e\), in volts per hertz, and the intercept \(c\) is \(-\phi/e\), in volts. Every slope and every intercept of a graph of readings is a physical quantity with a unit.

ExamplePlanck's constant from the best line

This is the worked example of Photons and the Photoelectric Effect, lesson 4, done with the tool. The best line through the six readings passes through \(0.57\,\text{V}\) at \(8.0 \times 10^{14}\,\text{Hz}\) and \(2.22\,\text{V}\) at \(12.0 \times 10^{14}\,\text{Hz}\). Find \(h\), the threshold frequency and the work function. Take \(e = 1.6 \times 10^{-19}\,\text{C}\).

Reveal one step at a time and finish the rest yourself.
Checkpoint · numericUnanswered

Another student's best line of \(V_0\) against \(\nu\), on a false origin, passes through \(0.15\,\text{V}\) at \(7.0 \times 10^{14}\,\text{Hz}\) and \(2.20\,\text{V}\) at \(12.0 \times 10^{14}\,\text{Hz}\). Calculate the intercept at \(\nu = 0\) and give the work function, in eV.

eV± 2 %

Making a law straight

Many laws are not straight lines, but a change of variable makes them straight. For a pendulum \(T = 2\pi\sqrt{L/g}\), so \(T\) against \(L\) is a curve. Square both sides: \(T^2 = (4\pi^2/g)\,L\). Now \(T^2\) against \(L\) is a straight line through the origin, with slope \(4\pi^2/g\). A straight line is easy to judge by eye, and a bend in it warns at once that the law has failed.

Checkpoint · numericUnanswered

In a school laboratory, not in a physics chapter, a student plots \(T^2\) against \(L\) for a pendulum. Her best line has a slope of \(4.02\,\text{s}^2/\text{m}\). What value of \(g\) does it give, in m/s²?

m/s²± 2 %
Checkpoint · numericUnanswered

In Searle's experiment the best line of load against extension passes through \(40\,\text{N}\) at \(3.20\,\text{mm}\). The wire is \(2.00\,\text{m}\) long with an area of \(1.257 \times 10^{-7}\,\text{m}^2\). Find Young's modulus, in units of \(10^{11}\,\text{Pa}\).

× 10¹¹ Pa± 2 %
Common mistake

A line of readings holds only where readings were taken. Below the threshold frequency no electrons leave the metal, so the dashed part of the photoelectric line is arithmetic, not a measurement. In the same way the load-extension line of a wire bends once the elastic limit is passed. Extend a line only to calculate an intercept, and never trust it as a prediction far beyond the readings.

In the world
Where this tool works in physics

The best straight line turns a set of readings into a constant of nature. In Photons and the Photoelectric Effect its slope gives Planck's constant and its intercept the work function. In Searle's experiment the slope of load against extension gives Young's modulus, and the line averages the random errors of the readings. The same method gives \(g\) from \(T^2\) against \(L\). It also gives a resistance from the slope of V against I.

Back to the voltmeter

The six readings of sodium do not lie on one line, and no line should be forced through two of them. The best line passes through their mean point with the scatter balanced on both sides. Its slope, \(4.125 \times 10^{-15}\,\text{V s}\), gives \(h = 6.60 \times 10^{-34}\,\text{J s}\). Its calculated intercept, \(-2.73\,\text{V}\), gives a work function of \(2.73\,\text{eV}\). A voltmeter and a set of filters have measured a constant of nature.

Exam traps
  1. Joining the points dot to dot, or forcing the line through the first and the last reading.
    Draw one straight line with the scatter balanced on both sides, through the mean point.
  2. Reading the slope from two readings.
    Take two points on the drawn line, far apart.
  3. Reading the intercept from a graph with a false origin.
    The axis there is not at zero. Calculate \(c = y_1 - m x_1\).
  4. Giving a slope without its unit.
    The slope has the unit of y per unit of x: V per Hz, N/mm, s²/m.

Where this tool works in the book

The physics that leans on this lesson. Each card opens the topic where the tool is at work.