UnitMath FAQ ( Precision ) Last Modified: 2/3/2000
Examples | FAQ | Home | Sales $$$ | What's New | Windows demo |
Precision is the exactness ( uncertainty ) of a measurement.
All measurements have uncertainties that range from exact to the really rough "ball park figure". For example there is exactly one item being measured below, but its length is not exact. Due to the unevenness of the object and the courseness of the ruler, the best we can say is the length is about 4.8 inches. It would be misleading to say the object has a length of 4.81950 inches.
Precision is often represented in terms of significant digits.
Value | Low | High | % { ( high - low ) / low } |
---|---|---|---|
5. | 4.5 | 5.5 | 22.2% |
4.8 | 4.75 | 5.85 | 2.1% |
4.81950 | 4.819495 | 4.819505 | 2.1/10,000 % |
Significant digits are very useful in estimating the precision of a calculation. The rule of thumb for multiplication and division is: the precision of the answer has no more significant digits than the smallest number of significant digits in the equation. Therefore 8.95 * 0.53 ~ 4.744 would have at best 2 significant digits in the answer so 8.95 * 0.53 ~ 4.7.
If you were told the cost of an item is "$100 give or take", you would be very interested in finding out what give or take meant. Is that give or take $1 or $10,000? Give or take is the precision of the $100.
The price of gold changes, but recently has traded between $280 and $350 a troy ounce, so your bar's worth:
(15 pm 1/2) pounds * $( 280 to 350 )/ounce_troy ~ ( 59,208.3 to 68,906.3 to 79,114.6 ) $
Note: "pm" means plus or minus.
Even based on this imprecise data the $40,000 is to low.
Now, if you are offered $80,000 don't hesitate because that's more than the best case based on the precision of your current data. If you insist on more precision you will know your bars worth much more precisely ( within the above range ), but the increased precision will take time, during which the $80,000 offer will likely be retracted.
An offer of $70,000 may still be a good deal, but you would want to get more precise weight and gold exchange rates before you make the decision.
15.123 pounds * $( 301 to 315 )/ounce_troy ~ ( 66,381. to 67,927. to 69,474. ) $
As you can see getting better precision and losing $10,000+ ( $80,000 - 69,000 ) is expensive.
Ridiculous Precision
Assume that the distance is exact, and that you drive exactly 55 mph the entire way
driveTime: 237 miles / ( 60 mph );
driveTime as hours & minutes & seconds = 3 hours + 57 minutes
A much more reasonable answer
The mileage may change ( detours ), and the average speed can't be exactly known before hand.
driveTime: ( 230 to 260 ) miles / ( ( 55 to 65 ) mph );
driveTime as hours ~ ( 3.5 to 4.7 ) hours
So if you give yourself 5 hours you should have no problem, but if you only give yourself 4 hours you will likely be late.
Significant digits are a crude measure of the uncertainty. Even when done correctly in simple calculations significant digits are crude. For example if we solve the simple equation 1.1 * 1.2 * 1.3 * 14. Significant digits misses the true uncertainty by nearly a factor of ten. The following table shows the different results.
Answer | Low | High | % Error | Comment |
---|---|---|---|---|
24.024 | 24.024 | 24.024 | 0% | Assume exact numbers |
24. | 23.5 | 24.5 | 4.2% | Assume 2 significant digits |
20.38 to 28.14 | 20.38 | 28.14 | 38.1% | Using UnitMath |
The low estimate is 1.05 * 1.15 * 1.25 * 13.5 ~ 20.38 , and the high estimate is 1.15 * 1.25 * 1.35 * 14.5 ~ 28.14 . For information on making decimals exact see How can I make $49.95 exact?
To put the above numbers into perspective, assume that you were calculating the cost of a project in millions of dollars. If you used significant digits you'd say that 25 million will cover the project with no problem. When the actual project is nearing completion you could find that you are several million short, and nobody likes cost overruns.
With UnitMath you would know that the cost could run as high as 28.2 million, and could budget appropriately, or you could get better data to reduce the uncertainty.
The following examples show that when calculations involve other than multiplication and division significant digits don't apply, or are often very misleading.
Equation | Using S.D. | The Correct Answer | Comment |
---|---|---|---|
12345.2 + 0.4 | 1.e4 | ~ 12,346 | Significant digits don't apply. |
2.2^5 | 51. | ~ 45.9 to 51.5 to 57.7 | Significant digits are too precise. |
tan( 89.9 deg ) | 573. | ~ 382. to 573. to 1,146 | Significant digits are too precise. |
cos( 0.3 deg ) | 1. | ~ 1.0000 | Significant digits are not precise enough. |
UnitMath correctly handles precision with all operators { +, -, *, ... } and all functions { abs(), ... tanh() } in all calculations.
There are four preferences that effect the output:
precision( year_Sidereal ) as seconds ~ 1.037 seconds
precision(year_Tropical) as milliseconds ~ 86.400 milliseconds
precision( density_Of_Mercury ) as gram/cc = 0.09 gram/cc
precision( meter ) = 0
Example: For a tank with sides 12.4 m, 24.5 inches, and 15.3 feet in length, find the variability of the volume.
volume: 12.4 m * 24.5 inches * 15.3 feet;
volume ~ ( 9,418. to 9,595. ) gal
precision( volume ) ~ 177.6 gal
177.6 gallon /volume as % ~ 1.9 %
The above calculations show:
volume range is ~ ( 9,418. to 9,595. ) gal
precision of the volume is ~ 177.6 gal
relative precision is ~ 1.9 %