Approximation error

Short description: Mathematical concept

Graph of [math]\displaystyle{ f(x) = e^x }[/math] (blue) with its linear approximation [math]\displaystyle{ P_1(x) = 1 + x }[/math] (red) at a = 0. The approximation error is the gap between the curves, and it increases for x values further from 0.

The approximation error in a data value is the discrepancy between an exact value and some approximation to it. This error can be expressed as an absolute error (the numerical amount of the discrepancy) or as a relative error (the absolute error divided by the data value).

An approximation error can occur for a variety of reasons, among them a computing machine precision or measurement error (e.g. the length of a piece of paper is 4.53 cm but the ruler only allows you to estimate it to the nearest 0.1 cm, so you measure it as 4.5 cm).

In the mathematical field of numerical analysis, the numerical stability of an algorithm indicates the extent to which errors in the input of the algorithm will lead to large errors of the output; numerically stable algorithms to not yield a significant error in output when the input is malformed and vice versa.[1]

## Contents

* 1 Formal definition
* 2 Examples
* 3 Comparison
* 4 Polynomial-time approximation of real numbers
* 5 Instruments
* 6 Generalizations
* 7 See also
* 8 References
* 9 External links

## Formal definition

Given some value v, we say that vapprox approximates v with absolute error ε>0 if [2][3]

[math]\displaystyle{ |v-v_\text{approx}| \leq \varepsilon }[/math]

where the vertical bars denote the absolute value.

We say that vapprox approximates v with relative error η>0 if

> [math]\displaystyle{ |v-v_\text{approx}| \leq \eta\cdot v }[/math].

If v ≠ 0, then

[math]\displaystyle{ \eta = \frac{\epsilon}{|v|} = \left| \frac{v-v_\text{approx}}{v} \right| = \left| 1 - \frac{v_\text{approx}}{v} \right| }[/math].

The percent error (an expression of the relative error) is [3]

[math]\displaystyle{ \delta = 100\%\times\eta = 100\%\times\left| \frac{v-v_\text{approx}}{v} \right|. }[/math]

An error bound is an upper limit on the relative or absolute size of an approximation error.[4]

## Examples

As an example, if the exact value is 50 and the approximation is 49.9, then the absolute error is 0.1 and the relative error is 0.1/50 = 0.002 = 0.2%. As a practical example, when measuring a 6 mL beaker, the value read was 5 mL. The correct reading being 6 mL, this means the percent error in that particular situation is, rounded, 16.7%.

The relative error is often used to compare approximations of numbers of widely differing size; for example, approximating the number 1,000 with an absolute error of 3 is, in most applications, much worse than approximating the number 1,000,000 with an absolute error of 3; in the first case the relative error is 0.003 while in the second it is only 0.000003.

There are two features of relative error that should be kept in mind. First, relative error is undefined when the true value is zero as it appears in the denominator (see below). Second, relative error only makes sense when measured on a ratio scale, (i.e. a scale which has a true meaningful zero), otherwise it is sensitive to the measurement units. For example, when an absolute error in a temperature measurement given in Celsius scale is 1 °C, and the true value is 2 °C, the relative error is 0.5. But if the exact same approximation is made with the Kelvin scale, a 1 K absolute error with the same true value of 275.15 K = 2 °C gives a relative error of 3.63×10−3.

## Comparison

Statements about relative errors are sensitive to addition of constants, but not to multiplication by constants. For absolute errors, the opposite is true: are sensitive to multiplication by constants, but not to addition of constants.[5](p34)

## Polynomial-time approximation of real numbers

We say that a real value v is polynomially computable with absolute error from an input if, for every rational number ε>0, it is possible to compute a rational number vapprox that approximates v with absolute error ε, in time polynomial in the size of the input and the encoding size of ε (which is O(log(1/ε)). Analogously, v is polynomially computable with relative error if, for every rational number η>0, it is possible to compute a rational number vapprox that approximates v with relative error η, in time polynomial in the size of the input and the encoding size of η.

If v is polynomially computable with relative error (by some algorithm called REL), then it is also polynomially computable with absolute error. Proof. Let ε>0 be the desired absolute error. First, use REL with relative error η=1/2; find a rational number r1 such that |v-r1| ≤ |v|/2, and hence |v| ≤ 2 |r1|. If r1=0, then v=0 and we are done. Since REL is polynomial, the encoding length of r1 is polynomial in the input. Now, run REL again with relative error η=ε/(2 |r1|). This yields a rational number r2 that satisfies |v-r2| ≤ ε|v| / (2r1) ≤ ε, so it has absolute error ε as wished.[5](p34)

The reverse implication is usually not true. But, if we assume that some positive lower bound on |v| can be computed in polynomial time, e.g. |v| > b > 0, and v is polynomially computable with absolute error (by some algorithm called ABS), then it is also polynomially computable with relative error, since we can simply call ABS with absolute error ε = η b.

An algorithm that, for every rational number η>0, computes a rational number vapprox that approximates v with relative error η, in time polynomial in the size of the input and 1/η (rather than log(1/η)), is called an FPTAS.

## Instruments

In most indicating instruments, the accuracy is guaranteed to a certain percentage of full-scale reading. The limits of these deviations from the specified values are known as limiting errors or guarantee errors.[6]

## Generalizations

The definitions can be extended to the case when [math]\displaystyle{ v }[/math] and [math]\displaystyle{ v_{\text{approx}} }[/math] are n-dimensional vectors, by replacing the absolute value with an n-norm.[7]

## See also

* Accepted and experimental value
* Condition number
* Errors and residuals in statistics
* Experimental uncertainty analysis
* Machine epsilon
* Measurement error
* Measurement uncertainty
* Propagation of uncertainty
* Quantization error
* Relative difference
* Round-off error
* Uncertainty

## References

1. ↑ Weisstein, Eric W.. "Numerical Stability" (in en). https://mathworld.wolfram.com/.
2. ↑ Weisstein, Eric W.. "Absolute Error" (in en). https://mathworld.wolfram.com/.
3. ↑ 3.0 3.1 "Absolute and Relative Error | Calculus II". https://courses.lumenlearning.com/calculus2/chapter/absolute-and-relative-error/.
4. ↑ "Approximation and Error Bounds". http://www.math.wpi.edu/Course_Materials/MA1021B98/approx/node1.html#:~:text=Thus we introduce the term,bound the better the approximation..
5. ↑ 5.0 5.1 Template:Cite Geometric Algorithms and Combinatorial Optimization
6. ↑ Helfrick, Albert D. (2005) Modern Electronic Instrumentation and Measurement Techniques. p. 16. ISBN:81-297-0731-4
7. ↑ Golub, Gene; Charles F. Van Loan (1996). Matrix Computations – Third Edition. Baltimore: The Johns Hopkins University Press. pp. 53. ISBN 0-8018-5413-X.

## External links

* Weisstein, Eric W.. "Percentage error". http://mathworld.wolfram.com/PercentageError.html.

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Approximation error. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Approximation_error&oldid=3376352"