NU1–NU3 - Absolute, relative and propagated errors
NU1 measures signed absolute and relative errors and follows them through arithmetic. NU2 distinguishes an exact change in a function from a small-error estimate or a guaranteed bound. NU3 investigates why mathematically equivalent orders of calculation can give different finite-precision answers.
Absolute error records a signed difference
Two input approximations are each too large. Must their quotient also be too large? Surprisingly, their errors can cancel exactly in the quotient. To see why, keep the direction of each error, rather than just its size.
You already know
A function value is an output, and is its local gradient. Evaluate fractions with full available precision. Rounding only the final display differs from rounding an intermediate value before it is reused.
A length whose exact value is might be approximated by . The discrepancy is , but an equally large discrepancy below the truth has the opposite sign.
Absolute and relative error
Write the exact value as and its approximation as . In this course the absolute error is the signed quantity
The relative error, for , is
The magnitude of the absolute error is . Absolute error has the original quantity's units; relative error has no units. A signed percentage error is .
These error definitions are not in the formula booklet: learn them.
“Absolute” here does not mean “take the modulus”. Some conventions use that word for the error magnitude, so say which convention you use. Keeping the sign helps when propagating actual errors.
Worked example 1: an overestimate
Question. An exact length is , approximated by . Find the absolute error, relative error and percentage error.
Plan. Subtract exact from approximate, then divide by the exact length.
Why this step? Dividing by would measure the discrepancy relative to the approximation, rather than use the defined relative error.
Answer. Absolute error , relative error , percentage error .
Check. The positive error agrees with an approximation above the exact positive length.
Change only the approximation from to . The error magnitude stays fixed, but its direction reverses.
Worked example 2: an underestimate
Question. Find the same errors when the exact length is and its approximation is .
Plan. Use the same subtraction order and the same exact denominator.
Why this step? Taking an absolute value now would discard information needed to distinguish this underestimate from the previous overestimate.
Answer. Absolute error , relative error , percentage error . The absolute-error magnitude is .
Check. , recovering the approximation.
For a negative exact value, the sign of relative error can differ from the sign of absolute error because its denominator is negative. At exact value zero, relative error is undefined.
Watch out
Wrong: always divide by the approximation or always make the error positive. Right: use and divide by ; use only when the magnitude is required.
The next quantity is signed, making the denominator's sign matter.
Separate exact propagation from first-order rules
For known exact and approximate inputs, the safest exact calculation is to form the exact output and the approximate output, then subtract. Compact propagation formulas explain the relationship.
Let and . A sum has error ; a difference has error . If only bounds and are known, either output's absolute-error magnitude is at most .
Exact arithmetic error identities
For the sum and difference,
For a product with ,
For a quotient with , and ,
These identities are exact.
Not in the formula booklet: learn it.
When both relative errors are small, ignoring their products gives and . These first-order approximations are not guaranteed error bounds and are not supplied in the booklet. An exact calculation still matters when leading terms cancel.
Worked example 3: equal relative errors
Question. Exact values , are approximated by , . Find the signed absolute errors in the sum, difference, product and quotient. Compare the product and quotient relative errors with first-order estimates.
Plan. Compute both outputs for each operation, then use .
| Operation | Exact output | Approximate output |
|---|---|---|
| Sum | ||
| Difference | ||
| Product | ||
| Quotient |
Why this step? The quotient is , so its common error factor cancels exactly, not merely approximately.
Answer. The absolute errors are , , and . The first-order relative estimates are for the product and for the quotient, compared with exact values and .
Check. The sum/difference bound from input magnitudes is . Both calculated errors satisfy it.
Change only the second approximation to , making its relative error . The signs now favour cancellation in the product rather than in the quotient.
Worked example 4: opposite relative errors
Question. Repeat the calculations for , , , .
Plan. Form the new outputs, with and .
Why this step? The first-order product estimate is zero, but the omitted cross-term is . Zero first-order error does not mean zero actual error.
Answer. Absolute errors: , , , . The exact product relative error is , compared with first-order estimate ; the quotient's exact relative error is , approximately , compared with estimate .
Check. The difference error now reaches the same bound. Also , matching the exact quotient calculation.
A small absolute error in a difference can still be large relative to a very small exact difference. The next lesson examines that loss of relative precision more closely.
Watch out
Wrong: promote or from an approximation to an exact identity. Right: retain the product term or quotient denominator when exact errors are requested.
Change the relative-error magnitudes while retaining opposite signs.
A tangent estimate is different from a guarantee
Replacing by changes a function's output by . A tangent line estimates that change, but curvature means the estimate need not equal the actual error.
Function error: exact, estimated and bounded
If approximates , its exact signed error is
For a small input error , a first-order estimate is
If throughout the interval between and , a rigorous bound is
The bound requires a derivative bound over the whole interval, not just at its starting point.
Not in the formula booklet: learn it.
Continue this lesson.
You’re previewing NovaLearn without an account. Create a free account to read the rest.
Create free account