WebCab Probability and Statistics
v3.5
(J2SE Edition)

webcab.lib.statistics.statistics
Class QualityControl

java.lang.Object
  |
  +--webcab.lib.statistics.statistics.QualityControl
All Implemented Interfaces:
Serializable

public class QualityControl
extends Object
implements Serializable

Provides several procedures commonly used to check the quality of the process control. Towards this end we offer methods for the evaluation of the LCL (lower control limit) and UCL(upper control limit) for R Chart, S Chart, XBAR Chart and Median Chart for a finite set of data samples. PLEASE FINISH

Further Explanation

Here we describe the principle objects of study within this class.

R Chart

S Chart Control

Median Chart Control

See Also:
Serialized Form

Constructor Summary
QualityControl()
          Creates a new instance of the QualityControl class with an empty initial data set.
QualityControl(double[][] dataSet)
          Creates a new QualityControl instance with a specified initial data set.
 
Method Summary
 double[][] getDataSet()
          Retrieves the currently registered data set.
 double RBAR()
          Calculates the centerline (RBAR) for the R Chart.
 double[] rChartControlLimits()
          Calculates the control limits for the R Chart.
 double rChartStandardDeviation()
          Calculates the process standard deviation once the R Chart is in a state of statistical control.
 double[] rMedianChartControlLimits()
          Calculates the control limits for the Median Chart using R Chart.
 double[] rXBARChartControlLimits()
          Calculates the control limits for the XBAR Chart using R Chart.
 double SBAR()
          Calculates the centerline (SBAR) for the S Chart.
 double[] sChartControlLimits()
          Calculates the control limits for the S Chart.
 double sChartStandardDeviation()
          Calculates the process standard deviation once the S Chart is in a state of statistical control.
 void setDataSet(double[][] dataSet)
          Registers a new data set used from within the business methods of this class.
 double[] sMedianChartControlLimits()
          Calculates the control limits for the Median Chart using S Chart.
 double[] sXBARChartControlLimits()
          Calculates the control limits for the XBAR Chart using S Chart.
 double XDBLBAR()
          Calculates the grand mean of all subgroups from the data sample.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QualityControl

public QualityControl()
Creates a new instance of the QualityControl class with an empty initial data set.


QualityControl

public QualityControl(double[][] dataSet)
Creates a new QualityControl instance with a specified initial data set.

Further Explanation

For example we have k successive subgroups where k should be at least 20 for acheiving good results. Each subgroup contains n measurements. Typically n is between 1 and 9. As a rule 3, 4, 5 measurements per subgroup is quite common. Each line of the two dimensional array given shoud represent an subgroup, and each column represent a measurement. For example the element dataSet[2][3] represents the third measurement for the second subgroup from the data sample.

Parameters:
dataSet - a two dimensional array where the k-th array corresponds to the k-th subgroup of the data set.
Method Detail

setDataSet

public void setDataSet(double[][] dataSet)
Registers a new data set used from within the business methods of this class. The data set is passed as a parameter and stored within private fields.

Example

Say we wish to display the results of an experiment which has k successive subgroups where k is at least 20, in which there are n measurements in each subgroup within a tabulated form. One such example would be a R Chart. First step required in order to achieve this is to register the data set using this methods. After this you can calculate the lower and upper limits of the R Chart by calling rChartControlLimits().

EXPLAIN IN DETAIL?

Parameters:
dataSet - the set of values to be registered.
Throws:
StatisticsException - if the data set is null.

getDataSet

public double[][] getDataSet()
Retrieves the currently registered data set. Note that before you can get the date set it must be set using the setDataSet(double[][]).


RBAR

public double RBAR()
            throws StatisticsException
Calculates the centerline (RBAR) for the R Chart.

Evaluation

The centerline RBAR is evaluated by the following formula:
RBAR = 1/k*Σ R(i),

where:

  1. k is the number of subgroups
  2. R(i) = biggest value - smallest value for each subgroup i

Throws:
StatisticsException - thrown if the data set is null.

rChartControlLimits

public double[] rChartControlLimits()
                             throws StatisticsException
Calculates the control limits for the R Chart.

Evaluation

Find the lower control limits (LCL) and the upper control limits (UCL) with the following formulas:
LCL = D(3)RBAR
UCL = D(4)RBAR
where RBAR is the centerline for the R Chart calculated by the method RBAR(). D(3) and D(4) are constants which vary according with the number of measurements in the subgroup and can be found in the table below:
nD(3)D(4)
203.267
302.574
402.282
502.114
602.004
70.0761.924
80.1361.864
90.1841.816

where n represents the number of measurements of each subgroup.

Returns:
A double array. The first element of this double array is LCL and second element is UCL.
Throws:
StatisticsException - thrown if the data set is null.

rChartStandardDeviation

public double rChartStandardDeviation()

Calculates the process standard deviation once the R Chart is in a state of statistical control. The R Chart is in a state of statistical control if all the points from the data sample lie within the upper control limits (UCL) and the lower control limits (LCL). If a point is outside the control limits it means that the process is out of statistical control and a source of special case variation is present. You should determine the cause of this variation and eliminate it.

Evaluation

The standard deviation is evaluated by the following formula:
rSigma = RBAR/d(2)
where:

  1. RBAR is the centerline of the R Chart calculated by the method RBAR;
  2. d(2) is an array of constants which depends of the number n of measurements in the subgroup.

n23456789
d(2)1.1281.69322.0592.3262.5242.7042.8472.970


XDBLBAR

public double XDBLBAR()
               throws StatisticsException
Calculates the grand mean of all subgroups from the data sample.

Evaluation

The grand mean (XDBLBAR) is evaluated by the following formula:
XDBLBAR = 1/k*Σ XBAR(i)
where:

  1. k is the number of subgroups
  2. XBAR(i) is the mean of the subgroup i

Throws:
StatisticsException - thrown if the data set is null.

rXBARChartControlLimits

public double[] rXBARChartControlLimits()
                                 throws StatisticsException
Calculates the control limits for the XBAR Chart using R Chart.

Evaluation

Find the lower control limits (LCL) and the upper control limits (UCL) with the following formulas:
LCL= XDBLBAR - A(2) * RBAR
UCL= XDBLBAR + A(2) * RBAR
where:

  1. XDBLBAR is the grand mean of all subgroups calculated by the XDBLBAR() method;
  2. RBAR is the range of all subgroups calculated by the RBAR() method;
  3. A(2) is an array of constant which depends of the number of measurements within the subgroup.

n23456789
A(2)1.8801.0230.7290.5770.4830.4190.3730.337

Returns:
A double array.The first element of this double array is LCL and second element is UCL.
Throws:
StatisticsException - thrown if the data set is null.

SBAR

public double SBAR()
            throws StatisticsException
Calculates the centerline (SBAR) for the S Chart.

Evaluation

The centerline SBAR is evaluated by the following formula:
SBAR = 1/k * Σ S(i)
where:

  1. k is the number of subgroups within the data sample;
  2. S(i) is the standard deviation for the subgroup i.

Throws:
StatisticsException - thrown if the data set is null.

sChartControlLimits

public double[] sChartControlLimits()
                             throws StatisticsException
Calculates the control limits for the S Chart.

Evaluation

Find the lower control limits (LCL) and the upper control limits (UCL) with the following formulas:
LCL = B(3) * SBAR
UCL = B(4) * SBAR
where SBAR is the centerline for the S Chart calculated by the SBAR() method. B(3) and B(4) are constants which vary according with the number of measurements in the subgroup and can be found in the table below:
nB(3)B(4)
203.267
302.568
402.266
502.089
60.031.970
70.1181.882
80.1851.815
90.2391.761

where n represents the number of measurements of each subgroup.

Returns:
A double array. The first element of this double array is LCL and second element is UCL.
Throws:
StatisticsException - thrown if the data set is null.

sChartStandardDeviation

public double sChartStandardDeviation()
Calculates the process standard deviation once the S Chart is in a state of statistical control. The S Chart is in a state of statistical control if all the points from the data sample lie within the upper control limits (UCL) and the lower control limits (LCL). If a point is outside the control limits it means that the process is out of statistical control and a source of special case variation is present. You should determine the cause of this variation and eliminate it.

Evaluation

The standard deviation is evaluated by the following formula:
Sigma = SBAR/c(4) * √(1 - c(4)2)
where:

  1. SBAR is the centerline of the S Chart calculated by SBAR() method;
  2. c(4) is an array of constants which depends of the number n of measurements in the subgroup.

n23456789
c(4)0.79790.88620.92130.94000.95150.95940.96500.9693


sXBARChartControlLimits

public double[] sXBARChartControlLimits()
                                 throws StatisticsException
Calculates the control limits for the XBAR Chart using S Chart.

Evaluation

Find the lower control limits (LCL) and the upper control limits (UCL) with the following formulas:
LCL= XDBLBAR - A(3) * SBAR
UCL= XDBLBAR + A(3) * SBAR
where:

  1. XDBLBAR is the grand mean of all subgroups calculated by the XDBLBAR() method;
  2. SBAR is the range of all subgroups calculated by the SBAR() method;
  3. A(3) is an array of constant which depends of the number of measurements within the subgroup.

n23456789
A(3)2.6591.9541.6281.4271.2871.1821.0991.032

Returns:
A double array.The first element of this double array is LCL and second element is UCL.
Throws:
StatisticsException - thrown if the data set is null.

sMedianChartControlLimits

public double[] sMedianChartControlLimits()
                                   throws StatisticsException
Calculates the control limits for the Median Chart using S Chart.

Evaluation

Find the lower control limits (LCL) and the upper control limits (UCL) with the following formulas:
LCL= XDBLBAR - A(7) * SBAR
UCL= XDBLBAR + A(7) * SBAR
where:

  1. XDBLBAR is the grand mean of all subgroups calculated by the XDBLBAR() method;
  2. SBAR is the range of all subgroups calculated by the SBAR() method;
  3. A(7) is an array of constant which depends of the number of measurements within the subgroup.

n23456789
A(7)1.8801.0670.7960.6600.5800.5210.4770.444

Returns:
A double array where the first element of this double array is LCL and second element is UCL.
Throws:
StatisticsException - thrown if the data set is null.

rMedianChartControlLimits

public double[] rMedianChartControlLimits()
                                   throws StatisticsException
Calculates the control limits for the Median Chart using R Chart.

Evaluation

Find the lower control limits (LCL) and the upper control limits (UCL) with the following formulas:
LCL= XDBLBAR - A(6) * RBAR
UCL= XDBLBAR + A(6) * RBAR
where:

  1. XDBLBAR is the grand mean of all subgroups calculated by the XDBLBAR() method;
  2. RBAR is the range of all subgroups calculated by the RBAR() method;
  3. A(6) is an array of constant which depends of the number of measurements within the subgroup.

n23456789
A(6)1.8801.1870.7960.6910.5490.5090.4340.412

Returns:
A double array where the first element is the value of the LCL and second element is the value of the UCL.
Throws:
StatisticsException - thrown if the data set is null.

WebCab Probability and Statistics
v3.5
(J2SE Edition)