Error and Relative Error of Approximations Examples 1
Recall from the Error and Relative Error of Approximations page that if $x_T$ represents a true value and $x_A$ represents an approximation of $x_T$, then the error of $x_A$ from $x_T$ is given by the formula:
(1)Furthermore, the relative error of $x_A$ from $x_T$ is given by the formula:
(2)We will now look at some more examples of computing errors and relative errors.
Example 1
An sample yields a true value of $x_T = 25044.33$. A mathematical model estimates the experiment for which this sample was taken and approximates $x_T$ as $x_A = 24993.53$. Find the error and relative error of $x_A$ from $x_T$.
Applying the error formula from above and we have that:
(3)And applying the relative error formula from above and we have that:
(4)Example 2
A function $p$ is defined on the interval $[0, 1]$ such that $0 ≤ p(x) ≤ 2$ for all $x \in [0, 1]$. Suppose that $p$ approximates a function $f(x) = x^2$ on the interval $[0, 1]$. Find the largest possible error of $p$ from $f$.
We are given that $0 ≤ p(x) ≤ 2$ for $x \in [0, 1]$. Furthermore, we note that the function we are approximating, $f$ is also bounded on $[0, 1]$. Furthermore, $f$ is increasing on $[0, 1]$. We can see this from the fact that $f(x) = x^2$ is a parabola that opens up whose vertex is at $(0, 0)$, or alternatively, we can see this since $f'(x) = 2x > 0$ for $x \in [0, 1]$. The minimum value of $f$ on $[0, 1]$ is $0$ and occurs at $x = 0$ since $f(0) = 0$, and furthermore, the maximum value of $f$ on $[0, 1]$ is $1$ and occurs at $x = 1$ since $f(1) = 1$. Therefore $0 ≤ f(x) ≤ 1$ for $x \in [0, 1]$. The largest possible error is thus $-2$ which occurs if $p(0) = 2$ and $f(0) = 0$.
From Example 2 above, we have bounded our error, that is for $x \in [0, 1]$ we have that:
(5)We will see that this will be important later when the true values for which we want to compute error for are unknown.