Erich Morisse >
Statistics-SPC.v0.1 >
Statistics::SPC

Module Version: 0.01
Statistics::SPC - Calculations for Stastical Process Control

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.

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

The range of the data ($self->R) greater than our calculated upper limit on the intra-sample range ($self->UCLR);

The range of the data ($self->R) less than our calculated lower limit on the intra-sample range ($self->LCLR);

The average of the sample set ($self->Xbar) is greater than our calculated upper limit ($self->UCLXbar)

The average of the sample set ($self->Xbar) is less than our calculated upper limit ($self->LCLXbar)

The number of data that fall outside our specification (i.e. errors) ($self->p) is greater than our calculated upate limit ($self->UCLp)

The number of data that fall outside our specification (i.e. errors) ($self->p) is less than our calculated upate limit ($self->LCLp)

Erich S. Morisse <emorisse@cpan.org>

Copyright (c) 2007 Erich Morisse

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

syntax highlighting: