Hypothesis Testing in Python
Learn how and when to use common hypothesis tests like t-tests, proportion tests, and chi-square tests in Python.
Start Course for Free4 hours15 videos50 exercises39,456 learnersStatement of Accomplishment
Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.Training 2 or more people?
Try DataCamp for BusinessLoved by learners at thousands of companies
Course Description
Hypothesis testing lets you answer questions about your datasets in a statistically rigorous way. In this course, you'll grow your Python analytical skills as you learn how and when to use common tests like t-tests, proportion tests, and chi-square tests. Working with real-world data, including Stack Overflow user feedback and supply-chain data for medical supply shipments, you'll gain a deep understanding of how these tests work and the key assumptions that underpin them. You'll also discover how non-parametric tests can be used to go beyond the limitations of traditional hypothesis tests.
Training 2 or more people?
Get your team access to the full DataCamp platform, including all the features.In the following Tracks
Statistics Fundamentals in Python
Go To Track- 1
Hypothesis Testing Fundamentals
FreeHow does hypothesis testing work and what problems can it solve? To find out, you’ll walk through the workflow for a one sample proportion test. In doing so, you'll encounter important concepts like z-scores, p-values, and false negative and false positive errors.
Hypothesis tests and z-scores50 xpUses of A/B testing50 xpCalculating the sample mean100 xpCalculating a z-score100 xpp-values50 xpCriminal trials and hypothesis tests50 xpLeft tail, right tail, two tails100 xpCalculating p-values100 xpStatistical significance50 xpDecisions from p-values50 xpCalculating a confidence interval100 xpType I and type II errors100 xp - 2
Two-Sample and ANOVA Tests
In this chapter, you’ll learn how to test for differences in means between two groups using t-tests and extend this to more than two groups using ANOVA and pairwise t-tests.
Performing t-tests50 xpHypothesis testing workflow100 xpTwo sample mean test statistic100 xpCalculating p-values from t-statistics50 xpWhy is t needed?50 xpThe t-distribution50 xpFrom t to p100 xpPaired t-tests50 xpIs pairing needed?100 xpVisualizing the difference100 xpUsing ttest()100 xpANOVA tests50 xpVisualizing many categories100 xpConducting an ANOVA test100 xpPairwise t-tests100 xp - 3
Proportion Tests
Now it’s time to test for differences in proportions between two groups using proportion tests. Through hands-on exercises, you’ll extend your proportion tests to more than two groups with chi-square independence tests, and return to the one sample case with chi-square goodness of fit tests.
One-sample proportion tests50 xpt for proportions?50 xpTest for single proportions100 xpTwo-sample proportion tests50 xpTest of two proportions100 xpproportions_ztest() for two samples100 xpChi-square test of independence50 xpThe chi-square distribution50 xpHow many tails for chi-square tests?50 xpPerforming a chi-square test100 xpChi-square goodness of fit tests50 xpVisualizing goodness of fit100 xpPerforming a goodness of fit test100 xp - 4
Non-Parametric Tests
Finally, it’s time to learn about the assumptions made by parametric hypothesis tests, and see how non-parametric tests can be used when those assumptions aren't met.
Assumptions in hypothesis testing50 xpCommon assumptions of hypothesis tests50 xpTesting sample size100 xpNon-parametric tests50 xpWhich parametric test?50 xpWilcoxon signed-rank test100 xpNon-parametric ANOVA and unpaired t-tests50 xpWilcoxon-Mann-Whitney100 xpKruskal-Wallis100 xpCongratulations!50 xp
Training 2 or more people?
Get your team access to the full DataCamp platform, including all the features.In the following Tracks
Statistics Fundamentals in Python
Go To Trackcollaborators
prerequisites
Sampling in PythonJames Chapman
See MoreData Science & AI Curriculum Manager, DataCamp
James is a Curriculum Manager at DataCamp, where he collaborates with experts from industry and academia to create courses on AI, data science, and analytics. He has led nine DataCamp courses on diverse topics in Python, R, AI developer tooling, and Google Sheets. He has a Master's degree in Physics and Astronomy from Durham University, where he specialized in high-redshift quasar detection. In his spare time, he enjoys restoring retro toys and electronics.
Follow James on LinkedIn
Follow James on LinkedIn
Join over 15 million learners and start Hypothesis Testing in Python today!
Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.