Statistical functions for masked arrays (scipy.stats.mstats
)¶
This module contains a large number of statistical functions that can be used with masked arrays.
Most of these functions are similar to those in scipy.stats
but might
have small differences in the API or in the algorithm used. Since this
is a relatively new package, some API changes are still possible.
Summary statistics¶
|
Computes several descriptive statistics of the passed array. |
|
Compute the geometric mean along the specified axis. |
|
Calculate the harmonic mean along the specified axis. |
|
Computes the kurtosis (Fisher or Pearson) of a dataset. |
|
Returns an array of the modal (most common) value in the passed array. |
|
Computes empirical quantiles for a data array. |
|
Returns the Harrell-Davis estimate of the median along the given axis. |
|
Computes quantile estimates with the Harrell-Davis method. |
|
The standard error of the Harrell-Davis quantile estimates by jackknife. |
|
Returns an estimate of the lower and upper quartiles. |
|
Returns plotting positions (or empirical percentile points) for the data. |
|
Returns plotting positions (or empirical percentile points) for the data. |
|
Calculates the nth moment about the mean for a sample. |
|
Computes the skewness of a data set. |
|
Compute the trimmed mean. |
|
Compute the trimmed variance |
|
Compute the trimmed minimum |
|
Compute the trimmed maximum |
|
Compute the trimmed standard error of the mean. |
|
Computes the coefficient of variation, the ratio of the biased standard deviation to the mean. |
|
Find repeats in arr and return a tuple (repeats, repeat_count). |
|
Calculates the standard error of the mean of the input array. |
|
|
|
Selected confidence interval of the trimmed mean along the given axis. |
|
|
|
Frequency statistics¶
|
Calculate the score at the given ‘per’ percentile of the sequence a. |
Correlation functions¶
|
Performs a 1-way ANOVA, returning an F-value and probability given any number of groups. |
|
Calculates a Pearson correlation coefficient and the p-value for testing non-correlation. |
|
Calculates a Spearman rank-order correlation coefficient and the p-value to test for non-correlation. |
|
Calculates a point biserial correlation coefficient and its p-value. |
|
Computes Kendall’s rank correlation tau on two variables x and y. |
Computes a multivariate Kendall’s rank correlation tau, for seasonal data. |
|
|
Calculate a linear least-squares regression for two sets of measurements. |
|
Computes the Siegel estimator for a set of points (x, y). |
|
Computes the Theil-Sen estimator for a set of points (x, y). |
Statistical tests¶
|
Calculates the T-test for the mean of ONE group of scores. |
|
Calculates the T-test for the mean of ONE group of scores. |
|
Calculates the T-test for the means of TWO INDEPENDENT samples of scores. |
|
Calculates the T-test on TWO RELATED samples of scores, a and b. |
|
Calculate a one-way chi square test. |
|
Computes the Kolmogorov-Smirnov test on two samples. |
|
Computes the Kolmogorov-Smirnov test on two samples. |
|
Computes the Mann-Whitney statistic |
|
Returns the rank (also known as order statistics) of each data point along the given axis. |
|
Compute the Kruskal-Wallis H-test for independent samples |
|
Compute the Kruskal-Wallis H-test for independent samples |
|
Friedman Chi-Square is a non-parametric, one-way within-subjects ANOVA. |
|
Computes the Brunner-Munzel test on samples x and y |
|
Tests whether the skew is different from the normal distribution. |
|
Tests whether a dataset has normal kurtosis |
|
Tests whether a sample differs from a normal distribution. |
Transformations¶
|
Computes a transform on input data (any number of columns). |
|
Trims an array by masking the data outside some given limits. |
|
Trims an array by masking the data outside some given limits. |
|
Returns the standard error of the trimmed mean along the given axis. |
|
Trims an array by masking some proportion of the data on each end. |
|
Trims the data by masking values from one tail. |
|
Trims the smallest and largest data values. |
|
Returns a Winsorized version of the input array. |
|
Calculate the relative z-scores. |
|
Calculate the z score of each value in the sample, relative to the sample mean and standard deviation. |
Other¶
|
Constructs a 2D array from a group of sequences. |
|
Counts the number of tied values. |
|
Returns the sign of x, or 0 if x is masked. |
|
Compares the medians from two independent groups along the given axis. |
|
Computes the alpha-level confidence interval for the median of the data. |
|
Returns the Maritz-Jarrett estimators of the standard error of selected experimental quantiles of the data. |
|
Computes the alpha confidence interval for the selected quantiles of the data, with Maritz-Jarrett estimators. |
|
Evaluates Rosenblatt’s shifted histogram estimators for each data point. |