---
name: "Statistics::Welford"
section: "3pm"
platform: "linux"
package: "libstatistics-welford-perl"
version: "0.02-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Statistics::Welford"
---

# Statistics::Welford(3pm)

Standard statistics using Welford's algorithm

## 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.
