This project contains the working samples from the Introduction to hypothesis testing blog post series by Sonalake.
The series of blog posts outlines in more detail what are the reasons for using these code samples.
The cheat sheet mentioned in the blog post is here:
The different examples from the blog post are:
- Compare the proportion in a sample to an expected value: 1-sample z test
- Compare the proportions between 2 samples 2-sample z test
- Compare the mean of a sample to an expected value 1-sample t test
- Compare the mean of the samples from 2 different populations 2-sample independent z test
- Compare the mean of two samples from the same population 2-sample paired t test
- Compare the counts for some variables in a sample to an expected distribution chi-squared goodness-of-fit
- Compare the counts for some variables between two samples chi-squared homogeneity
- Check single sample to see if the discrete variables are independent chi-squared independence
First set up your environment:
python3 -m venv env
Then set up your dependencies:
env/bin/python -m pip install -r requirements.txt
You can use this venv/bin/python
to run these examples, but
PyCharm will use this virtualenv
as-is.