GNOME Bugzilla – Bug 660564
non-zero stdev with equal data
Last modified: 2011-09-30 19:18:08 UTC
The computed standard deviation of 3415 cells each of which contain 0.3 is non-zero (2.71090237130979E-020). This does not happen if all the cells are 0.1, 0.2, 0.4, 0.5, 0.7, or 0.8. If the 3415 cells are all 0.6 then the standard deviation is computed to be 5.42180474261958E-020. When 2277 (==ceil(3415*2/3)) cells are 0.9, the computed standard deviation is 5.42220163912776E-020. I'm using Gnumeric v1.10.16 on a Windows XP OS.
I don't really see a problem with that. We know that the standard deviation should be 0 but it shoudl be clear that there will be some precision error when calculating the the standard deviation. Compared with the size of the data values, 2.71090237130979E-020 is neglegible. For comparison, with 3415 data values of 0.3, LibreOffice calculates 1.87E-14.
We can do better with little effort. I will fix (in goffice).
Created attachment 197888 [details] [review] Tentative patch This ought to do it.
Review of attachment 197888 [details] [review]: looks good
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.