View Source CEM.Stats (cem v0.1.0)

Helper functions for common statistical aggregates.

Summary

Functions

Compute the mean of a sample of numbers.

Compute the mean and standard deviation of a sample of numbers.

Compute the standard deviation of a sample of numbers.

Functions

@spec sample_mean([number()], non_neg_integer()) :: number() | nil

Compute the mean of a sample of numbers.

If the sample list is empty, nil is returned.

Link to this function

sample_mean_and_std(sample)

View Source
@spec sample_mean_and_std([number()]) :: {number() | nil, number() | nil}

Compute the mean and standard deviation of a sample of numbers.

If the sample list is empty, {nil, nil} is returned.

Link to this function

sample_std(sample, n, mean)

View Source
@spec sample_std([number()], non_neg_integer(), number()) :: number() | nil

Compute the standard deviation of a sample of numbers.

If the sample list is empty, nil is returned.