is there an easy way to get the average and standard deviation in perl
(given an array of numbers).  i don't want to reinvent the wheel and
write my own functions.

i saw something for the average (see below). it works fine.  is there
a similar quickie for std deviation (or perhaps, the median)

use List::Util qw(sum);
@array = (1, 1.5, 2);
$average = sum(@array)/@array;
print "$average


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


  • average and standard d... Mahurshi Akilla

Reply via email to