stats: module of statistical functions

PyHdust stats module: statistical tools

license:GNU GPL v3.0
pyhdust.stats.cdf(x, xlim=None, savefig=False)[source]

Display the CDF (Cumulative Density Distribution) of a sample x.

A comparison with a gaussian and a linear one are made.

pyhdust.stats.mad(data, axis=None)[source]

Return 1.48xMAD (median absolute deviation)

The MAD is a robust statistic, being more resilient to outliers in a data set than the standard deviation.

pyhdust.stats.summary(x, verbose=False)[source]

Returns the summary of the variable: “median”, “minus sigma” and “plus sigma” ROBUST values (i.e., median and [15.9, 84.1] percentiles).


import pyhdust.stats as stt

for i in range(8):
    a = _np.random.randn(10**i)+2
    print(np.average(a), np.std(a), stt.summary(a))