Absolute and Relative Error (numerical analysis)¶
Definition¶
The significance of an error is related to the magnitude of the quantity being measured. For example, an error of 1 when computing the population of the earth is less significant than computing the number of people in a classroom. Thus, we create absolute error and relative error.
\[
\begin{align}
\text{absolute error} &= \text{approximate value - true value}, \\ \\
\\
\text{relative error} &= \frac{\text{absolute error}}{\text{true value}}
\end{align}
\]
Another way of expressing the relationship between absolute error and relative error is:
\[
\text{approximate value} = \text{(true value)} \times \text{(1 + relative error)}
\]
Note that we don't actually know the true value. If we did, we wouldn't need to run approximations. We usually estimate or bound the error, and compute the relative error using the approximate value.