SampleStatisticsTable STATBEAN®

 

Purpose: Displays tabular presentation of data in one or more numeric columns. Allows Statgraphics to provide tabulation in statistics of useable data.

DataSource: SampleStatistics. 

samplestatisticstable

Read/Write Properties:

Name Type Description Possible Values Default Value
coefficientOfVariation boolean Whether to display the coefficient of variation. true,false false
geometricMean boolean Whether to display the sample geomtric mean. true,false false
interquartileRange boolean Whether to display the interquartile range. true,false false
kurtosis boolean Whether to display the sample kurtosis. true,false false
lowerQuartile boolean Whether to display the lower quartile. true,false false
maximum boolean Whether to display the sample maximum. true,false true
mean boolean Whether to display the sample mean. true,false true
median boolean Whether to display the sample median. true,false false
minimum boolean Whether to display the sample minimum. true,false true
mode boolean Whether to display the sample mode. true,false false
range boolean Whether to display the sample range. true,false false
sampleSize boolean Whether to display the sample size. true,false true
showColumnNames boolean Whether to include column names at the top of the table. true,false true
skewness boolean Whether to display the sample skewness. true,false false
standardDeviation boolean Whether to display the sample standard deviation. true,false true
standardError boolean Whether to display the standard error of the mean. true,false false
standardizedSkewness boolean Whether to display the standardized skewness. true,false false
standardizedKurtosis boolean Whether to display the standardized kurtosis. true,false false
total boolean Whether to display the sample sum. true,false false
upperQuartile boolean Whether to display the upper quartile. true,false false
variance boolean Whether to display the sample variance. true,false false

Other properties for the tabular presentation of data are inherited from the java.awt.Panel class and from the general TabularStatbean class. 

Code Sample:

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

//set the file name 
fileDataSource1.setFileName("c:\\statbeans\\samples\\cardata.txt"); 

//create a samplestatistics bean 
sampleStatistics1 = new STATBEANS.SampleStatistics(); 

//set the column names for computing statistics 
java.lang.String[] tempString = new java.lang.String[3]; 
tempString[0] = new java.lang.String("mpg"); 
tempString[1] = new java.lang.String("weight"); 
tempString[2] = new java.lang.String("horsepower"); 
sampleStatistics1.setColumnNames(tempString); 

//create a table bean 
sampleStatisticsTable1 = new STATBEANS.SampleStatisticsTable(); 

//define any non-default statistics to be included in the table 
sampleStatisticsTable1.setMedian(true); 
sampleStatisticsTable1.setVariance(true); 
sampleStatisticsTable1.setKurtosis(true); 
sampleStatisticsTable1.setCoefficientOfVariation(true); 
sampleStatisticsTable1.setRange(true); 
sampleStatisticsTable1.setMode(true); 
sampleStatisticsTable1.setSkewness(true); 

//add the table to the display panel 
add(sampleStatisticsTable1); 

//register the calculation StatBean as a listener to the datasource 
fileDataSource1.addDataChangeListener(sampleStatistics1.listenerForDataChange; 

//register the table StatBean as a listener to the calculation StatBean 
sampleStatistics1.addDataChangeListener(sampleStatisticsTable1.listenerForDataChange); 

//read the file 
fileDataSource1.readData(); 

//notify all listeners 
fileDataSource1.updateListeners();