couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Trivial Update of "View_Snippets" by MarcaJames
Date Tue, 27 Oct 2009 18:03:38 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "View_Snippets" page has been changed by MarcaJames.
The comment on this change is: got rid of wiki wording of LeVeque's name.
http://wiki.apache.org/couchdb/View_Snippets?action=diff&rev1=29&rev2=30

--------------------------------------------------

  <<Anchor(summary_stats)>>
  == Computing simple summary statistics (min,max,mean,standard deviation)  ==
  
- This implementation of standard deviation is more complex than the above algorithm, called
the "textbook one-pass algorithm" by Chan, Golub, and LeVeque.  While it is mathematically
equivalent to the standard two-pass computation of standard deviation, it can be numerically
unstable under certain conditions.  Specifically, if the square of the sums and  the sum of
the squares terms are large, then they will be computed with some rounding error.  If the
variance of the data set is small, then subtracting those two large numbers (which have been
rounded off slightly) might wipe out the computation of the variance.  See http://www.jstor.org/stable/2683386,
http://people.xiph.org/~tterribe/notes/homs.html, and the wikipedia description of Knuth's
algorithm http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance.
+ This implementation of standard deviation is more complex than the above algorithm, called
the "textbook one-pass algorithm" by Chan, Golub, and Le``Veque.  While it is mathematically
equivalent to the standard two-pass computation of standard deviation, it can be numerically
unstable under certain conditions.  Specifically, if the square of the sums and  the sum of
the squares terms are large, then they will be computed with some rounding error.  If the
variance of the data set is small, then subtracting those two large numbers (which have been
rounded off slightly) might wipe out the computation of the variance.  See http://www.jstor.org/stable/2683386,
http://people.xiph.org/~tterribe/notes/homs.html, and the wikipedia description of Knuth's
algorithm http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance.
  
  The below implementation in {{{JavaScript}}} by MarcaJames.  Any mistakes in the js coding
are my fault.  The algorithms are from others (all smarter than I), as noted in the comments
in the code.  To the best of my knowledge the algorithms are public domain, and my implementation
freely available to all.  
  

Mime
View raw message