Skip to main content

Module descriptive

Module descriptive 

Source
Expand description

Descriptive statistics of a sample.

See the book entry Descriptive statistics.

Structs§

Summary
A summary of a sample.

Functions§

excess_kurtosis
The excess kurtosis g₂ = m₄ / m₂² − 3 (biased; 0 for a normal distribution).
geometric_mean
The geometric mean (all values positive).
harmonic_mean
The harmonic mean (all values positive).
interquartile_range
The interquartile range Q3 − Q1.
mean
The arithmetic mean.
median
The median.
median_absolute_deviation
The median absolute deviation median(|x − median(x)|), scaled by scale (1.4826 makes it a consistent estimator of σ for normal data).
quantile
The p-quantile (0 ≤ p ≤ 1) by linear interpolation between order statistics at h = (n − 1)p (Hyndman and Fan type 7, the default of R and NumPy).
skewness
The sample skewness g₁ = m₃ / m₂^{3/2} (biased, as scipy.stats.skew by default).
standard_deviation
The standard deviation with ddof delta degrees of freedom.
standard_error
The standard error of the mean, s / √n.
summary
Count, mean, standard deviation and the five-number summary.
variance
The variance with ddof delta degrees of freedom: Σ(x − x̄)² / (n − ddof) (1 for the unbiased sample variance, 0 for the population variance). Two-pass for accuracy.
weighted_mean
The weighted mean Σ wᵢxᵢ / Σ wᵢ.