Need some math/CS help--------->
I forgot the forumla for standard deviation...
I'm writing a program to dynamically allocate some memory for an array...
Then I gotta use that to find standard deviation...
All is easy until the stupid forumla....
Can anyone give me a very simply breakdown of the formula so i can use it in my program?
Thanks in advance.
Cheers,
Bryan
I'm writing a program to dynamically allocate some memory for an array...
Then I gotta use that to find standard deviation...
All is easy until the stupid forumla....
Can anyone give me a very simply breakdown of the formula so i can use it in my program?
Thanks in advance.
Cheers,
Bryan
Call your data points x1, x2, . . . , xn.
Let S = (x1^2 + x2^2 + . . . + xn^2) / n.
Let M = (x1 + x2 + . . . + xn) / n. (M is the mean.)
Variance: V = S - M^2.
Std. Dev. = sqrt(V).
Example:
Data: 1, 2, 3, 4, 5
S = (1 + 4 + 9 + 16 + 25) / 5 = 55 / 5 = 11.
M = (1 + 2 + 3 + 4 + 5) / 5 = 3.
V = 11 - 9 = 2
SD = 1.414...
Let S = (x1^2 + x2^2 + . . . + xn^2) / n.
Let M = (x1 + x2 + . . . + xn) / n. (M is the mean.)
Variance: V = S - M^2.
Std. Dev. = sqrt(V).
Example:
Data: 1, 2, 3, 4, 5
S = (1 + 4 + 9 + 16 + 25) / 5 = 55 / 5 = 11.
M = (1 + 2 + 3 + 4 + 5) / 5 = 3.
V = 11 - 9 = 2
SD = 1.414...
Thread
Thread Starter
Forum
Replies
Last Post




