Kaare Rasmussen > Statistics-Welford > Statistics::Welford

Download:
Statistics-Welford-0.02.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.02   Source  

NAME ^

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

SYNOPSIS ^

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

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

  print $stat->mean;

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

AUTHOR ^

Kaare Rasmussen <kaare@cpan.org>.

COPYRIGHT ^

Copyright (C) 2010, Kaare Rasmussen

This module is free software; you can redistribute it or modify it under the same terms as Perl itself.

syntax highlighting: