Tutorials › Calculus I › Absolute, Relative, And Percentage Error

Linearization and Differentials · Tutorial 618 of 1495

Absolute, Relative, And Percentage Error

You will distinguish the size of an error from its significance relative to the true function value, including how unit conversions can affect the comparison.

Intermediate 9 min read

What You'll Learn

  • Calculate absolute error by comparing an estimate with the exact function value.
  • Calculate relative and percentage error when the true value is nonzero.
  • Use a linear approximation as an estimate and compare it with the exact value.
  • Explain why equal absolute errors can represent different levels of accuracy.
  • Determine when a unit conversion preserves relative error and when it may change it.

Introduction

An estimate can be close to the true value in one situation and poor in another. An error of \(0.01\), for example, is a small difference compared with a value near \(100\), but a much larger difference compared with a value near \(1\).

To describe approximation quality carefully, it helps to distinguish the size of an error from its size relative to the value being estimated. This tutorial defines absolute, relative, and percentage error and applies them to estimates of function values. The estimates may come from linearization, which uses the function’s value and derivative at a nearby point.

Three ways to describe an error

Suppose the exact value of interest is \(y\), and an estimate of it is \(\hat y\). The estimate could be a linear approximation to a function value, but the definitions apply to any numerical estimate. The difference \(\hat y-y\) tells whether the estimate is above or below the exact value; its absolute value measures the size of the difference without regard to direction.

Definition: The absolute error of the estimate \(\hat y\) for the exact value \(y\) is \(E_{\mathrm{abs}}=|\hat y-y|\). If \(y\ne 0\), the relative error is \(E_{\mathrm{rel}}=\frac{|\hat y-y|}{|y|}\). The percentage error is the relative error expressed as a percentage: \(E_{\%}=100E_{\mathrm{rel}}\%\).

Absolute error has the same units as the value being estimated. If a length is measured in metres, its absolute error is also in metres. Relative error is a ratio, so the units cancel; percentage error is that ratio multiplied by \(100\) and reported as a percentage.

The denominator in relative error is the magnitude of the true value, not the estimate. The absolute value in the denominator also makes the relative error nonnegative when the true value is negative. If \(y=0\), relative and percentage error as defined here are undefined, because division by zero is not permitted. Absolute error is still defined in that case.

Using linearization to estimate a function value

For a function \(f\) differentiable at \(a\), its linearization at \(a\) is the linear function \(L_a(x)=f(a)+f'(a)(x-a)\). When \(x\) is near \(a\), \(L_a(x)\) can be used as an estimate of \(f(x)\). In the error definitions, the exact value is \(y=f(x)\) and the estimate is \(\hat y=L_a(x)\). Thus the absolute error is \(|L_a(x)-f(x)|\); relative and percentage error also require \(f(x)\ne0\).

The linearization gives an estimate, not a guarantee that the error is zero. Its quality depends on the function and on how far the input \(x\) is from the point \(a\). Here the comparison is between the estimate and the exact function value, so the errors can be calculated explicitly when \(f(x)\) is known.

Worked Example: Error in a quadratic linearization

Estimate \(f(2.1)\) for \(f(x)=x^2\) by linearizing at \(a=2\), then calculate the absolute, relative, and percentage errors.

First find the function value and derivative at the base point:

$$ f(2)=2^2=4, \qquad f'(x)=2x, \qquad f'(2)=2(2)=4. $$

Therefore the linearization is

$$ L_2(x)=f(2)+f'(2)(x-2) =4+4(x-2). $$

At \(x=2.1\), the estimate is

$$ \hat y=L_2(2.1) =4+4(2.1-2) =4+4(0.1) =4.4. $$

The exact value is \(y=f(2.1)=(2.1)^2=4.41\). Hence

$$ E_{\mathrm{abs}}=|4.4-4.41|=0.01, $$ $$ E_{\mathrm{rel}}=\frac{0.01}{4.41} =\frac{1}{441} \approx 0.00226757, $$ $$ E_{\%}=100\left(\frac{1}{441}\right)\% \approx 0.226757\%. $$

Check: the estimate differs from the exact value by \(4.41-4.4=0.01\), which agrees with the absolute error. The relative error uses \(4.41\), the magnitude of the true value, in its denominator.

Why equal absolute errors can mean different things

Absolute error answers a direct question: how far apart are the estimate and the true value? It does not answer how large that difference is relative to the value being estimated. Relative error supplies that comparison by dividing the absolute error by the magnitude of the true value.

For a fixed positive absolute error \(e\), the relative error has the form \(e/|y|\). If the magnitude of \(y\) increases while \(e\) stays the same, this ratio decreases. If the magnitude of \(y\) decreases, the ratio increases. This follows directly from division by a larger or smaller positive denominator.

Key takeaway: The same absolute error can have different significance at different scales. Relative error compares the error with the magnitude of the true value, provided that value is nonzero.

Worked Example: The same absolute error at two scales

Compare linearization estimates for \(g(x)=100+x^2\) and \(f(x)=x^2\), both evaluated at \(x=2.1\) using a linearization at \(a=2\). The added constant makes the true value of \(g\) larger without changing its derivative.

For \(f(x)=x^2\), the estimate from the previous calculation is \(4.4\), and the exact value is \(4.41\). Thus the absolute error is \(0.01\), and the relative error is

$$ \frac{0.01}{4.41} =\frac{1}{441} \approx 0.00226757, \qquad E_{\%}\approx 0.226757\%. $$

Now calculate the estimate for \(g\). At \(a=2\),

$$ g(2)=100+2^2=104, \qquad g'(x)=2x, \qquad g'(2)=4. $$

The linearization and its value at \(2.1\) are

$$ L_2(x)=104+4(x-2), $$ $$ L_2(2.1)=104+4(0.1)=104.4. $$

The exact value is

$$ g(2.1)=100+(2.1)^2=100+4.41=104.41. $$

So the absolute error is again

$$ |104.4-104.41|=0.01. $$

But its relative error is smaller:

$$ E_{\mathrm{rel}} =\frac{0.01}{104.41} =\frac{1}{10441} \approx 0.0000957763, $$ $$ E_{\%} =100\left(\frac{1}{10441}\right)\% \approx 0.00957763\%. $$

Check: both estimates are \(0.01\) below their exact values, so both absolute errors are \(0.01\). The second true value is much larger, so its relative error is smaller. The arithmetic also confirms that the derivative at the base point is \(4\) for both functions, giving the same change in the linear estimate.

Why relative error depends on the scale’s zero

A conversion that multiplies both the exact value and the estimate by the same positive factor preserves relative error. To see why, let the converted values be \(cy\) and \(c\hat y\), with \(c>0\). Their relative error is

$$ \frac{|c\hat y-cy|}{|cy|} =\frac{c|\hat y-y|}{c|y|} =\frac{|\hat y-y|}{|y|}. $$

The factor cancels. The absolute error, however, becomes \(c|\hat y-y|\), so its numerical value changes with the units.

This invariance does not hold for every unit conversion. A conversion with an additive offset changes the numerical zero as well as the scale. Relative error is measured against that numerical value, so an offset may change the relative error. Temperature scales provide a familiar example: converting Celsius to Fahrenheit includes an offset.

Worked Example: A temperature conversion with an offset

Suppose a true temperature is \(10^\circ\mathrm{C}\), and its estimate is \(11^\circ\mathrm{C}\). Compare their errors in Celsius and Fahrenheit.

In Celsius, the absolute error and relative error are

$$ E_{\mathrm{abs}}=|11-10|=1^\circ\mathrm{C}, \qquad E_{\mathrm{rel}}=\frac{1}{10}=0.1, $$ $$ E_{\%}=100(0.1)\%=10\%. $$

Convert both temperatures using \(F=\frac{9}{5}C+32\). The true temperature becomes

$$ F_{\mathrm{true}} =\frac{9}{5}(10)+32 =18+32 =50^\circ\mathrm{F}. $$

The estimate becomes

$$ F_{\mathrm{estimate}} =\frac{9}{5}(11)+32 =19.8+32 =51.8^\circ\mathrm{F}. $$

In Fahrenheit, the absolute error is \(51.8-50=1.8^\circ\mathrm{F}\), and the relative and percentage errors are

$$ E_{\mathrm{rel}}=\frac{1.8}{50}=0.036, \qquad E_{\%}=100(0.036)\%=3.6\%. $$

Check: the difference is \(1.8^\circ\mathrm{F}\), consistent with multiplying the \(1^\circ\mathrm{C}\) difference by \(9/5\). The relative error changes from \(10\%\) to \(3.6\%\), because the conversion includes the added \(32\); it is not a multiplication of both numerical values by one common factor.

A common mistake: dividing by the estimate

A frequent error is to divide by \(|\hat y|\) instead of \(|y|\). That computes a different ratio, not the relative error defined here. For the quadratic estimate above, dividing \(0.01\) by \(4.4\) gives an answer close to the correct relative error, but closeness does not make the denominator correct.

Common mistake: Using the estimate in the denominator: \(\frac{0.01}{4.4}\approx0.00227273\), or about \(0.227273\%\).

Correction: Relative error is absolute error divided by the magnitude of the true value: \(\frac{0.01}{4.41}=\frac{1}{441}\approx0.00226757\), or about \(0.226757\%\).

The distinction can be especially important when the estimate differs substantially from the true value. When the true value is zero, the relative error is undefined rather than something to calculate using the estimate as a substitute denominator.

Choosing and interpreting an error measure

Use absolute error when the size of the discrepancy in the given units is the main concern. Use relative error when you need to compare discrepancies against the magnitudes of the values being estimated. Percentage error is often convenient for communicating that relative comparison, but it contains the same information as relative error, just on a scale multiplied by \(100\).

When reporting any of these measures, identify the true value, the estimate, and the units where relevant. For a linearization estimate, show how \(L_a(x)\) was obtained and compare it with \(f(x)\). If only the estimate is available and the exact value is unknown, these definitions alone do not provide the actual error; an error cannot be calculated exactly without a true value or another justified way to determine it.

Keep the denominators and units in view: absolute error uses the difference, relative error divides that difference by the magnitude of the true value, and percentage error multiplies the relative error by \(100\). This separation makes it easier to judge both how far an estimate is from the truth and how important that difference is at the scale of the quantity.

Check Your Understanding

Use the definitions carefully, and state when a requested quantity is undefined.

  1. An exact value is \(25\), and its estimate is \(24.5\). Find the absolute, relative, and percentage errors.
  2. An exact function value is \(-8\), and its estimate is \(-7.6\). What is the relative error? Explain why the denominator is positive.
  3. Why can the same absolute error be less significant for a value near \(100\) than for a value near \(1\)?
  4. For a true value of zero and an estimate of \(0.2\), which of absolute, relative, and percentage error is defined?
  5. Explain why a conversion that multiplies both values by the same positive factor preserves relative error, while a conversion with an offset need not.

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon