Approximation error

Short description: Mathematical concept

"Absolute error" redirects here. It is not to be confused with Absolute deviation.

"Relative error" redirects here. It is not to be confused with Relative change.

For broader coverage of this topic, see Approximation.

Graph of f(x)=ex (blue) with its linear approximation P1(x)=1+x (red) at a = 0. The approximation error, visually represented as the vertical gap between the two curves, demonstrably increases for values of x that are positioned further from the point of approximation, which in this case is x = 0.

The approximation error in a given data value represents the significant discrepancy that arises when an exact, true value is compared against some approximation derived for it. This inherent error in approximation can be quantified and expressed in two principal ways: as an absolute error, which denotes the direct numerical magnitude of this discrepancy irrespective of the true value's scale, or as a relative error, which provides a scaled measure of the error by considering the absolute error in proportion to the exact data value, thus offering a context-dependent assessment of the error's significance.

An approximation error can manifest due to a multitude of diverse reasons. Prominent among these are limitations related to computing machine precision, where digital systems cannot represent all real numbers with perfect accuracy, leading to unavoidable truncation or rounding. Another common source is inherent measurement error, stemming from the practical limitations of instruments, environmental factors, or observational processes (for instance, if the actual length of a piece of paper is precisely 4.53 cm, but the measuring ruler only permits an estimation to the nearest 0.1 cm, this constraint could lead to a recorded measurement of 4.5 cm, thereby introducing an error).

In the mathematical field of numerical analysis, the crucial concept of numerical stability associated with an algorithm serves to indicate the extent to which initial errors or perturbations present in the input data of the algorithm are likely to propagate and potentially amplify into substantial errors in the final output. Algorithms that are characterized as numerically stable are robust in the sense that they do not yield a significantly magnified error in their output even when the input is slightly malformed or contains minor inaccuracies; conversely, numerically unstable algorithms may exhibit dramatic error growth from small input changes, rendering their results unreliable.[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 true or exact value v, we formally state that an approximation vapprox estimates or represents v where the magnitude of the absolute error is bounded by a positive value ε (i.e., ε>0), if the following inequality holds: [2][3]

|v−vapprox|≤ε

where the vertical bars, | |, unambiguously denote the absolute value of the difference between the true value v and its approximation vapprox. This mathematical operation signifies the magnitude of the error, irrespective of whether the approximation is an overestimate or an underestimate.

Similarly, we state that vapprox approximates the value v where the magnitude of the relative error is bounded by a positive value η (i.e., η>0), provided v is not zero (v ≠ 0), if the subsequent inequality is satisfied:

> |v−vapprox|≤η⋅|v|

> .

This definition ensures that η acts as an upper bound on the ratio of the absolute error to the magnitude of the true value. If v ≠ 0, then the actual relative error, often also denoted by η in context (representing the calculated value rather than a bound), is precisely calculated as:

η=|v−vapprox||v|=|v−vapproxv|=|1−vapproxv|.

Note that the first term in the equation above implicitly defines `ε` as `|v-v_approx|` if `η` is `ε/|v|`.

The percent error, often denoted as δ, is a common and intuitive way of expressing the relative error, effectively scaling the relative error value to a percentage for easier interpretation and comparison across different contexts: [3]

δ=100%×η=100%×|v−vapproxv|.

An error bound rigorously defines an established upper limit on either the relative or the absolute magnitude of an approximation error. Such a bound thereby provides a formal guarantee on the maximum possible deviation of the approximation from the true value, which is critical in applications requiring known levels of precision.[4]

## Examples

Template:Diophantine approximation graph.svg To illustrate these concepts with a numerical example, consider an instance where the exact, accepted value is 50, and its corresponding approximation is determined to be 49.9. In this particular scenario, the absolute error is precisely 0.1 (calculated as |50 − 49.9|), and the relative error is calculated as the absolute error 0.1 divided by the true value 50, which equals 0.002. This relative error can also be expressed as 0.2%. In a more practical setting, such as when measuring the volume of liquid in a 6 mL beaker, if the instrument reading indicates 5 mL while the true volume is actually 6 mL, the percent error for this particular measurement situation is, when rounded to one decimal place, approximately 16.7% (calculated as |(6 mL − 5 mL) / 6 mL| × 100%).

The utility of relative error becomes particularly evident when it is employed to compare the quality of approximations for numbers that possess widely differing magnitudes; for example, approximating the number 1,000 with an absolute error of 3 results in a relative error of 0.003 (or 0.3%). This is, within the context of most scientific or engineering applications, considered a significantly less accurate approximation than approximating the much larger number 1,000,000 with an identical absolute error of 3. In the latter case, the relative error is a mere 0.000003 (or 0.0003%). In the first case, the relative error is 0.003, whereas in the second, more favorable scenario, it is a substantially smaller value of only 0.000003. This comparison clearly highlights how relative error provides a more meaningful and contextually appropriate assessment of precision, especially when dealing with values across different orders of magnitude.

There are two crucial features or caveats associated with the interpretation and application of relative error that should always be kept in mind. Firstly, relative error becomes mathematically undefined whenever the true value (v) is zero, because this true value appears in the denominator of its calculation (as detailed in the formal definition provided above), and division by zero is an undefined operation. Secondly, the concept of relative error is most truly meaningful and consistently interpretable only when the measurements under consideration are performed on a ratio scale. This type of scale is characterized by possessing a true, non-arbitrary zero point, which signifies the complete absence of the quantity being measured. If this condition of a ratio scale is not met (e.g., when using interval scales like Celsius temperature), the calculated relative error can become highly sensitive to the choice of measurement units, potentially leading to misleading interpretations. For example, when an absolute error in a temperature measurement given in the Celsius scale is 1 °C, and the true value is 2 °C, the relative error is 0.5 (or 50%, calculated as |1°C / 2°C|). However, if this exact same approximation, representing the same physical temperature difference, is made using the Kelvin scale (which is a ratio scale where 0 K represents absolute zero), a 1 K absolute error (equivalent in magnitude to a 1 °C error) with the same true value of 275.15 K (which is equivalent to 2 °C) gives a markedly different relative error of approximately 0.00363, or about 3.63×10−3 (calculated as |1 K / 275.15 K|). This disparity underscores the importance of the underlying measurement scale.

## Comparison

When comparing the behavior and intrinsic characteristics of these two fundamental error types, it is important to recognize their differing sensitivities to common arithmetic operations. Specifically, statements and conclusions made about relative errors are notably sensitive to the addition of a non-zero constant to the underlying true and approximated values, as such an addition alters the base value against which the error is relativized, thereby changing the ratio. However, relative errors remain unaffected by the multiplication of both the true and approximated values by the same non-zero constant, because this constant would appear in both the numerator (of the absolute error) and the denominator (the true value) of the relative error calculation, and would consequently cancel out, leaving the relative error unchanged. Conversely, for absolute errors, the opposite relationship holds true: absolute errors are directly sensitive to the multiplication of the underlying values by a constant (as this scales the magnitude of the difference itself), but they are largely insensitive to the addition of a constant to these values (since adding the same constant to both the true value and its approximation does not change the difference between them: (v+c) − (vapprox+c) = v − vapprox).[5]: 34

## Polynomial-time approximation of real numbers

In the realm of computational complexity theory, we define that a real value v is polynomially computable with absolute error from a given input if, for any specified rational number ε > 0 representing the desired maximum permissible absolute error, it is algorithmically possible to compute a rational number vapprox such that vapprox approximates v with an absolute error no greater than ε (formally, |v − vapprox| ≤ ε). Crucially, this computation must be achievable within a time duration that is polynomial in terms of the size of the input data and the encoding size of ε (the latter typically being of the order O(log(1/ε)) bits, reflecting the number of bits needed to represent the precision). Analogously, the value v is considered polynomially computable with relative error if, for any specified rational number η > 0 representing the desired maximum permissible relative error, it is possible to compute a rational number vapprox that approximates v with a relative error no greater than η (formally, |(v − vapprox)/v| ≤ η, assuming v ≠ 0). This computation, similar to the absolute error case, must likewise be achievable in an amount of time that is polynomial in the size of the input data and the encoding size of η (which is typically O(log(1/η)) bits).

It can be demonstrated that if a value v is polynomially computable with relative error (utilizing an algorithm that we can designate as REL), then it is consequently also polynomially computable with absolute error. Proof sketch: Let ε > 0 be the target maximum absolute error that we wish to achieve. The procedure commences by invoking the REL algorithm with a chosen relative error bound of, for example, η = 1/2. This initial step aims to find a rational number approximation r1 such that the inequality |v − r1| ≤ |v|/2 holds true. From this relationship, by applying the reverse triangle inequality (|v| − |r1| ≤ |v − r1|), we can deduce that |v| ≤ 2|r1| (this holds assuming r1 ≠ 0; if r1 = 0, then the relative error condition implies v must also be 0, in which case the problem of achieving any absolute error ε > 0 is trivial, as vapprox = 0 works, and we are done). Given that the REL algorithm operates in polynomial time, the encoding length of the computed r1 will necessarily be polynomial with respect to the input size. Subsequently, the REL algorithm is invoked a second time, now with a new, typically much smaller, relative error target set to η' = ε / (2|r1|) (this step also assumes r1 is non-zero, which we can ensure or handle as a special case). This second application of REL yields another rational number approximation, r2, that satisfies the condition |v − r2| ≤ η'|v|. Substituting the expression for η' gives |v − r2| ≤ (ε / (2|r1|)) |v|. Now, using the previously derived inequality |v| ≤ 2|r1|, we can bound the term: |v − r2| ≤ (ε / (2|r1|)) × (2|r1|) = ε. Thus, the approximation r2 successfully approximates v with the desired absolute error ε, demonstrating that polynomial computability with relative error implies polynomial computability with absolute error.[5]: 34

The reverse implication, namely that polynomial computability with absolute error implies polynomial computability with relative error, is generally not true without imposing additional conditions or assumptions. However, a significant special case exists: if one can assume that some positive lower bound b on the magnitude of v (i.e., |v| > b > 0) can itself be computed in polynomial time, and if v is also known to be polynomially computable with absolute error (perhaps via an algorithm designated as ABS), then v also becomes polynomially computable with relative error. This is because one can simply invoke the ABS algorithm with a carefully chosen target absolute error, specifically εtarget = ηb, where η is the desired relative error. The resulting approximation vapprox would satisfy |v − vapprox| ≤ ηb. To see the implication for relative error, we divide by |v| (which is non-zero): |(v − vapprox)/v| ≤ (ηb)/|v|. Since we have the condition |v| > b, it follows that b/|v| < 1\. Therefore, the relative error is bounded by η × (b/|v|) < η × 1 = η, which is the desired outcome for polynomial computability with relative error.

An algorithm that, for every given rational number η > 0, successfully computes a rational number vapprox that approximates v with a relative error no greater than η, and critically, does so in a time complexity that is polynomial in both the size of the input and in the reciprocal of the relative error, 1/η (rather than being polynomial merely in log(1/η), which typically allows for faster computation when η is extremely small), is known as a Fully Polynomial-Time Approximation Scheme (FPTAS). The dependence on 1/η rather than log(1/η) is a defining characteristic of FPTAS and distinguishes it from weaker approximation schemes.

## Instruments

In the context of most indicating measurement instruments, such as analog or digital voltmeters, pressure gauges, and thermometers, the specified accuracy is frequently guaranteed by their manufacturers as a certain percentage of the instrument's full-scale reading capability, rather than as a percentage of the actual reading. The defined boundaries or limits of these permissible deviations from the true or specified values under operational conditions are commonly referred to as limiting errors or, alternatively, guarantee errors. This method of specifying accuracy implies that the maximum possible absolute error can be larger when measuring values towards the higher end of the instrument's scale, while the relative error with respect to the full-scale value itself remains constant across the range. Consequently, the relative error with respect to the actual measured value can become quite large for readings at the lower end of the instrument's scale.[6]

## Generalizations

The fundamental definitions of absolute and relative error, as presented primarily for scalar (one-dimensional) values, can be naturally and rigorously extended to more complex scenarios where the quantity of interest v and its corresponding approximation vapprox are n-dimensional vectors, matrices, or, more generally, elements of a normed vector space. This important generalization is typically achieved by systematically replacing the absolute value function (which effectively measures magnitude or "size" for scalar numbers) with an appropriate vector n-norm or matrix norm. Common examples of such norms include the L1 norm (sum of absolute component values), the L2 norm (Euclidean norm, or square root of the sum of squared components), and the L∞ norm (maximum absolute component value). These norms provide a way to quantify the "distance" or "difference" between the true vector (or matrix) and its approximation in a multi-dimensional space, thereby allowing for analogous definitions of absolute and relative error in these higher-dimensional contexts.[7] For instance, when dealing with image processing, where images are often represented as matrices, the Frobenius norm is frequently used to quantify the overall difference between an original image and a compressed or reconstructed version. In statistical modeling with vector data, the norm is a common choice for assessing the performance of a model due to its analytical properties.

## 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 ed.). 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=4229603"