{"id":748,"date":"2009-03-04T20:55:07","date_gmt":"2009-03-04T20:55:07","guid":{"rendered":"http:\/\/scientopia.org\/blogs\/goodmath\/2009\/03\/04\/basics-significant-figures\/"},"modified":"2009-03-04T20:55:07","modified_gmt":"2009-03-04T20:55:07","slug":"basics-significant-figures","status":"publish","type":"post","link":"http:\/\/www.goodmath.org\/blog\/2009\/03\/04\/basics-significant-figures\/","title":{"rendered":"Basics: Significant Figures"},"content":{"rendered":"<p> After my post the other day about rounding errors, I got a ton of<br \/>\nrequests to explain the idea of <em>significant figures<\/em>. That&#8217;s<br \/>\nactually a very interesting topic.<\/p>\n<p> The idea of significant figures is that when you&#8217;re doing<br \/>\nexperimental work, you&#8217;re taking measurements &#8211; and measurements<br \/>\nalways have a limited precision. The fact that your measurements &#8211; the<br \/>\ninputs to any calculation or analysis that you do &#8211; have limited<br \/>\nprecision, means that the results of your calculations likewise have<br \/>\nlimited precision. Significant figures (or significant digits, or just &#8220;sigfigs&#8221; for short) are a method of tracking measurement<br \/>\nprecision, in a way that allows you to propagate your precision limits<br \/>\nthroughout your calculation.<\/p>\n<p> Before getting to the rules for sigfigs, it&#8217;s helpful to show why<br \/>\nthey matter. Suppose that you&#8217;re measuring the radius of a circle, in<br \/>\norder to compute its area. You take a ruler, and eyeball it, and end<br \/>\nup with the circle&#8217;s radius as about 6.2 centimeters. Now you go to<br \/>\ncompute the area: &pi;=3.141592653589793&#8230; So what&#8217;s the area of the<br \/>\ncircle? If you do it the straightforward way, you&#8217;ll end up with a<br \/>\nresult of 120.76282160399165 cm<sup>2<\/sup>.<\/p>\n<p> The problem is, your original measurement of the radius was<br \/>\nfar too crude to produce a result of that precision. The real<br \/>\narea of the circle could easily be as high as 128, or as low as<br \/>\n113, assuming typical measurement errors. So claiming that your<br \/>\nmeasurements produced an area calculated to 17 digits of precision is<br \/>\njust ridiculous.<\/p>\n<p><!--more--><\/p>\n<p> As I said, sigfigs are a way of describing the precision of a<br \/>\nmeasurement. In that example, the measurement of the radius as 6.2<br \/>\ncentimeters has two digits of precision &#8211; two <em>significant<br \/>\ndigits<\/em>. So nothing computed using that measurement can<br \/>\nmeaningfully have more than two significant digits &#8211; anything beyond<br \/>\nthat is in the range of roundoff errors &#8211; further digits are artifacts<br \/>\nof the calculation, which shouldn&#8217;t be treated as meaningful.<\/p>\n<p> The rules for significant figures are pretty straightforward:<\/p>\n<ol>\n<li> Leading zeros are <em>never<\/em> significant digits. So in &#8220;0.0000024&#8221;, only the &#8220;2&#8221; and the &#8220;4&#8221; could be significant; the leading<br \/>\nzeros aren&#8217;t.<\/li>\n<li> Trailing zeros are only significant if they&#8217;re measured. So,<br \/>\nfor example, if we used the radius measurement above, but expressed<br \/>\nit in micrometers, it would be 62,000 micrometers. I couldn&#8217;t<br \/>\nclaim that as 5 significant figures, because I really only measured<br \/>\ntwo. On the other hand, if I actually measured it as 6.20 centimeters, then I could could three significant digits.<\/li>\n<li> Digits other than zero in a measurement are always significant<br \/>\ndigits.<\/li>\n<li> In multiplication and division, the number of the significant<br \/>\nfigures in the result is the <em>smallest<\/em> of the number<br \/>\nof significant figures in the inputs. So,  for example,<br \/>\nif you multiple 5 by 3.14, the result will have on significant<br \/>\ndigit; if you multiply 1.41421 by 1.732, the result will have<br \/>\nfour significant digits.<\/li>\n<li> In addition and subtraction, you keep the number of<br \/>\nsignificant digits in the input with the smallest number of<br \/>\n<em>decimal places<\/em>.<\/li>\n<\/ol>\n<p> That last rule is tricky. The basic idea is, write the numbers<br \/>\nwith the decimal point lined up. The point where the last significant<br \/>\ndigit occurs first is the last digit that can be significant in<br \/>\nthe result. For example, let&#8217;s look at 31.4159 plus 0.000254. There<br \/>\nare 6 significant digits in 31.3159; and there are 3 significant digits in 0.000254. Let&#8217;s line them up to add:<\/p>\n<pre>\n31.4159\n+  0.000254\n-------------\n31.4162\n<\/pre>\n<p> The &#8220;9&#8221; in 31.4159 is the significant digit occuring in the<br \/>\nearliest decimal place &#8211; so it&#8217;s the cutoff line. Nothing<br \/>\nsmaller that 0.0001 can be significant. So we round off<br \/>\n0.000254 to 0.0003; the result still has 5 significant<br \/>\nfigures.<\/p>\n<p> Significant figures are a rather crude way of tracking<br \/>\nprecision. They&#8217;re largely ad-hoc. There is mathematical reasoning<br \/>\nbehind these rules &#8211; so they do work pretty well most of the time. The<br \/>\n&#8220;right&#8221; way of tracking precision is error bars: every measurement has<br \/>\nan error range, and those error ranges propagate through your<br \/>\ncalculations, so that you have a precise error range for every<br \/>\ncalculated value. That&#8217;s a much better way of measuring potential<br \/>\nerrors than significant digits. But most of the time, unless we&#8217;re in<br \/>\na very careful, clean, laboratory environment, we don&#8217;t really<br \/>\n<em>know<\/em> the error bars for our measurements. Significant digits<br \/>\nare basically a way of estimating error bars. (And in fact, the<br \/>\nmathematical reasoning underlying these rules is based on how<br \/>\nyou handle error bars.)<\/p>\n<p> The beauty of significant figures is that they&#8217;re so incredibly<br \/>\neasy to understand and to use. Just look at <em>any<\/em> computation<br \/>\nor analysis result described anywhere, and you can easily see if<br \/>\nthe people describing it are full of shit or not. For example, you<br \/>\ncan see people claiming to earn 2.034523% on some bond; they&#8217;re<br \/>\nnot, unless they&#8217;ve invested a million dollars, and then those last<br \/>\ndigits are pennies &#8211; and it&#8217;s almost certain that the calculation<br \/>\nthat produced that figure of 2.034523% was done based on<br \/>\ninputs which had a lot less that 7 significant digits.<\/p>\n<p> The way that this affects the discussion of rounding is<br \/>\nsimple. The standard rules I stated for rounding are for<br \/>\nrounding <em>one<\/em> significant digit. If you&#8217;re doing a computation<br \/>\nwith three significant digits, and you get a result of<br \/>\n2.43532123311112, anything after the 5 is <em>noise<\/em>. It doesn&#8217;t<br \/>\ncount. It&#8217;s not really there. So you don&#8217;t get to say &#8220;But<br \/>\nit&#8217;s <em>more<\/em> than 2.435, so you should round up to<br \/>\n2.44.&#8221;. It&#8217;s <em>not<\/em> more: the stuff that&#8217;s making you think it&#8217;s<br \/>\nmore is just computational noise. In fact, the &#8220;true&#8221; value is<br \/>\nprobably somewhere +\/-0.005 of that &#8211; so it could be slightly more<br \/>\nthan 2.435, but it could <em>also<\/em> be slightly less. The computed<br \/>\ndigits past the last significant digit are <em>insignificant<\/em> &#8211;<br \/>\nthey&#8217;re beyond the point at which you can say anything accurate. So<br \/>\n2.43532123311112 is <em>the same<\/em> as 2.4350000000000 if you&#8217;re<br \/>\nworking with three significant digits &#8211; in both cases, you round off<br \/>\nto 2.44 (assuming even preference). If you count the trailing digits<br \/>\npast the one digit after the last significant one, you&#8217;re just using<br \/>\nnoise in a way that&#8217;s going to create a subtle upward bias in<br \/>\nyour computations.<\/p>\n<p> On the other hand, if you&#8217;ve got a measured value of 2.42532, with<br \/>\nsix significant figures, and you need to round it to 3 significant<br \/>\nfigures, <em>then<\/em> you can use the trailing digits in your<br \/>\nrounding. Those digits are <em>real<\/em> and <em>significant<\/em>.<br \/>\nThey&#8217;re a meaningful, measured quantity &#8211; and so the correct rounding<br \/>\nwill take them into account. So even if you&#8217;re working with<br \/>\neven preference rounding, that number should be rounded to three sigfigs as 2.43.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After my post the other day about rounding errors, I got a ton of requests to explain the idea of significant figures. That&#8217;s actually a very interesting topic. The idea of significant figures is that when you&#8217;re doing experimental work, you&#8217;re taking measurements &#8211; and measurements always have a limited precision. The fact that your [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[74,43],"tags":[],"class_list":["post-748","post","type-post","status-publish","format-standard","hentry","category-basics","category-numbers"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4lzZS-c4","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/748","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/comments?post=748"}],"version-history":[{"count":0,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/748\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/media?parent=748"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/categories?post=748"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/tags?post=748"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}