home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine 1996 / ARCHIVE_96.iso / discs / gerald / 9_03 / Precision1 / ReadMe next >
Text File  |  1995-02-24  |  7KB  |  55 lines

  1. {Version:1.07;11 Nov 1993;Fireworkz;Gerald Lewis Fitton;6500 1045 8323 3131}
  2. {Block:0;0;;32;1;16;;32;1;16}
  3. {Style:ZLBase;{StyleKey:^F1}{ColWidth:11055}{ColName:#}{RowHeight:0}{RowHeightFix:0}{RowUnbreakable:1}{RowName:#}{MarginLeft:1134}{MarginRight:850}{MarginPara:0}{Tablist}{Background:255;255;255}{ParaStart:0}{ParaEnd:288}{LineSpace:0;72}{Justify:3}{NewObject:3}{Numform:#,##0.00}{NumformDT:dd.mm.yy}{NumformSE:@}{BorderColour:0;187;255}{Border:0}{GridLeftColour:0;187;255}{GridTopColour:0;187;255}{GridRightColour:0;187;255}{GridBottomColour:0;187;255}{GridLeft:0}{GridTop:0}{GridRight:0}{GridBottom:0}{Typeface:Times}{Fontx:0}{Fonty:240}{Underline:0}{Bold:0}{Italic:0}{Superscript:0}{Subscript:0}{Foreground:0;0;0}}
  4. {StyleBase:ZLBase}
  5. {Style:ZLHeading;{StyleKey:^F2}{LineSpace:0;72}{Justify:1}{Fonty:320}{Bold:1}{Italic:1}}
  6. {Style:ZLSubHead;{StyleKey:^F4}{ParaStart:289}{Typeface:Helvetica}{Bold:1}}
  7. {Style:ZLByLine;{StyleKey:^F3}{Fonty:280}}
  8. {Style:ZLKeywords;{MarginLeft:2268}{MarginPara:-1133}{Tablist:L0}{Italic:1}}
  9. {Style:ZL FileName;{StyleKey:^F5}{Italic:1}}
  10. {Style:ZL Indent_01;{MarginLeft:1417}{MarginPara:-282}{Tablist:L0}}
  11. {Style:ZL Indent_02;{MarginLeft:1814}{MarginPara:-396}{Tablist:L0}}
  12. {Style:ZL Funny Number;{Numform:#0.000 000 000 000}}
  13. {Style:ZL Funnier Number;{Numform:#0.00 00 00 00 00 00}}
  14. {Style:ZL Exp;{Numform:0.000000000000000000e+00}{Typeface:Helvetica}}
  15. {Paper:From Printer;0;16839;11907;737;284;284;284;0;0;0;0;16;;0}
  16. {PaperScale:100}
  17. {PrintQuality:0}
  18. {StartOfData}
  19. {Name-S:Funny_Number;%a17}
  20. {S:X;X;0;0;Precision{ITR-X}by Gerald L Fitton}
  21. {S:X;X;0;1;Keywords: Sums Precision Kelly Fitton}
  22. {S:X;X;0;2;Introduction{ITR-X}{ITR-X}I received a letter from Nik Kelly in which he points out to me that Fireworkz (and many other spreadsheets and calculators) produce many different answers to the calculation of the standard deviation of the following six numbers: 1.797, 1.797, 1.798, 1.799, 1.799, 1.799.  These answers range from 9.8319áe\Ö4 to 9.8336áe\Ö4.}
  23. {S:X;X;0;3;You may not be interested in standard deviations but this article (like most of my articles) has a wider application than the calculation of standard deviations.  I use it only as an example.}
  24. {S:X;X;0;4;Nik concludes his letter with:}
  25. {S:X;X;0;5;"We must limit reported standard deviation results to 3 significant figures, as recommended by HLR's draft 'Precision & Accuracy' SOP.  We need to challenge calculators and spreadsheets for arithmetic precision and accuracy, and we must also check the integrity of their statistics formulae.  To establish benchmarks, we need sets of data calculated to much longer precision than those shown above.  How do we know which of them were accurate?"}
  26. {S:X;X;0;6;I don't wish to anticipate the detail of my answer but, using Fireworkz the 'right' way the 'accurate' answer I get is:   0.000983192080250172 and I think that it is accurate to much more than the three significant figures quoted by Nik.}
  27. {S:X;X;0;7;A Digression{ITR-X}{ITR-X}It was a long time ago when I first had such a problem explained to me.  In fact it was first demonstrated to me during a 'Numerical Methods' lecture given as part of my Maths Degree Course at Imperial College.  Essentially, if your calculations are limited to a fixed number of significant figures then small differences between relatively large numbers can not be calculated to the same accuracy as the original data.  In the case of the SD calculation above the original data differs only in the fourth significant figure.  Calculating SDs involves finding the differences between squares of numbers and it is all too easy to choose a method in which a significant amount of accuracy is lost!}
  28. {S:X;X;0;8;The example chosen by Nik of calculating a small standard deviation is a classic in the sense that, even when I was being taught, it was the calculation of a SD which my lecturer chose!  He said at the time, that the specific example he chose was at least 50 years old because it was the one his lecturer chose when he was taught over 40 years previously!  My lecturer was approaching retirement and added that loss of precision when calculating differences is well documented way back in 1665!}
  29. {S:X;X;0;9;By the way, I got my Maths degree well before the days of computers and hand calculators.  The method of calculation then was to use a mechanical calculator (such as a Facit) where you turned a handle to multiply!  Such mechanical calculators were capable of 12 digit precision.  The standard deviation example we were given by the lecturer to calculate failed at the third significant figure in a similar way to the way Nik's failed when we used the 'standard' inaccurate method.}
  30. {S:X;X;0;10;The Fireworkz std(list) method{ITR-X}{ITR-X}In the next paragraph I calculate the SD of the six numbers listed above using Fireworkz built in std(list) function.  Place the pointer on the number and select that cell.  You will find the formula   std(1.797,1.797,1.798,1.799,1.799,1.799)   appears in the formula line.  This gives the answer below:}
  31. {S:S;F;0;11;0.00098319208141798;std(1.797,1.797,1.798,1.799,1.799,1.799)}
  32. {S:X;X;0;12;Gerald\æs Method{ITR-X}{ITR-X}The 'correct' method of calculating SD values which are small when compared with the mean of the numbers is that which I show in the file [StdDev].}
  33. {S:X;X;0;13;In using this method you first calculate the mean of the data and then reduce each value of the data by the mean.  If you modify data by subtracting the same amount (even if you don't use the mean) then the SD of the modified data is exactly equal to the SD of the original data but the accuracy of calculation is much higher.  The value for the SD given by the method given in [StdDev] is  0.000983192080250172 which is about as accurate as you will get with double precision arithmetic.}
  34. {S:X;X;0;14;In the line below I reduce each of Nik's values by 1.8 before using the Fireworkz Std(list) function.  Compare this answer with that given in the previous paragraph when the (exact) mean is deducted from the data.  The answer given below is slightly less accurate than that given by subtracting the (exact) mean.}
  35. {S:S;F;0;15;0.000983192080250173;std(1.797-1.8,1.797-1.8,1.798-1.8,1.799-1.8,1.799-1.8,1.799-1.8)}
  36. {BR:;;;;;;;;1;1;{StyleHandle:ZLBase}}
  37. {R:0;0;;32;1;1;;32;0;0;{StyleHandle:ZLHeading}}
  38. {R:0;0;15;3;1;1;;32;0;0;{StyleHandle:ZLByLine}}
  39. {R:0;1;;32;1;2;;32;0;0;{StyleHandle:ZLKeywords}}
  40. {R:0;2;;32;1;3;12;3;0;0;{StyleHandle:ZLSubHead}}
  41. {R:0;7;;32;1;8;12;3;0;0;{StyleHandle:ZLSubHead}}
  42. {R:0;11;;32;1;12;;32;0;0;{StyleHandle:ZL Exp}}
  43. {R:0;10;;32;1;11;30;3;0;0;{StyleHandle:ZLSubHead}}
  44. {R:0;12;;32;1;13;15;3;0;0;{StyleHandle:ZLSubHead}}
  45. {R:0;12;165;3;1;13;173;3;0;0;{StyleHandle:ZL FileName}}
  46. {R:0;13;378;3;1;14;386;3;0;0;{StyleHandle:ZL FileName}}
  47. {R:0;15;;32;1;16;;32;0;0;{StyleHandle:ZL Exp}}
  48. {R:0;13;390;3;1;14;411;3;0;0;{Bold:1}}
  49. {PageHefoBreakValues-H:0;0;0;;0;;;0;;;0;;;0;;;0;;;0}
  50. {EndOfData}
  51. {CmdGroup:{ViewCreate:0;13984;11888;12736}
  52. {ViewControl:100;2;0;0;0;0;0;2048;0;2048}
  53. {CurrentPosition:0;0;0;3}
  54. }
  55.