StatBean Name: CapabilityAnalysis

Purpose: Performs a process capability analysis to determine how well a column of numeric data conforms to a set of specification limits.

DataSource: Any.

Read/Write Properties
NameTypeDescriptionPossible ValuesDefault Value
confidenceLeveldoubleLevel of confidence for the capability index limits, as a percentage.0.0001-99.999995.0
distributionNameStringName of distribution upon which predicted percent out of spec and indices are based."Exponential",
"Extreme value",
"Gamma",
"Laplace",
"Logistic",
"Lognormal",
"Normal",
"Weibull"
"Normal"
labelUsingPbooleanWhether to use the leter "P" to label the indices rather than "S".true,false.false
lowerSpecificationLimitdoubleLocation of lower specification limit, if any.Any double value.none
nominaldoubleLocation of nominal or target value, if any.Any double value.none
tablewiseExclusionbooleanWhether all rows of the data table containing a missing value in any column should be excluded from the calculations.true,falsefalse
upperSpecificationLimitdoubleLocation of upper specification limit, if any.Any double value.none
xVariableNameStringThe name of the column with the data.Any string."X"

Other Public Methods
NameDescriptionArgumentsReturn Value
double getCp()Returns the estimated capability index.None.Capability index.
double getCpk()Returns the estimated capability index.None.Capability index.
double getCpkLower()Returns the estimated capability index.None.Capability index.
double getCpkUpper()Returns the estimated capability index.None.Capability index.
double getCpm()Returns the estimated capability index.None.Capability index.
double getCr()Returns the estimated capability index.None.Capability index.
double getPredictedAboveUpperLimit()Returns the percentage of the fitted distribution above the upper spec limit.None.Percentage.
double getPredictedBelowLowerLimit()Returns the percentage of the fitted distribution below the lower spec limit.None.Percentage.
double getK()Returns the estimated capability index.None.Capability index.
double getLowerLimitCp()Returns the lower confidence limit for the capability index.None.Capability index.
double getLowerLimitCpk()Returns the lower confidence limit for the capability index.None.Capability index.
double getLowerLimitCpm()Returns the lower confidence limit for the capability index.None.Capability index.
double getLowerLimitCr()Returns the lower confidence limit for the capability index.None.Capability index.
double getObservedAboveUpperLimit()Returns the percentage of the data above the upper spec limit.None.Percentage.
double getObservedBelowLowerLimit()Returns the percentage of the data below the lower spec limit.None.Percentage.
double getSampleMean()Returns the estimated process mean.None.Mean.
double getSampleSigma()Returns the estimated process standard deviation.None.Sigma.
int getSampleSize()Returns the number of observations in the sample.None.Sample size n.
double getUpperLimitCp()Returns the upper confidence limit for the capability index.None.Capability index.
double getUpperLimitCpk()Returns the upper confidence limit for the capability index.None.Capability index.
double getUpperLimitCpm()Returns the upper confidence limit for the capability index.None.Capability index.
double getUpperLimitCr()Returns the upper confidence limit for the capability index.None.Capability index.
double getZScoreAbove()Returns the z-score for the upper specification limit.None.Z-score.
double getZScoreBelow()Returns the z-score for the lower specification limit.None.Z-score.
double getZScoreNominal()Returns the z-score for the nominal value.None.Z-score.

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
CapabilityAnalysis capabilityanalysis1 = new STATBEANS.CapabilityAnalysis();

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

//set specification limits
capabilityanalysis1.setUpperSpecificationLimit(300.0);
capabilityanalysis1.setNominal(250.0);
capabilityanalysis1.setLowerSpecificationLimit(200.0);

//create a table bean
CapabilityAnalysisTable capabilityanalysisTable1 = new STATBEANS.CapabilityAnalysisTable();

//turn off some indices
capabilityanalysisTable1.setIncludeCpkLower(false);
capabilityanalysisTable1.setIncludeCpkUpper(false);

//ask for confidence intervals
capabilityanalysisTable1.setIncludeConfidenceLimits(true);

//create a plot bean
CapabilityAnalysisPlot controlChartsPlot1 = new STATBEANS.CapabilityAnalysisPlot();

//add the table and plot to the application frame
add(capabilityanalysisTable1);
add(capabilityanalysisPlot1);

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

//make the table and plot beans listeners for changes in the calculation bean
capabilityanalysis1.addDataChangeListener(capabilityanalysisTable1.listenerForDataChange);
capabilityanalysis1.addDataChangeListener(capabilityanalysisPlot1.listenerForDataChange);

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