---
title: Tabulation STATBEANS® | Java Beans For Statistical Procedures
description: Tabulation STATBEANS® is a collection of Java Beans which compute statistics which may then be accessed by user programs.
---

[![Statgraphics 19 logo](https://www.statgraphics.com/hs-fs/hubfs/stat19plain-01-1.png?width=2272&height=484&name=stat19plain-01-1.png "Statgraphics 19 logo")](https://www.statgraphics.com)

- [Products](https://www.statgraphics.com/product)
- [Learn](https://www.statgraphics.com/statistics-library)
- [Training](https://www.statgraphics.com/training-and-consulting)

- [Product](https://www.statgraphics.com/product) 
    - [Centurion XVIII](https://www.statgraphics.com/centurion-xvii)
    - [Sigma Express](https://www.statgraphics.com/statgraphics-sigma-express)
    - [Online](https://www.statgraphics.com/statgraphics-stratus)
    - [Web Services](https://www.statgraphics.com/statgraphics-web-services)
- [Learn](https://www.statgraphics.com/statistics-library) 
    - [Statistics Library](https://www.statgraphics.com/statistics-library)
    - [Six Sigma & Lean](https://www.statgraphics.com/six-sigma-lean)
    - [Instructional Videos](https://www.statgraphics.com/instructional-videos)
    - [Applications/ Case Studies](https://www.statgraphics.com/application)
- [Training & Consulting](https://www.statgraphics.com/training-and-consulting) 
    - [Statpoint Seminars](https://www.statgraphics.com/statpoint-seminar)
    - [Statpoint Instructors](https://www.statgraphics.com/statpoint-instructor)
    - [Training Partners](https://www.statgraphics.com/training-partners)
    - [Webinars](https://www.statgraphics.com/webinars)
- [Support](https://www.statgraphics.com/customer-support-overview)
- [Blog](https://www.statgraphics.com/blog)
- [Store](http://store.statgraphics.com)

### Statgraphics

## [Centurion](https://www.statgraphics.com/centurion-overview)

#### [LEARN MORE](https://www.statgraphics.com/centurion-overview)

### Statgraphics

## [Sigma *express*](https://www.statgraphics.com/statgraphics-sigma-express)

#### [LEARN MORE](https://www.statgraphics.com/statgraphics-sigma-express)

### Statgraphics

## [*Stratus*](https://www.statgraphics.com/statgraphics-stratus)

#### [LEARN MORE](https://www.statgraphics.com/statgraphics-stratus)

### Statgraphics

## [Web Services](https://www.statgraphics.com/statgraphics-web-services)

#### [LEARN MORE](https://www.statgraphics.com/statgraphics-web-services)

## [Statistics Library](https://www.statgraphics.com/statistics-library)

#### [LEARN MORE](https://www.statgraphics.com/statistics-library)

## [Six Sigma & Lean](https://www.statgraphics.com/six-sigma-lean)

#### [LEARN MORE](https://www.statgraphics.com/six-sigma-lean)

## [Instructional Videos](https://www.statgraphics.com/instructional-videos)

#### [LEARN MORE](https://www.statgraphics.com/instructional-videos)

## [Applications/ Case Studies](https://www.statgraphics.com/statistical-applications)

#### [LEARN MORE](https://www.statgraphics.com/statistical-applications)

## [Statgraphics Seminars](https://www.statgraphics.com/statpoint-seminar)

#### [LEARN MORE](https://www.statgraphics.com/statpoint-seminar)

## [Statgraphics Instructors](https://www.statgraphics.com/statpoint-instructor)

#### [LEARN MORE](https://www.statgraphics.com/statpoint-instructor)

## [Training Partners](https://www.statgraphics.com/public-seminar)

#### [LEARN MORE](https://www.statgraphics.com/public-seminar)

## [Webinars](https://www.statgraphics.com/webinars)

#### [LEARN MORE](https://www.statgraphics.com/webinars)

#### Statbeans

- [STATBEANS® Overview](https://www.statgraphics.com/statbeans)
- [DataSource STATBEANS®](https://www.statgraphics.com/statbeans_datasource)
- [Calculation STATBEANS®](https://www.statgraphics.com/statbeans_calculations)
- [Tabular STATBEANS®](https://www.statgraphics.com/statbeans_tabular)
- [Graphical STATBEANS®](https://www.statgraphics.com/statbeans_graphical)

[Back to Product Overviews](https://www.statgraphics.com/product)

<https://www.statgraphics.com/statbeans/calculations/tabulation#anchor3>

# Calculation STATBEANS®

 

**STATBEAN Name:** Tabulation

 

**Purpose:** Tabulates a single column of data. For categorical data, finds the frequency of all unique values. For numeric data, finds the frequency within specified intervals. 

**DataSource: **any. 

**Read/Write Properties**

| **Name** | **Type** | **Description** | **Possible Values** | **Default Value** |
| --- | --- | --- | --- | --- |
| by | double | Width of intervals (continuous data only). | Any double value > 0. | 0.1 |
| caseSensitive | boolean | Whether placing data values into classes is case sensitive. | true,false | false |
| combineClassCriterion | double | Value at or below which classes are combined. | any double | 1.0 |
| combineClassLabel | String | Label for the combined class, if any. | Any string. | "Other" |
| combineClassMethod | String | Method for combining classes. | "None", "Frequency", "Percentage" | "None" |
| dataType | String | The type of data to be tabulated. If Categorical, shows unique values. If Discrete, shows all integer values. If Continuous, shows number of values within intervals. | "Categorical", "Discrete", "Continuous" | "Categorical" |
| from | double | Lower limit for first interval (numeric data only). | Any double value. | 0.0 |
| to | double | Upper limit for last interval (numeric data only). | Double value > from. | 1.0 |
| xVariableName | String | The name of the first column with data values to be tabulated. | Any string. | "X" |
| yVariableName | String | The name of the second column (if any) with data values to be tabulated. | Any string. | "" |

**Other Public Methods**

| **Name** | **Description** | **Arguments** | **Return Value** |
| --- | --- | --- | --- |
| String getLabels() | Returns the labels for each class, separated by a tab character. | None. | Labels. |
| int getCountAbove() | For Continuous datatype, the number of data values greater than the last class. | None. | Number of values. |
| int getCountBelow() | For Continuous datatype, the number of data values less than the first class. | None. | Number of values. |
| double getLowerLimit() | For Continuous and Discrete datatypes, the lower limit of the first class. | None. | Lower limit. |
| int getMean() | For Continuous and Discrete datatypes, the sample mean for the first variable. | None. | Mean. |
| int getMean2() | For Continuous and Discrete datatypes, the sample mean for the second variable. | None. | Mean. |
| int getNumberOfClasses() | Returns the number of classes k into which the data was tabulated. | None. | Number of classes. |
| int getSigma() | For Continuous and Discrete datatypes, the sample standard deviation for the first variable. | None. | Standard deviation. |
| int getSigma2() | For Continuous and Discrete datatypes, the sample standard deviation for the second variable. | None. | Standard deviation. |
| int getTotalCount() | Returns the sum of the frequencies for the first variable. | None. | Total count. |
| int getTotalCount2() | Returns the sum of the frequencies for the second variable. | None. | Total count. |
| double getUpperLimit() | For Continuous and Discrete datatypes, the upper limit of the last class. | None. | Upper limit. |

**Output Variables**

| **Name** | **Description** |
| --- | --- |
| Frequency | Numbers of data values in each class for the first variable. |
| Frequency2 | Numbers of data values in each class for the second variable. |
| Label | Labels for each class. |
| Percentage | Percentage of data values in each class for the first variable. |
| Percentage2 | Percentage of data values in each class for the second variable. |

**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   
Tabulation tabulation1 = new STATBEANS.Tabulation(); 

//set the column to be tabulated   
tabulation1.setXVariableName("year"); 

//set the desired ordering for the tabulation   
tabulation1.setOrdering("Alphabetical"); 

//create a table bean   
FrequencyTable frequencyTable1 = new STATBEANS.FrequencyTable(); 

//create 2 plot beans   
Barchart barchart1 = new STATBEANS.Barchart();   
Piechart piechart1 = new STATBEANS.Piechart();

//set the display name   
frequencyTable1.setClassName("Year");   
barchart1.setClassName("Year");   
piechart1.setClassName("Year"); 

//scale the axis by class percentage   
barchart1.setScaleByPercentage(true); 

//request labels at the ends of the bars   
barchart1.setBarLabels("Frequency"); 

//add lines from slices   
piechart1.setLinesToLabels(true); 

//offset a slice   
piechart1.setHighlightSlice1(5); 

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

//make the table and plot beans listeners for changes in the calculation bean   
tabulation1.addDataChangeListener(frequencyTable1.listenerForDataChange);   
tabulation1.addDataChangeListener(barchart1.listenerForDataChange);   
tabulation1.addDataChangeListener(piechart1.listenerForDataChange); 

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

[![contact-icon](https://www.statgraphics.com/hs-fs/hubfs/stat19web/sales.png?width=50&name=sales.png "contact-icon.fw")](https://www.statgraphics.com/contact-us-dealers-global-partners)

### [CONTACT SALES](https://www.statgraphics.com/contact-us-dealers-global-partners)

Contact our Sales team today

[![youtube-icon.fw](https://www.statgraphics.com/hubfs/stat19web/watchr.png)](https://www.statgraphics.com/instructional-videos)

### [WATCH A VIDEO](https://www.statgraphics.com/instructional-videos)

Learn more about the many enhancements added to Version 19

[![download](https://www.statgraphics.com/hubfs/stat19web/downloadr.png)](https://www.statgraphics.com/download18)

### [DOWNLOAD TRIAL](https://www.statgraphics.com/download19)

Try Statgraphics 19 today for free!

[![eye icon](https://www.statgraphics.com/hubfs/stat19web/viewr.png)](https://www.statgraphics.com/download-brochure-0)

### [VIEW BROCHURE](https://www.statgraphics.com/download-brochure-0)

Discover Statgraphics 19 with our product brochure.

![contact us](https://www.statgraphics.com/hubfs/stat19web/contactr.png)

© 2025 Statgraphics Technologies, Inc.

The Plains, Virginia

[CONTACT US](https://www.statgraphics.com/contact-us-partner)

![Statgraphics download center](https://www.statgraphics.com/hs-fs/hubfs/stat19web/downloadcr.png?width=50&name=downloadcr.png)

Have you purchased Statgraphics Centurion or Sigma Express and need to download your copy?

[CLICK HERE](https://www.statgraphics.com/download-center)

- [Support](https://www.statgraphics.com/customer-support-overview)
- [Company](https://www.statgraphics.com/contact-us-dealers-global-partners)
- [Blog](https://blog.statgraphics.com)

-  
-          

-  