# compute average $total += $_ for @values; $average = $total / @values; # compute stddev according to your method $total_deviation += ($_ - $average)**2 for @values; $standard_deviation = sqrt($total_deviation) / @values; # compute stddev as I recall it, probably wrong $total_deviation += abs($_ - $average) for @values; $standard_deviation = $total_deviation / @values;
In reply to Re: Is there a simpler way??
by repson
in thread Is there a simpler way??
by yabba
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |