1.7 Other ways to specify errors. 1.7.1 Number of significant digits and intervals. In section 1.3 we discussed how one could specify the error in an approximate value by means of the absolute error and the relative error. In this section we look at two other ways to specify the error, namely by means of the number of significant digits and by means of an interval. The number of significant digits. Another way to specify an error is to give the number of significant digits. Recall that if we round a number x to p significant digits to get xa = round(x, p), then xa as an approximation to x has an absolute error of no more than 5 10q-p; see Proposition 1 in section 1.5. More generally, suppose xa = d1.d2dp 10q is some approximation to x (not necessarily obtained by rounding x). Then we say xa has p decimal digits of precision or p significant decimal digits if the absolute error | x - xa | is less than or equal to 5 10q-p. Example 1. Suppose the approximate value k = 2.75 / hr has three significant digits. This means the absolute error is no greater than 0.005. Example 2. Suppose the temperature of an object is T = 53.1 F 0.4 F. The approximate value Ta = 53.1 does not have three significant digits since the error would have to be less than 0.05 in order to this to be true. On the other hand, if we were to round the approximate value 53.1 to two significant digits to get 53, then the approximate value 53 would have two significant digit since the absolute error is no more than 0.5. There is the following connection between specifying the number of significant decimal digits and specifying a bound on the relative error. Proposition 1 If xa = d1.d2dp 10q is an approximation to x that has p significant decimal digits, then the relative error a = | (x – xa)/xa | is no more than 5 10-p. Proof. One has 10q | xa | < 10q+1. If xa has p significant digits, then | x - xa | 5 10q-p. So the relative error a(x) = | x - xa | / | xa | is no more than 5 10q-p / 10q = 5 10-p. // Specifying the number of significant digits of precision is usually not as precise as specifying the absolute error or the relative error, but it is often easier to communicate errors in that fashion. For example, in many books and articles it is understood that numbers have as many digits of precision as they are written with. Problem 1. The length x of a rectangular piece of land is measured to be 145 ft. If this approximate value has three significant digits, then what is an upper bound for the relative error in this value? Answer: One way to answer this is to use Proposition 1. This proposition says the relative error is no more than 5 10-3 = 0.5%. A sharper result can be obtained by noting that the absolute error is no more than 0.5, so the relative error is no more than 0.5/145 = 0.0034.. < 0.4%. Problem 2. The width of a rectangular piece of land is measured to be 48.25 ft. If the measurement has a relative error of at most 2%, then which of the following assertions are true? 1.7.1 - 1 i. The approximate value 48.25 has four significant digits of precsion. ii. The approximate value 48.3 has three significant digits of precsion. iii. The approximate value 48 has two significant digits of precsion. iv. The approximate value 5 101 has one significant digit of precsion. Answer: Only iv is true. Specifying an interval in which the true value lies: This is closely related to specifying a bound for the absolute error. However, instead of giving the maximum amount that the true value might differ from the approximate, we specify an interval b x c in which we feel the true value lies. Often one will want to still specify an approximate value xa that may represent the "best guess" of the true value or the result of a calculation using some other best guess data. This approximate value should lie in the interval b x c. If we are given an approximate value xa and we are told the absolute error is no more than h, then an interval that contains the true value would be xa - h x xa + h. Conversely, if we are given an approximation xa along with an interval b x c containing the true value, then the absolute error is no more than the maximum of c-xa and xa-b. Example 3. Suppose we measure the length of a table to be x = 59.7 0.3 in and the width of the table to be y = 23.4 0.2 in. Then x lies in the interval 59.4 x 60.0 and y lies in the interval 23.2 y 23.6. Our "best estimate" of the area of the table would be Aa = xaya = (59.7)(23.4) = 1396.98 in2. An interval in which the area lies is (59.4)(23.2) A (60.0)(23.6), i.e. 1378.08 in2 A 1416 in2. The maximum of 1396.98 - 1378.08 = 18.9 and 1416 - 1396.98 = 19.02 is 19.02. So A = 1396.98 19.02 in2. To simplify things for the reader at the expense of losing some detail, we might say A = 1397 20 in2. For most people it is a little harder to get an intuitive feeling for the error if we specify it by giving an interval in which the true value lies. Usually it is easier to appreciate the error if it is specified as an absolute error, relative error, or number of significant digits. The usefulness of an interval is that mathematical software often has operations with intervals built-in, so it is easier to calculate the error in a final result if one works with the error in the form of an interval. The following proposition shows how the interval containing the result of a computation is related to the interval containing the inputs. Proposition 2. Suppose bx x cx is an interval containing x and by x cy is an interval containing y and t > 0 is an exact value and z = f(x) is some function which calculates a value of z for each value of x and n is a positive integer. Then (1) bx+by x+y cx+cy is an interval containing x+y (2) bx-cy x-y cx-by is an interval containing x-y (3) tbx tx tcx is an interval containing tx (4) min{ bxby, bxcy, cxby, cxby } xy max{ bxby, bxcy, cxby, cxby } is an interval containing xy (5) 1/cx 1/x 1/bx is an interval containing 1/x if the interval bx x cx doesn’t contain zero (6) min{ bx/by, bx/cy, cx/by, cx/by } x/y max{ bx/by, bx/cy, cx/by, cx/by } is an interval containing x/y if the interval by y cy doesn’t contain zero (7) f(bx) f(x) f(cx) contains f(x), if f(x) is non decreasing in x 1.7.1 - 2 (8) f(cx) f(x) f(bx) contains f(x), if f(x) is non increasing in x Proof. (1) – (3) and (5) - (8) are fairly straightforward. To prove (4) note xby xy xcy or xcy xy xby is an interval containing xy depending on the sign of x. Also bxby xby cxby or cxby xby bxby is an interval containing xby depending on the sign of by. Furthermore, bxcy xcy cxcy or cxcy xcy bxcy is an interval containing xcy depending on the sign of cy. Therefore, no matter what the combination of sign is, one has min{ bxby, bxcy, cxby, cxby } xy max{ bxby, bxcy, cxby, cxby }. // 1.7.1 - 3