AQA 7517, section 4.5.4.6
When a number is stored or calculated with a rounding error (4.5.4.5), we can measure how big the error is in two ways.
Absolute error
The absolute error is the size of the difference between the true value and the stored (or measured) value:
The bars mean "ignore the sign", so the error is never negative. Absolute error is in the same units as the value.
Example: the true value is and the stored value is .
Relative error
The relative error shows the error as a fraction of the actual value:
Multiply by 100 to give a percentage. It has no units.
Example (same numbers):
Why both are needed
The same absolute error can be tiny or huge depending on how big the number is.
| Actual | Stored | Absolute error | Relative error |
|---|---|---|---|
| 1000.4 | 1000.5 | 0.1 | |
| 0.4 | 0.5 | 0.1 | |
| 1.02 | 1.00 | 0.02 |
Large magnitude numbers
An absolute error of 0.1 on a value around 1000 is negligible: the relative error is only 0.01%. The absolute error can look large, but the relative error shows it is unimportant.
Small magnitude numbers
The same absolute error of 0.1 on a value of 0.4 is a 25% error, which is serious. For numbers near zero, the relative error is far more informative.
Numbers close to one
For a number close to 1, dividing by the actual value makes little difference, so the absolute and relative errors are about the same size. In the example above, the absolute error is 0.02 and the relative error is about 0.0196 (1.96%).
Absolute and relative error in the number formats
- In fixed point, the absolute error is about the same for every number (at most half of the smallest place value), so small numbers have a large relative error.
- In floating point, the relative error stays roughly constant, because the mantissa always keeps the same number of significant bits. The absolute error grows as the numbers get bigger.
Worked example
Task: the true length of a bridge is 250.00 m and a computer stores 249.75 m. A bolt is truly 2.00 cm and is stored as 1.75 cm. Compare the errors.
| Actual | Stored | Absolute error | Relative error | |
|---|---|---|---|---|
| Bridge | 250.00 m | 249.75 m | 0.25 m | |
| Bolt | 2.00 cm | 1.75 cm | 0.25 cm |
Both have the same absolute error (0.25 in their own units), but a 0.1% error in the bridge is trivial, whereas a 12.5% error in the bolt is a big problem. The relative error tells you how serious the error is.
Exam tip: quote the formulas. Absolute error is |actual − stored|, and relative error is absolute error divided by the actual value (often as a percentage). Explain which is more useful: relative error for very large or very small numbers, and either for numbers near 1.
Check yourself
The true value is 8.0 and the stored value is 7.9. Find the absolute and relative errors
Absolute error: . Relative error: , which is 1.25%.
Why is relative error more useful than absolute error for very small numbers?
An error that is small in absolute terms can be a large fraction of a tiny number. Relative error shows that proportion.
How do the absolute and relative errors compare for a number close to 1?
They are almost the same size, because dividing by a number close to 1 changes it very little.