returns the error estimate on the mean value, defined as $ \epsilon = \sigma/\sqrt{N}. $
Expectation value of a function $ f $ over R
Expectation value of a function $ f $ on a given
range $ \mathcal{R} $, i.e.,
$$ \mathrm{E}\left[f ;|; \mathcal{R}\right] =
\frac{\sum_{x_i \in \mathcal{R}} f(x_i) w_i}{
\sum_{x_i \in \mathcal{R}} w_i}. $$
The range is passed as a boolean function returning
true
if the argument belongs to the range
or false
otherwise.
The function returns a pair made of the result and the number of observations in the given range.
returns the excess kurtosis, defined as $$ \frac{N^2(N+1)}{(N-1)(N-2)(N-3)} \frac{\left\langle \left(x-\langle x \rangle \right)^4 \right\rangle}{\sigma^4} - \frac{3(N-1)^2}{(N-2)(N-3)}. $$ The above evaluates to 0 for a Gaussian distribution.
returns the maximum sample value
returns the mean, defined as $$ \langle x \rangle = \frac{\sum w_i x_i}{\sum w_i}. $$
returns the minimum sample value
informs the internal storage of a planned increase in size
resets the data to a null set
number of samples collected
returns the skewness, defined as $$ \frac{N^2}{(N-1)(N-2)} \frac{\left\langle \left( x-\langle x \rangle \right)^3 \right\rangle}{\sigma^3}. $$ The above evaluates to 0 for a Gaussian distribution.
sort the data set in increasing order
returns the standard deviation $ \sigma $, defined as the square root of the variance.
returns the variance, defined as $$ \sigma^2 = \frac{N}{N-1} \left\langle \left( x-\langle x \rangle \right)^2 \right\rangle. $$
sum of data weights
Statistics tool
This class accumulates a set of data and returns their statistics (e.g: mean, variance, skewness, kurtosis, error estimation, percentile, etc.) based on the empirical distribution (no gaussian assumption)
It doesn't suffer the numerical instability problem of IncrementalStatistics. The downside is that it stores all samples, thus increasing the memory requirements.