Summary Statistics model element

Summary Statistics computes summary statistics of a number of double values without storing them. This makes this element more appropriate (efficient) to compute statistics of very large data streams.

The element is just an object of the SummaryStatistics class in the Apache Common numerics library.

Usage

To add a summary statistics element to your model, simply drag the icon element to the list of your model elements.

A call to the element method void addValue(double value) adds a double value to the data.

A call to the element method void clear() resets all statistics and storage.

The element provides several methods to retrieve descriptive statistics out of the data added. Here are just two of them:

A complete list of the methods provided can be found in the SummaryStatistics class web page.

Example of use

summaryStatistics.clear(); // Make sure the dataset is empty
summaryStatistics.addValue(1);
summaryStatistics.addValue(1);
summaryStatistics.addValue(1);
summaryStatistics.addValue(2);
_println("Mean = "+summaryStatistics.getMean()); // prints: Mean = 1.25
_println("Variance = "+summaryStatistics.getVariance()); // prints: Variance = 0.25