Approximation error: Difference between revisions

Content deleted Content added
Citation bot (talk | contribs)
Alter: author-link. | Use this bot. Report bugs. | Suggested by Spinixster | Category:Articles to be expanded from April 2023 | #UCB_Category 411/626
m clean up spacing around commas and other punctuation fixes, replaced: ,b → , b
Line 1:
{{Short description|Mathematical concept}}
{{broader|Approximation}}
{{redirect-distinguish|Absolute error|Absolute deviation}}
{{broader|Approximation}}
[[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 [[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&nbsp;cm but the ruler only allows you to estimate it to the nearest 0.1 &nbsp;cm, so you measure it as 4.5 &nbsp;cm).
 
In the [[mathematics|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. <ref>{{Cite web |last=Weisstein |first=Eric W. |title=Numerical Stability |url=https://mathworld.wolfram.com/ |access-date=2023-06-11 |website=mathworld.wolfram.com |language=en}}</ref>
 
==Formal definition==
Given some value ''v'' and its approximation ''v''<sub>approx</sub>, the '''absolute error''' is
 
:<math>\epsilon = |v-v_\text{approx}|\ ,</math> <ref>{{Cite web |last=Weisstein |first=Eric W. |title=Absolute Error |url=https://mathworld.wolfram.com/ |access-date=2023-06-11 |website=mathworld.wolfram.com |language=en}}</ref><ref name=":0">{{Cite web |title=Absolute and Relative Error {{!}} Calculus II |url=https://courses.lumenlearning.com/calculus2/chapter/absolute-and-relative-error/ |access-date=2023-06-11 |website=courses.lumenlearning.com}}</ref>
Line 40:
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&nbsp;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 [[Level_of_measurementLevel of measurement#Ratio_scaleRatio scale|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&nbsp;°C, and the true value is 2&nbsp;°C, the relative error is 0.5. But if the exact same approximation is made with the [[Kelvin scale]], a 1&nbsp;K absolute error with the same true value of 275.15&nbsp;K = 2 &nbsp;°C gives a relative error of 3.63{{e|-3}}.
 
==Instruments==