Cumulative standard deviation: Difference between revisions

m
→‎show running sums: aligned a comment.
m (→‎only show standard deviation: changed a comment.)
m (→‎show running sums: aligned a comment.)
Line 3,387:
say ' item' right(j,L)":" right(_,4) ' average=' left($/j,12),
' standard deviation=' sqrt($$/j - ($/j)**2)
end /*j*/ /* [↑] prettify output with whitespace*/
say 'standard deviation: ' sqrt($$/n - ($/n)**2) /*calculate & display the std deviation*/
exit /*stick a fork in it, we're all done. */