On 29 Mar 2014, at 11:31, Sven Van Caekenberghe <[email protected]> wrote:

> | input |
> input := #(2 4 4 4 5 5 7 9).
> (((input - input average) raisedTo: 2) sum / (input size - 1)) sqrt.

Shorter, simpler using #squared :

| input |
input := #(2 4 4 4 5 5 7 9).
((input - input average) squared sum / (input size - 1)) sqrt.

I just found out that we already have #stdev in the 3.0 image :

#(2 4 4 4 5 5 7 9) stdev.

;-)


Reply via email to