Calculation STATBEANS®

 

STATBEAN Name: Percentiles

 

Purpose: Calculates and finds percentiles in statistics for a single column of numeric data. Allows Statgraphics software to function as a data percentile calculator.

DataSource For Percentiles In Statistics: Any. 


Read/Write Properties For The Data Percentile Calculator
Name Type Description Possible Values Default Value
tablewiseExclusion boolean Whether all rows of the data table containing a missing value in any column should be excluded from the plot. true,false false
xVariableName String The name of the column with data values to be plotted on the horizontal axis. Any string. "X"

Other Public Methods
Name Description Arguments Return Value
double getPercentile(double p) Returns the p-th percentile. Percentage at which percentile will be calculated. p-th percentile


Code Sample 

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

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

//create a calculation bean 
Percentiles percentiles1 = new STATBEANS.Percentiles(); 

//set the name of the data column 
percentiles1.setXVariableName("mpg"); 

//make the calculation bean a listener 
fileDataSource1.addDataChangeListener(percentiles1.listenerForDataChange); 

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

//retrieve the percentiles 
double p10=percentiles1.getPercentile(10.0); 
double p50=percentiles1.getPercentile(50.0); 
double p90=percentiles1.getPercentile(90.0);}