Friday, October 5, 2018

error analysis - Do you round off insignificant digits in the middle of a calculation?


I have a question... Do you round with significant digits during each subcalculation of a problem or only when the entire problem is complete?


Example:


multiply the following number:


$$1.8 \times 2.01 \times 1.542$$


saving rounding until the end:


$$(1.8 \times 2.10) \times (1.542) = (3.78)\times(1.542) = (5.82876) \to 5.8$$



rounding at each sub-calculation:


$$(1.8 \times 2.10) \times (1.542) = (3.8)\times(1.542) = (5.8596) \to 5.9$$


I also have the strong feeling that if you round at each sub-calculation then multiplication is no longer commutative (although after experiencing matrices that no longer seems to be too much of a problem)



Answer



Significant digits is a convention that only affects how you write numbers, not what the numbers actually are. So you only round when you are asked to drop down to a given number of significant digits - that is, at the end.


Think of it like this: there's a difference between a number, which is an abstract idea, and a written representation of a number. Some numbers have exact written representations; all numbers have approximate written representations, which represent another, nearby number. For example, the notation $5.82876$ is an exact representation of a particular number, and $5.8$ is an approximate written representation, to two significant figures, of the same number. $5.8$ is also an approximate written representation (to two significant digits) of many other numbers, such as $5.810394$ and $5.79928129$. This is the idea behind uncertainty, and significant digits: if you are given the written representation $5.8$, you don't know which actual number it represents - it could be anything between $5.75$ and $5.85$. The only exception is if you are told that $5.8$ is an exact representation, which uniquely specifies which number you are supposed to take it to mean.


When you calculate the product $1.8\times 2.01\times 1.542$, you start with three written representations which you are supposed to assume are exact. Then you multiply the first two of them, and get a number which is exactly represented by the notation $3.78$. Now, it's true that $3.8$ is an approximate written representation of that number. But does that fact change what the number is? No. If you do the intermediate rounding, you're effectively deciding to replace one number, the one which is exactly represented by $3.78$, which another number, the one which is exactly represented by $3.8$. And the operation "replace one number with another number" is not part of the mathematical expression you are supposed to simplify. So don't do it.


No comments:

Post a Comment

classical mechanics - Moment of a force about a given axis (Torque) - Scalar or vectorial?

I am studying Statics and saw that: The moment of a force about a given axis (or Torque) is defined by the equation: $M_X = (\vec r \times \...