If the sample sizes are small, say less than 10, then the in-sample ranges can be used instead of the in-sample standard deviations. The XbarR class plots the mean of each sample as well as control limits computed using the mean of the in-sample ranges. The positions of the control limits are determined by the equations
where is the grand mean (the average of all observations), and is the mean of the distribution of the ranges of n samples from the normal distribution with mean of zero and standard deviation of one. The standard deviation of this distribution is . Therefore
is an estimator of the standard deviation of the ranges.
This example creates an XbarR chart using the same piston ring data previously used for the XbarS chart. Here the in-sample ranges are used to compute the control limits, rather than the in-sample standard deviations (Montgomery 215).
import com.imsl.chart.*;
import com.imsl.chart.qc.*;
public class SampleXbarR extends JFrameChart {
public SampleXbarR() {
Chart chart = getChart();
AxisXY axis = new AxisXY(chart);
XbarR xbarr = new XbarR(axis, SampleXbarS.diameter);
xbarr.getUpperControlLimit().setTitle("ucl = {0,number,0.0000}");
axis.getAxisX().getAxisTitle().setTitle("Sample Number");
axis.getAxisX().getAxisLabel().setTextFormat("0");
axis.getAxisY().getAxisTitle().setTitle("Piston Ring Diameter");
axis.getAxisY().setAutoscaleInput(axis.AUTOSCALE_OFF);
axis.getAxisY().setWindow(73.985, 74.015);
}
public static void main(String argv[]) {
new SampleXbarR().setVisible(true);
}
}
PHONE: 713.784.3131 FAX:713.781.9260 |