Cumulative standard deviation: Difference between revisions
Add Scilab section
PatGarrett (talk | contribs) (→{{header|360 Assembly}}: remove useless instructions) |
PatGarrett (talk | contribs) (Add Scilab section) |
||
Line 2,561:
(sqrt (- (/ (apply + (map (lambda (i) (* i i)) nums)) (length nums)) (expt (/ (apply + nums) (length nums)) 2))))
</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}}==
|