pyhctsa.operations.distribution.withinp

pyhctsa.operations.distribution.withinp(x, p=1.0, mean_or_median='mean')

Proportion of data points within p standard deviations of the mean or median.

Parameters:
x : array-like

The input time series.

p : float

The number (proportion) of standard deviations. Default is 1.0

mean_or_median : str

Whether to use units of ‘mean’ and standard deviation, or ‘median’ and rescaled interquartile range (IQR_TO_SIGMA * IQR, IQR_TO_SIGMA = 1/(2 Phi^{-1}(3/4))). Default is 'mean'.

Returns:

The proportion of data points within p standard deviations.

Return type:

float