The Code-Bin
Compute standard deviation
Posted by: Gdog | May 8, 2009 @ 10:09pm

C++ Code



Syntax Highlighting





Author Comments
If there are N data points x_i and the mean is X then the std deviation is computed as sqrt( (1/N)*sum {x_i^2}- X^2). This formula lets us avoid having to store the input numbers in an array.
Rating


4.48 / 8
129 Votes
http://codebin.yi.org/274
page generated in 0.00 seconds