# src/Statistics/Statistics.hpp file

Statistics class declaration.

### Contents

• Reference

This file implements a statistics class that can be used to estimate statistics from an ensemble. Supported at this time are ordinary and central statistical moments of arbitrary-length products and arbitrary number of 1D, 2D, and 3D probability density functions (PDF) with sample spaces of ordinary and/or central sample space variables.

Definitions and nomenclature:

• Upper-case letters denote a full random variable, e.g., X
• Lower-case letters denote a fluctuation about the mean, i.e., x = X - <X>
• Letters can be augmented by a field ID, i.e., X2 is the full variable of the second component of the vector X, while x1 = X1 - <X1> is the fluctuation about the mean of the first component of vector X.
• If the field ID is unspecified, it defaults to the first field, i.e., X = X1, x = x1, etc.
• Statistical moments of arbitrary-length products can be computed.

Examples:

• <X> - mean,
• <xx> - variance,
• <xxx> - third central moment,
• <xy> - covariance of X and Y,
• <x1y2> - covariance of the first component of vector X and the second component of vector Y
• In general, arbitrary-length products can be estimated that make up a statistical moment, using any number and combinations of upper and lower-case letters and their field IDs < [A-Za-z][1-9] ... >.
• A statistical moment is ordinary if and only if all of its terms are ordinary. A central moment has at least one term that is central, i.e., a fluctuation about its mean.
• Examples of ordinary moments: <X>, <XX>, <XYZ>, etc.
• Examples of central moments: <x1x2>, <Xy>, <XYz>, etc.
• Estimation of the PDFs can be done using either ordinary or central sample space variables.

Examples:

• p(X) denotes the univariate PDF of the full variable X,
• f(x1,x2) denotes the bivariate joint PDF of the fluctuations of the variables x1 and x2 about their respective means,
• g(X,y,Z2) denotes the trivariate joint PDF of variables X, y = Y - <Y>, and Z2.

## Namespaces

namespace tk
Toolkit declarations and definitions for general purpose utilities.

## Classes

class tk::Statistics
Statistics estimator.