logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Statistics::Welford - Standard statistics using Welford's algorithm

Author

       Kaare Rasmussen <kaare@cpan.org>.

Description

       Standard statistics using Welford's algorithm

Methods

new
         my $stat = Statistics::Welford->new;

       The "new" constructor lets you create a new Statistics::Welford object.

   add
       Add an entry to the statistics base

   n
       Returns the number of entries to the statistics base

   min
       Returns the minimum number in the statistics base

   max
       Returns the maximum number in the statistics base

   mean
       Returns the mean value

   variance
       Returns the variance value

   standard_deviation
       Returns the standard deviation value

Name

       Statistics::Welford - Standard statistics using Welford's algorithm

Synopsis

         my $stat = Statistics::Welford->new;

         while (1) {
               $stat->add(rand);
               ...
         }

         print $stat->mean;

See Also