Content deleted Content added
Clarify wording. Add expansion box for Generalizations section. An example of an approximation error formula using the n-norm would be helpful. |
|||
Line 2:
[[File:E^x with linear approximation.png|thumb|Graph of <math>f(x) = e^x</math> (blue) with its linear approximation <math>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
An approximation error can occur
In the [[mathematics|mathematical]] field of [[numerical analysis]], the [[numerical stability]] of an [[algorithm]] indicates how
==Formal definition==
:<math>\epsilon = |v-v_\text{approx}|\ ,</math>
Line 25 ⟶ 23:
and the '''percent error''' (an expression of the relative error) is
:<math>\delta = 100\%\times\eta
An '''error bound''' is an upper limit on the relative or absolute size of an approximation error.
===Generalizations===
{{Expand section|date=April 2023}}
These definitions can be extended to the case when <math>v</math> and <math>v_{\text{approx}}</math> are [[Euclidean vector|''n''-dimensional vectors]], by replacing the absolute value with an [[norm (mathematics)|''n''-norm]].<ref name="GOLUB_MAT_COMP2.2.3">{{cite book|last=Golub|first=Gene|author-link=Gene_H._Golub|author2=Charles F. Van Loan|title=Matrix Computations – Third Edition|publisher=The Johns Hopkins University Press|year=1996|___location=Baltimore|pages=53|isbn=0-8018-5413-X}}
</ref>
Line 37 ⟶ 34:
==Examples==
{{Diophantine_approximation_graph.svg}}
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%.
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
There are two features of relative error that should be kept in mind.
==Instruments==
|