Statistics::Basic

Statistics::Basic is a collection of very basic statistics formulae for vectors.
Download

Statistics::Basic Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Jettero Heller
  • Publisher web site:
  • http://search.cpan.org/~jettero/Statistics-Basic-0.42/Basic.pm

Statistics::Basic Tags


Statistics::Basic Description

Statistics::Basic is a collection of very basic statistics formulae for vectors. Statistics::Basic is a collection of very basic statistics formulas for vectors.SYNOPSIS # for use with one vector: Statistics::Basic::Mean; Statistics::Basic::Median; Statistics::Basic::Mode; Statistics::Basic::Variance; Statistics::Basic::StdDev; # for use with two vectors: Statistics::Basic::CoVariance; Statistics::Basic::Correlation;EXAMPLES my $mean = Statistics::Basic::Mean->new($array_ref)->query; print "$meann"; # hooray # That works, but I needed to calculate a LOT of means for a lot of # arrays of the same size. Furthermore, I needed them to operate FIFO # style. So, they do: my $mo = new Statistics::Basic::Mean(); print $mo->query, "n"; # the avearge of 1, 2, 3 is 2 $mo->insert(4); # Keeps the vector the same size automatically print $mo->query, "n"; # so, the average of 2, 3, 4 is 3 # You might need to keep a running average, so I included a growing # insert $mo->ginsert(5); # Expands the vector size by one and appends a 5 print $mo->query, "n"; # so, the average is of 2, 3, 4, 5 is 7/2 # And last, you might need the mean of after all the above $mo->set_vector(); # *poof*, the vector is 2, 3! print $mo->query, "n"; # and the average is now 5/2! Tadda! # These functions all work pretty much the same for ::StdDev and # ::Variance but they work slightly differently for CoVariance and # Correlation. # Not suprisingly, the correlation of and is 1.0 my $co = new Statistics::Basic::Correlation( , ); print $co->query, "n"; # Cut the correlation of and is less than 1 $co->ginsert( 7, 5 ); print $co->query, "n"; Requirements: · Perl


Statistics::Basic Related Software