Statistics::SPC is a Perl module with calculations for Stastical Process Control (SPC).
Creates thresholds based on the variability of all data, # of samples not meeting spec, and variablity within sample sets, all from training data.
Note: this is only accurate for data which is normally distributed when the process is under control
Recommended usage: at least 15 sample sets, w/ sample size >=2 (5 is good) This module is fudged to work for sample size 1, but it's a better idea to use >= 2
Important: the closer the process your are monitoring to how you would like it to be running (steady state), the better the calculated control limits will be.
Example: we take 5 recordings of the CPU utilization at random intervals over the course of a minute. We do this for 15 minutes, keeping all fifteen samples. Using this will be able to tell whether or not CPU use is in steady state.
SYNOPSIS
my $spc = new Statistics::SPC;
$spc->n(5) # set the number of samples per set
$spc->Uspec(.50); # CPU should not be above 50% utilization
$spc->Lspec(.05); # CPU should not be below 5%
# (0 is boring in an example)
# Now feed training data into our object
$return = $spc->history($history); # "train the system";
# $history is ref to 2d array;
# $return > 1 means process not likely to
# meet the constraints of your specified
# upper and lower bounds
# now check to see if the the latest sample of CPU util indicates
# CPU utilization was under control during the time of the sample
$return = $spc->test($data); # check one sample of size n
# $return < 0 there is something wrong with your data
# $return == 0 the sample is "in control"
# $return > 0 there are $return problems with the sample set
Product's homepage
Requirements:
· Perl