scipy.stats.mstats.describe#
- scipy.stats.mstats.describe(a, axis=0, ddof=0, bias=True)[source]#
Computes several descriptive statistics of the passed array.
- Parameters:
- aarray_like
Data array
- axisint or None, optional
Axis along which to calculate statistics. Default 0. If None, compute over the whole array a.
- ddofint, optional
degree of freedom (default 0); note that default ddof is different from the same routine in stats.describe
- biasbool, optional
If False, then the skewness and kurtosis calculations are corrected for statistical bias.
- Returns:
- nobsint
(size of the data (discarding missing values)
- minmax(int, int)
min, max
- meanfloat
arithmetic mean
- variancefloat
unbiased variance
- skewnessfloat
biased skewness
- kurtosisfloat
biased kurtosis
Examples
>>> import numpy as np >>> from scipy.stats.mstats import describe >>> ma = np.ma.array(range(6), mask=[0, 0, 0, 1, 1, 1]) >>> describe(ma) DescribeResult(nobs=3, minmax=(masked_array(data=0, mask=False, fill_value=999999), masked_array(data=2, mask=False, fill_value=999999)), mean=1.0, variance=0.6666666666666666, skewness=masked_array(data=0., mask=False, fill_value=1e+20), kurtosis=-1.5)