Content deleted Content added
m I added some extra links and made some passages more interesting Tags: Reverted Visual edit Disambiguation links added Newcomer task |
Owen Reich (talk | contribs) Link suggestions feature: 3 links added. |
||
(7 intermediate revisions by 6 users not shown) | |||
Line 1:
{{Short description|Mathematical concept}}
{{redirect-distinguish|Absolute error|Absolute deviation}}
{{redirect-distinguish|Relative error|Relative change}}
{{broader|Approximation}}
[[File:E^x with linear approximation.png|thumb|
The '''
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 [[mathematics|mathematical]] field of [[numerical analysis]], the crucial concept of [[numerical stability]]
==Formal definition==
Given some true or exact value ''v'', we
:<math>|v-v_\text{approx}| \leq \varepsilon</math>
where the vertical bars, | |, unambiguously denote the [[absolute value]] of the difference between the true value ''v'' and its approximation ''v''<sub>approx</sub>. This mathematical operation signifies the magnitude of the error, irrespective of whether the approximation is an overestimate or an underestimate.
:<math> \eta = \frac{|v-v_\
= \left| \frac{v-v_\text{approx}}{v} \right|
= \left| 1 - \frac{v_\text{approx}}{v} \right|
</math>.
Note that the first term in the equation above implicitly defines `ε` as `|v-v_approx|` if `η` is `ε/|v|`.
The '''percent error''',
:<math>\delta = 100\%\times\eta = 100\%\times\left| \frac{v-v_\text{approx}}{v} \right|.</math>
An '''error bound'''
==Examples==
{{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 [[Level of measurement#Ratio scale|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{{e|-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) − (''v''<sub>approx</sub>+c) = ''v'' − ''v''<sub>approx</sub>).<ref name=":02">{{Cite Geometric Algorithms and Combinatorial Optimization}}</ref>{{Rp|page=34}}
== Polynomial-time approximation of real numbers ==
The reverse implication, namely that polynomial computability with absolute error implies polynomial computability with relative error, is
An algorithm that, for every given rational number ''η'' > 0, successfully computes a rational number ''v''<sub>approx</sub> 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
==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
== Generalizations ==
{{Expand section|date=April 2023}}
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
</ref>
|