Stefan Trcek > webrobot-0.81 > WWW::Webrobot::Statistic

Download:
webrobot-0.81.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

WWW::Webrobot::Statistic - Plain simple statistic

SYNOPSIS ^

 use WWW::Webrobot::Statistic;
 my $s = WWW::Webrobot::Statistic -> new();
 $s -> add(3, 4, 5);
 $s -> add(6, 7);
 print "n: ",                  $s->n, "\n";
 print "min: ",                $s->min, "\n";
 print "max: ",                $s->max, "\n";
 print "mean: ",               $s->mean, "\n";
 print "median: ",             $s->median, "\n";
 print "standard deviation: ", $s->standard_deviation, "\n";
 print "quadratic mean: ",     $s->quad_mean, "\n";

DESCRIPTION ^

Does some plain statistics. This module will store the complete data set on demand only.

METHODS ^

$s->new(%options)

Constructor. Options:

extended

1 store complete data set (only if you want to call median.

0 needn't store complete data set (median not available).

$s->n

Number of elements added.

$s->min

Smallest element.

$s->max

Largest element.

$s->mean

Arithmetic mean.

$s->quad_mean

Quadratic mean.

$s->standard_deviation

Standard deviation, base n-1

$s->median

Median. Gives the arithmetic mean of the two "mean" elements if the number of elements is even.

syntax highlighting: