Skip to main content

Hypothesis testing and other testing methods

Project description

hypothetical - Hypothesis and Statistical Testing in Python

Build Status Build status Coverage Status Codacy Badge Dependencies Python versions

Python library for conducting hypothesis and other group comparison tests.

Available Methods

Analysis of Variance

  • One-way Analysis of Variance (ANOVA)
  • One-way Multivariate Analysis of Variance (MANOVA)

Contingency Tables and Related Tests

  • Chi-square test of independence
  • Fisher's Exact Test
  • McNemar's Test of paired nominal data
  • Cochran's Q test

Descriptive Statistics

  • Kurtosis
  • Skewness
  • Mean Absolute Deviation
  • Pearson Correlation
  • Spearman Correlation
  • Covariance
    • Several algorithms for computing the covariance and covariance matrix of sample data are available
  • Variance
    • Several algorithms are also available for computing variance.
  • Simulation of Correlation Matrices
    • Multiple simulation algorithms are available for generating correlation matrices.

Critical Value Tables and Lookup Functions

  • Chi-square statistic
  • r (one-sample runs test and Wald-Wolfowitz runs test) statistic
  • Mann-Whitney U-statistic
  • Wilcoxon Rank Sum W-statistic

Hypothesis Testing

  • Binomial Test
  • t-test
    • paired, one and two sample testing

Nonparametric Methods

  • Friedman's test for repeated measures
  • Kruskal-Wallis (nonparametric equivalent of one-way ANOVA)
  • Mann-Whitney (two sample nonparametric variant of t-test)
  • Mood's Median test
  • One-sample Runs Test
  • Sign test of consistent differences between observation pairs
  • Wald-Wolfowitz Two-Sample Runs test
  • Wilcoxon Rank Sum Test (one sample nonparametric variant of paired and one-sample t-test)

Normality and Goodness-of-Fit Tests

  • Chi-square one-sample goodness-of-fit
  • Jarque-Bera test

Post-Hoc Analysis

  • Tukey's Honestly Significant Difference (HSD)
  • Games-Howell (nonparametric)

Helpful Functions

  • Add noise to a correlation or other matrix
  • Tie Correction for ranked variables
  • Contingency table marginal sums
  • Contingency table expected frequencies
  • Runs and count of runs

Goal

The goal of the hypothetical library is to help bridge the gap in statistics and hypothesis testing capabilities of Python closer to that of R. Python has absolutely come a long way with several popular and amazing libraries that contain a myriad of statistics functions and methods, such as numpy, pandas, and scipy; however, it is my humble opinion that there is still more that can be done to make Python an even better language for data and statistics computation. Thus, it is my hope with the hypothetical library to build on top of the wonderful Python packages listed earlier and create an easy-to-use, feature complete, statistics library. At the end of the day, if the library helps a user learn more about statistics or get the information they need in an easy way, then I consider that all the success I need!

Requirements

  • Python 3.5+
  • numpy>=1.13.0
  • numpy_indexed>=0.3.5
  • pandas>=0.22.0
  • scipy>=1.1.0
  • statsmodels>=0.9.0

Installation

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hypothetical-0.2.1.tar.gz (64.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hypothetical-0.2.1-py2.py3-none-any.whl (75.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file hypothetical-0.2.1.tar.gz.

File metadata

  • Download URL: hypothetical-0.2.1.tar.gz
  • Upload date:
  • Size: 64.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for hypothetical-0.2.1.tar.gz
Algorithm Hash digest
SHA256 68c1610d3bbc485daa09fc0d296f672e71b4ead898dd13e9dd8f98ed65fb7bee
MD5 a0821a399fbb4a9a1f38bb530edbc3d8
BLAKE2b-256 e5eda76adbde8bf059eff6b57edf092c012fced24586b5eb192a91e985de86da

See more details on using hashes here.

File details

Details for the file hypothetical-0.2.1-py2.py3-none-any.whl.

File metadata

  • Download URL: hypothetical-0.2.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 75.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for hypothetical-0.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 41c5533a29734c03bd5d48b7fdafdee5c9cd9fe4f2337296c37173cc678c36b7
MD5 aff9a8847f78ee3dc29ddb27f0f141bf
BLAKE2b-256 6a7117b0036139276c712c34c4e5aa7d4989a787387e16269f23cd70367c580c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page