Statistics::Welford(3pm) User Contributed Perl Documentation Statistics::Welford(3pm)

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

  my $stat = Statistics::Welford->new;
  while (1) {
        $stat->add(rand);
        ...
  }
  print $stat->mean;

Standard statistics using Welford's algorithm

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

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

Add an entry to the statistics base

Returns the number of entries to the statistics base

Returns the minimum number in the statistics base

Returns the maximum number in the statistics base

Returns the mean value

Returns the variance value

Returns the standard deviation value

Kaare Rasmussen <kaare@cpan.org>.

Copyright (C) 2010, Kaare Rasmussen

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

2022-10-13 perl v5.36.0