Pages: [1]   Go Down
Author Topic: Simple statistics library  (Read 1325 times)
0 Members and 1 Guest are viewing this topic.
Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 170
Posts: 12487
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just added a simple statistics library to the playground. See http://www.arduino.cc/playground/Main/Statistics

The lib calculates the average and stdev of a set of data(floats). It has a simple interface consisting of only six functions. An example sketch is added on the playground.

All comments are welcome,

Rob
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Delft, Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino boy
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You may want to use an unbiased stddev? i.e. use n-1 in the divisor.
-- Jaap
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 170
Posts: 12487
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Added the unbiased_stddev(), minimum() and maximum()
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 170
Posts: 12487
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Today I received an updated version of the statistics library from Gil Ross, one that is numerically more stable. Details see - http://www.arduino.cc/playground/Main/Statistics -


Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Pages: [1]   Go Up
Jump to: