in reply to Is there a simpler way??
Of course, you won't get much credit for this solution on the test. ;)use strict; use Statistics::Descriptive; my $stat = Statistics::Descriptive::Full->new(); $stat->add_data(70,74,80,82,68,76); print "mean: ", $stat->mean(), "\n", "sum: ", $stat->sum(), "\n", "var: ", $stat->variance(), "\n", "dev: ", $stat->standard_deviation(), "\n";
Jeff
R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
L-L--L-L--L-L--L-L--L-L--L-L--L-L--
|
|---|