Numeric error propagation: Difference between revisions
Content added Content deleted
m (→{{header|REXX}}: added the REXX language.) |
m (added whitespace before the TOC (table of contents), added other whitespace and highlighting to the task's preamble.) |
||
Line 1: | Line 1: | ||
{{task}} |
{{task}} |
||
If f, a, and b are values with uncertainties σ<sub>f</sub>, σ<sub>a</sub>, and σ<sub>b</sub>. and c is a constant; then if f is derived from a, b, and c in the following ways, then σ<sub>f</sub> can be calculated as follows: |
|||
If '''f''', '''a''', and '''b''' are values with uncertainties σ<sub>f</sub>, σ<sub>a</sub>, and σ<sub>b</sub>, and '''c''' is a constant; |
|||
<br>then if '''f''' is derived from '''a''', '''b''', and '''c''' in the following ways, |
|||
<br>then σ<sub>f</sub> can be calculated as follows: |
|||
:;Addition/Subtraction |
:;Addition/Subtraction |
||
:* If f = a ± c, or f = c ± a then '''σ<sub>f</sub> = σ<sub>a</sub>''' |
:* If f = a ± c, or f = c ± a then '''σ<sub>f</sub> = σ<sub>a</sub>''' |
||
:* If f = a ± b then '''σ<sub>f</sub><sup>2</sup> = σ<sub>a</sub><sup>2</sup> + σ<sub>b</sub><sup>2</sup>''' |
:* If f = a ± b then '''σ<sub>f</sub><sup>2</sup> = σ<sub>a</sub><sup>2</sup> + σ<sub>b</sub><sup>2</sup>''' |
||
:;Multiplication/Division |
:;Multiplication/Division |
||
:* If f = ca or f = ac then '''σ<sub>f</sub> = |cσ<sub>a</sub>|''' |
:* If f = ca or f = ac then '''σ<sub>f</sub> = |cσ<sub>a</sub>|''' |
||
:* If f = ab or f = a / b then '''σ<sub>f</sub><sup>2</sup> = f<sup>2</sup>( (σ<sub>a</sub> / a)<sup>2</sup> + (σ<sub>b</sub> / b)<sup>2</sup>)''' |
:* If f = ab or f = a / b then '''σ<sub>f</sub><sup>2</sup> = f<sup>2</sup>( (σ<sub>a</sub> / a)<sup>2</sup> + (σ<sub>b</sub> / b)<sup>2</sup>)''' |
||
:;Exponentiation |
:;Exponentiation |
||
:* If f = a<sup>c</sup> then '''σ<sub>f</sub> = |fc(σ<sub>a</sub> / a)|''' |
:* If f = a<sup>c</sup> then '''σ<sub>f</sub> = |fc(σ<sub>a</sub> / a)|''' |
||
⚫ | |||
⚫ | ::This implementation of error propagation does not address issues of dependent and independent values. It is assumed that '''a''' and '''b''' are independent and so the formula for multiplication should not be applied to '''a*a''' for example. See [[Talk:Numeric_error_propagation|the talk page]] for some of the implications of this issue. |
||
⚫ | |||
⚫ | ::This implementation of error propagation does not address issues of dependent and independent values. It is assumed that a and b are independent and so the formula for multiplication should not be applied to a*a for example. See [[Talk:Numeric_error_propagation|the talk page]] for some of the implications of this issue. |
||
;Task details: |
;Task details: |
||
Line 20: | Line 25: | ||
# Given coordinates and their errors:<br>x1 = 100 ± 1.1<br>y1 = 50 ± 1.2<br>x2 = 200 ± 2.2<br>y2 = 100 ± 2.3<br> if point p1 is located at (x1, y1) and p2 is at (x2, y2); calculate the distance between the two points using the classic pythagorean formula:<br> '''d = √((x1 - x2)<sup>2</sup> + (y1 - y2)<sup>2</sup>)''' |
# Given coordinates and their errors:<br>x1 = 100 ± 1.1<br>y1 = 50 ± 1.2<br>x2 = 200 ± 2.2<br>y2 = 100 ± 2.3<br> if point p1 is located at (x1, y1) and p2 is at (x2, y2); calculate the distance between the two points using the classic pythagorean formula:<br> '''d = √((x1 - x2)<sup>2</sup> + (y1 - y2)<sup>2</sup>)''' |
||
# Print and display both '''d''' and its error. |
# Print and display both '''d''' and its error. |
||
;References: |
;References: |
||
* [http://casa.colorado.edu/~benderan/teaching/astr3510/stats.pdf A Guide to Error Propagation] B. Keeney, 2005. |
* [http://casa.colorado.edu/~benderan/teaching/astr3510/stats.pdf A Guide to Error Propagation] B. Keeney, 2005. |
||
* [[wp:Propagation of uncertainty|Propagation of uncertainty]] Wikipedia. |
* [[wp:Propagation of uncertainty|Propagation of uncertainty]] Wikipedia. |
||
;Cf.: |
;Cf.: |
||
* [[Quaternion type]] |
* [[Quaternion type]] |
||
<br><br> |
|||
=={{header|Ada}}== |
=={{header|Ada}}== |
||