Module cloudi_statistics

CloudI Statistics

Calculate statistics using the online algorithm.

.

Copyright © 2022 Michael Truog

Version: 2.0.5 Jun 20 2023 18:35:36 ------------------------------------------------------------------------

Authors: Michael Truog (mjtruog at protonmail dot com).

Description

CloudI Statistics

Calculate statistics using the online algorithm.

Philippe Pébay, Timothy B. Terriberry, Hemanth Kolla, Janine Bennett. Formulas for the Computation of Higher-Order Central Moments. Technical Report SAND2014-17343J, Sandia National Laboratories, 2014.

Pébay, Philippe. Formulas for Robust, One-Pass Parallel Computation of Covariances and Arbitrary-Order Statistical Moments. Technical Report SAND2008-6212, Sandia National Laboratories, 2008.

Welford, B. P.. Note on a method for calculating corrected sums of squares and products. Technometrics vol. 4, no. 3, pp. 419–420, 1962.

Data Types

describe_distribution()

describe_distribution() = normal | uniform | logistic | exponential | gamma_family | log_normal_family | undefined

describe_kurtosis()

describe_kurtosis() = leptokurtic | platykurtic | mesokurtic | undefined

describe_skewness()

describe_skewness() = highly_skewed | moderately_skewed | approximately_symmetric | undefined

state()

state() = #statistics{n = non_neg_integer(), mean = float(), m2 = float(), m3 = float(), m4 = float(), minimum = float(), maximum = float(), cached_kurtosis = float() | undefined, cached_skewness = float() | undefined, cached_stddev = float() | undefined, cached_variance = float() | undefined}

Function Index

add/2

Add a sample for computing statistics.

.
add_from_list/2

Add samples from a list for computing statistics.

.
add_from_list/3

Add samples from a function mapped on a list for computing statistics.

.
count/1

Count of samples previously added.

.
describe_distribution/1

Describe the distribution with a guess about its shape.

Only use if the sample count is large enough to cover the distribution.
describe_kurtosis/1

Describe the excess kurtosis value.

Only use if the sample count is large enough to cover the distribution.
describe_skewness/1

Describe the skewness value.

Only use if the sample count is large enough to cover the distribution.

(based on) Bulmer, M.
kurtosis/1

Excess kurtosis of samples previously added.

The minimum value returned is -2.0 (Fisher’s definition).
maximum/1

Maximum of samples previously added.

.
mean/1

Mean of samples previously added.

The value returned is the arithmetic mean.
merge/2

Merge statistics state.

.
minimum/1

Minimum of samples previously added.

.
new/0

Create statistics state.

.
normal_from_log_normal/1

Convert the Log-normal distribution mean and standard deviation to Normal distribution mean and standard deviation.

.
normal_to_log_normal/1

Convert the Normal distribution mean and standard deviation to Log-normal distribution mean and standard deviation.

.
skewness/1

Sample skewness of samples previously added.

The value returned is the Fisher-Pearson coefficient of skewness.
standard_deviation/1

Sample standard deviation of samples previously added.

.
variance/1

Sample variance of samples previously added.

.

Function Details

add/2

add(X::number(), State::state()) -> state()

Add a sample for computing statistics.

add_from_list/2

add_from_list(L::[number()], State::state()) -> state()

Add samples from a list for computing statistics.

add_from_list/3

add_from_list(F::function(), L::[number()], State::state()) -> state()

Add samples from a function mapped on a list for computing statistics.

count/1

count(State::state()) -> non_neg_integer()

Count of samples previously added.

describe_distribution/1

describe_distribution(State::state()) -> {describe_distribution(), state()}

Describe the distribution with a guess about its shape.

Only use if the sample count is large enough to cover the distribution.

describe_kurtosis/1

describe_kurtosis(State::state()) -> {describe_kurtosis(), state()}

Describe the excess kurtosis value.

Only use if the sample count is large enough to cover the distribution.

describe_skewness/1

describe_skewness(State::state()) -> {describe_skewness(), state()}

Describe the skewness value.

Only use if the sample count is large enough to cover the distribution.

(based on) Bulmer, M. G.. Principles of Statistics. Dover Publications, 1979.

kurtosis/1

kurtosis(State::state()) -> {float() | undefined, state()}

Excess kurtosis of samples previously added.

The minimum value returned is -2.0 (Fisher’s definition).

maximum/1

maximum(State::state()) -> float()

Maximum of samples previously added.

mean/1

mean(State::state()) -> float()

Mean of samples previously added.

The value returned is the arithmetic mean.

merge/2

merge(StateA::state(), StateB::state()) -> state()

Merge statistics state.

minimum/1

minimum(State::state()) -> float()

Minimum of samples previously added.

new/0

new() -> state()

Create statistics state.

normal_from_log_normal/1

normal_from_log_normal(State::state()) -> {{NormalMean::float(), NormalStdDev::float()} | undefined, state()}

Convert the Log-normal distribution mean and standard deviation to Normal distribution mean and standard deviation.

normal_to_log_normal/1

normal_to_log_normal(State::state()) -> {{LogNormalMean::float(), LogNormalStdDev::float()} | undefined, state()}

Convert the Normal distribution mean and standard deviation to Log-normal distribution mean and standard deviation.

skewness/1

skewness(State::state()) -> {float() | undefined, state()}

Sample skewness of samples previously added.

The value returned is the Fisher-Pearson coefficient of skewness.

standard_deviation/1

standard_deviation(State::state()) -> {float() | undefined, state()}

Sample standard deviation of samples previously added.

variance/1

variance(State::state()) -> {float() | undefined, state()}

Sample variance of samples previously added.


Generated by EDoc