Calculation STATBEANS®

 

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

Name Type Description Possible Values Default Value
confidenceLevel double Level of confidence for the capability index limits, as a percentage. 0.0001-99.9999 95.0
distributionName String Name of distribution upon which predicted percent out of spec and indices are based. "Exponential",
"Extreme value",
"Gamma",
"Laplace",
"Logistic",
"Lognormal",
"Normal",
"Weibull"
"Normal"
labelUsingP boolean Whether to use the leter "P" to label the indices rather than "S". true,false. false
lowerSpecificationLimit double Location of lower specification limit, if any. Any double value. none
nominal double Location of nominal or target value, if any. Any double value. none
tablewiseExclusion boolean Whether all rows of the data table containing a missing value in any column should be excluded from the calculations. true,false false
upperSpecificationLimit double Location of upper specification limit, if any. Any double value. none
xVariableName String The name of the column with the data. Any string. "X"


Other Public Methods

Name Description Arguments Return 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.

Added January, 2019

Name Description Arguments Return Value
double getShorttermCp() Returns the estimated capability index. None. Capability index.
double getShorttermCpk() Returns the estimated capability index. None. Capability index.
double getShorttermCpkLower() Returns the estimated capability index. None. Capability index.
double getShorttermCpkUpper() Returns the estimated capability index. None. Capability index.
double getShorttermCr() Returns the estimated capability index. None. Capability index.
double getShorttermSigma() Returns the estimated capability index. None. Capability index.

 

Capability Analysis 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();