StatBean Name: ToleranceLimits

Purpose: Computes normal tolerance limits.

DataSource: Any.


Read/Write Properties
NameTypeDescriptionPossible ValuesDefault Value
confidenceLeveldoubleLevel of confidence for the tolerance limits, as a percentage.0.0001-99.999995.0
oneSidedbooleanWhether to compute one-sided rather than two-sided limits.true,falsefalse
populationPercentagedoublePercentage at which tolerance limits are calculated.0.0001-99.999999.73
tablewiseExclusionbooleanWhether all rows of the data table containing a missing value in any column should be excluded from the plot.true,falsefalse
xVariableNameStringThe name of the column with the data.Any string."X"

Other Public Methods
NameDescriptionArgumentsReturn Value
double getLowerToleranceLimit()Returns the lower tolerance limit.None.Tolerance limit.
double getSampleMean()Returns the sample mean.None.Mean.
double getSampleSigma()Returns the sample standard deviation.None.Sigma.
int getSampleSize()Returns the number of observations in the sample.None.Sample size n.
double getSigmaMultiple()Returns the multiple of sigma used to calculate the limits.None.Multiple.
double getUpperToleranceLimit()Returns the upper tolerance limit.None.Tolerance limit.

Code Sample

//create a datasource bean
FileDataSource fileDataSource1 = new STATBEANS.FileDataSource();

//set the file name to be read
fileDataSource1.setFileName("c:\\statbeans\\samples\\spc.txt");

//create a calculation bean
ToleranceLimits toleranceLimits1 = new STATBEANS.ToleranceLimits();

//set the name of the column containing the data
toleranceLimits1.setXVariableName("strength");

//set the population percentage
toleranceLimits1.setPopulationPercentage(99.99);

//make the calculation bean a listener for changes in the FileDataSource bean
fileDataSource1.addDataChangeListener(toleranceLimits1.listenerForDataChange);

//instruct the fileDataSource bean to read the file
fileDataSource1.readData();

//retrieve the limits
double lowerLimit=toleranceLimits1.getLowerToleranceLimit();
double upperLimit=toleranceLimits1.getUpperToleranceLimit();