Skip to content

Statistical Recipes in Python

Maurice HT Ling edited this page Aug 14, 2021 · 42 revisions

Descriptive Statistics

  1. Arithmetic mean
  2. Geometric mean
  3. Harmonic mean
  4. Maximum
  5. Minimum
  6. Moment
  7. Kurtosis
  8. Sample standard deviation
  9. Sample standard error
  10. Sample variance
  11. Skew

Normality Tests

Examine whether a set of values are normally distributed.

  1. Kurtosis test: test whether kurtosis of data is normal
  2. Jarque-Bera test: normality test for large sample size (n > 2000)
  3. Shapiro-Wilk test for normality: normality test for small sample size
  4. Skew test: test whether the skew of data is normal

Equal Variance Tests

Examine whether two or more sets of values have the same variance (or standard deviation).

  1. Bartlett's test
  2. Fligner-Killeen test
  3. Levene's test

Parametric and Nonparametric Correlations

Examine the trend of 2 sets of values.

  1. Kendall's tau: correlation measure for ordinal data
  2. Pearson's correlation coefficient: correlation measure for normally distributed data
  3. Point biserial correlation coefficient: correlation measure between a binary variable and a continuous variable
  4. Somer's D: asymmetric measure of ordinal association
  5. Spearman's rank correlation coefficient: correlation measure for ranked data

Parametric Tests

  1. Alexander Govern test: test for equal means in 2 or more samples without assuming equal variances
  2. ANOVA - One-way: test for equal means in 2 or more samples assuming equal variances
  3. t-test - 2-samples (independent samples) assuming equal variance
  4. t-test - 2-samples (independent samples) assuming unequal variance
  5. t-test - paired (dependent samples)

Nonparametric Tests

  1. Brunner-Munzel test: non-parametric version of 2-samples (independent samples) t-test without assuming equal variances
  2. Chi-Square test: test whether 2 distributions are equal
  3. Cramér-von Mises test: test whether 2 distributions are equal
  4. Cressie-Read power divergence test: test whether 2 distributions are equal
  5. Epps-Singleton test: test whether 2 distributions are equal
  6. G-test: : test whether 2 distributions are equal
  7. Kolmogorov-Smirnov test: test whether 2 distributions are equal
  8. Kruskal-Wallis H-test: non-parametric version of ANOVA - One-way
  9. Mann-Whitney U test: non-parametric version of 2-samples (independent samples) t-test assuming equal variances
  10. Page's L test: measure of trend in observations between treatments
  11. Wilcoxon rank-sum test: non-parametric version of 2-samples (independent samples) t-test assuming equal variances
  12. Wilcoxon signed-rank test: non-parametric version of t-test - paired (dependent samples)
Clone this wiki locally