Cumulative standard deviation: Difference between revisions

Content added Content deleted
(→‎{{header|360 Assembly}}: remove useless instructions)
(Add Scilab section)
Line 2,561: Line 2,561:
(sqrt (- (/ (apply + (map (lambda (i) (* i i)) nums)) (length nums)) (expt (/ (apply + nums) (length nums)) 2))))
(sqrt (- (/ (apply + (map (lambda (i) (* i i)) nums)) (length nums)) (expt (/ (apply + nums) (length nums)) 2))))
</lang>
</lang>

=={{header|Scilab}}==
Scilab has the '''stdev''' to compute the standard deviation of a sample so it is straightforward to have the standard deviation of a sample with a correction of the bias.
<lang>
T=[2,4,4,4,5,5,7,9];
stdev(T)*sqrt((length(T)-1)/length(T))
</lang>
{{out}}
<pre>
-->T=[2,4,4,4,5,5,7,9];
-->stdev(T)*sqrt((length(T)-1)/length(T))
ans = 2.
</pre>




=={{header|Smalltalk}}==
=={{header|Smalltalk}}==