Slope and Uncertainties Using the Least-Squares Method
Calculating the slope (m) and determining the y-intercept (b) are relatively straightforward operations.
Y = mx+b
The following steps are used to determine the uncertainty associated with a value of (Y) as a function of (x), the slope (m), and the y-intercept (b).
Consider an ((x,Y)) graph consisting of (N = 7) distinct data points.
Let us consider a previously worked example (see the Slope and Uncertainty worksheet): the titration of a lambda solution with a reagent, where (x) is the volume of titrant added, in mL, and (Y) is the electrode response, in mV.
The following results were obtained:
| Data |
Y |
X |
| Unity | mV | ml |
| 1 |
75 | 1,0 |
| 2 |
109 | 1,5 |
| 3 | 150 | 2,0 |
| 4 | 175 | 2,5 |
| 5 | 210 | 3,0 |
| 6 | 243 | 3,5 |
| 7 | 279 | 4,0 |
Determination of the slope (m) and the y-intercept (b):
To do this, we will determine the best-fit straight line, assuming that the uncertainty associated with the variable (x) is negligible compared with that associated with (Y), that the uncertainty in (Y) is the same for each measurement point, and that the values follow a Gaussian (normal) distribution.
We will use the normal equations to determine (b) and (m):

Let us determine the intermediate calculations and constants:

We will estimate the most likely uncertainty by determining the standard deviation of the (Y)-values, using (N-2) degrees of freedom for a straight-line regression.

Of course, N must be greater than 2.
![]()
Determination of the uncertainties associated with m and b:

This uncertainty does not take into account the uncertainty associated with the voltmeter or the uncertainty in the volume delivered.
If the uncertainty applies to the (x)-values rather than the (Y)-values, their respective roles simply need to be reversed.
These are standard uncertainties and must therefore be multiplied by a coverage factor of (k = 2).
The resulting values may appear much smaller than those obtained using the graphical method. However, in the graphical-method example, the expanded uncertainty in (x) is ±0.2 mL, while the uncertainty in (Y) is ±10 mV.
The uncertainty in (Y) can be expressed using a root-sum-of-squares calculation, giving the following result for all values of (Y):
