Why Measure the Error?
A linearization gives a convenient estimate of a function near a base point. But an estimate is not necessarily the function’s actual value. To judge its accuracy, compare the estimate with the true value, when that value is known or can be evaluated with a calculator.
There is more than one useful way to describe the difference. Absolute error reports its size in the units of the function’s output. Relative error compares that size with the size of the true value, and percent error expresses the relative error as a percentage. Together, these measures help distinguish a small difference from a meaningful one.
Definitions
Let \(f(x)\) be the function of interest, and let \(L(x)\) be its linear estimate at the input \(x\). For a differentiable function at base point \(a\), the linearization is \(L(x)=f(a)+f'(a)(x-a)\). In the formulas below, \(f(x)\) is the true value and \(L(x)\) is the estimate.
Absolute error has the same units as \(f(x)\). Relative error and percent error have no units: the numerator and denominator of the relative error are measured in the same units, so those units cancel. If the true value is zero, relative and percent error are undefined because their denominator is zero. Absolute error is still defined.
Some settings use a signed difference, such as \(f(x)-L(x)\), to indicate whether the estimate is too low or too high. The error measures in this tutorial use absolute values: they describe the size of the discrepancy, not its direction. To identify direction, compare \(L(x)\) with \(f(x)\) separately.
Why the Formulas Measure Approximation Accuracy
Start with the two quantities being compared: the true output \(f(x)\) and the estimated output \(L(x)\). Their difference is \(f(x)-L(x)\). This difference can be positive or negative depending on which value is larger, so its absolute value gives the size of the gap without regard to direction. That is the absolute error.
However, the same absolute gap can matter differently depending on the size of the true value. A difference of \(0.1\) is small compared with a true value of \(100\), but substantial compared with a true value of \(0.2\). Dividing the absolute error by \(|f(x)|\) expresses the gap as a fraction of the true value’s magnitude. Multiplying this fraction by \(100\%\) expresses that fraction as a percentage.
Evaluate \(f(x)\), and calculate the linear estimate \(L(x)\) at the same input.
Subtract the estimate from the true value and take the absolute value.
If \(f(x)\ne 0\), divide the absolute error by \(|f(x)|\) to get relative error.
Multiply the relative error by \(100\%\), then interpret the result in context.
The choice of denominator is part of the definition used here: relative error is measured against the true value. Keep the true value and the estimate clearly identified before starting the calculation.
Worked Examples
Worked Example: Error in a Quadratic Linear Estimate
Use the linearization of \(f(x)=x^2\) at \(a=2\) to estimate \(f(2.1)\). Then calculate the absolute, relative, and percent errors.
First, \(f(2)=2^2=4\), and \(f'(x)=2x\), so \(f'(2)=4\). Therefore the linearization is
At \(x=2.1\), the estimate is
The true value is \(f(2.1)=(2.1)^2=4.41\). Thus
The relative error is
To six decimal places, the percent error is
Check: The estimate \(4.4\) is below the true value \(4.41\), and their difference is \(0.01\), as the absolute error reports. Also, \(0.002268\) of \(4.41\) is approximately \(0.01\), confirming the relative-error calculation. The estimate is low, but the absolute, relative, and percent errors themselves are nonnegative.
Worked Example: A Reciprocal Estimate
Use the linearization of \(f(x)=1/x\) at \(a=1\) to estimate \(f(1.1)\), then calculate all three errors.
We have \(f(1)=1\) and \(f'(x)=-1/x^2\), so \(f'(1)=-1\). The linearization is
At \(x=1.1\),
The true value is \(f(1.1)=1/1.1=10/11\). The absolute error is
Using the true value \(10/11\) in the denominator gives
Therefore, the percent error is \(100\%(0.01)=1\%\).
Check: The estimate is \(0.9\), while the true value \(10/11\) is approximately \(0.909091\). Their difference is approximately \(0.009091\), matching \(1/110\). One percent of \(10/11\) is \(0.01(10/11)=1/110\), confirming the relative and percent errors.
Worked Example: A Concave Function and an Estimate That Is Too High
Use the linearization of \(f(x)=\sqrt{x}\) at \(a=1\) to estimate \(f(1.21)\). Calculate the errors and state whether the estimate is above or below the true value.
Since \(f(1)=1\) and \(f'(x)=1/(2\sqrt{x})\), we have \(f'(1)=1/2\). Thus
At \(x=1.21\), the estimate is
The true value is \(\sqrt{1.21}=1.1\), because \(1.1^2=1.21\). Therefore
The relative error is
To six decimal places as a percentage, this is
Check: Subtracting the true value from the estimate gives \(1.105-1.1=0.005\), so the estimate is too high by exactly the absolute error. A \(0.454545\%\) error relative to \(1.1\) is approximately \(0.005\), consistent with the calculation.
Interpreting the Results
Each error measure answers a different question:
| Measure | What it tells you | Units |
|---|---|---|
| Absolute error | How far apart are the estimate and true value? | Same units as the output |
| Relative error | What fraction of the true value’s magnitude is the error? | None |
| Percent error | What percentage of the true value’s magnitude is the error? | Percent |
Absolute error is useful when the output’s units matter directly. Relative or percent error is often more useful when comparing accuracy across quantities with different scales. For instance, an absolute error of \(0.01\) may be negligible for a true value near \(100\), but large for a true value near \(0.02\).
A small relative error does not guarantee that the linear estimate is appropriate for every purpose; the required accuracy depends on the application. And when the true value is close to zero, relative error can be large even if the absolute difference is small. Always consider both the numerical result and the scale of the quantity.
Common Mistake: Dividing by the Estimate
A frequent error is to use the estimated value in the relative-error denominator. In the reciprocal example, that incorrect calculation would be
which gives approximately \(1.0101\%\). This is not the relative error as defined here, because the denominator should be the magnitude of the true value, \(10/11\), not the estimate \(0.9\). The correct calculation is
The numerical difference may be small in this example, but the denominator matters: using the wrong one changes the meaning of the measure. A useful check is to label the two values before dividing: true value in the denominator, estimate in the comparison.
Check Your Understanding
For each question, identify the true value and the estimate before calculating or interpreting an error.
- If the true value is \(8.2\) and the estimate is \(8.0\), what are the absolute, relative, and percent errors?
- A true output is \(0.05\), and an estimate differs from it by \(0.01\). Find the relative and percent errors. Why is the absolute error alone not enough to describe the scale of the discrepancy?
- Can relative error be calculated when the true value is zero? Explain using its definition.
- An estimate is greater than the true value. Does that make the absolute error negative? Explain.
- In the definition used here, which value belongs in the denominator of relative error, and why?