Course
Hypothesis Testing in R
IntermediateSkill Level
Updated 11/2025RProbability & Statistics4 hr16 videos53 Exercises4,000 XP33,116Statement 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.Loved by learners at thousands of companies
Training 2 or more people?
Try DataCamp for BusinessCourse Description
Discover Hypothesis Testing in R
Hypothesis testing lets you ask questions about your datasets and answer them in a statistically rigorous way. In this course, you'll learn how and when to use common tests like t-tests, proportion tests, and chi-square tests.You'll gain a deep understanding of how they work and the assumptions that underlie them. You'll also learn how different hypothesis tests are related using the ""There is only one test"" framework and use non-parametric tests that let you sidestep the requirements of traditional hypothesis tests.
Learn About T-Tests and Chi-Square Tests
You’ll start by learning why hypothesis testing in R is useful while examining some key concepts as you go. You’ll also learn how t-tests can help you test for differences in means between two groups and how chi-square tests can help you compare observed results with expected results.Understand the Relationships Between R Hypothesis Tests
As you progress, you’ll discover the relationships between different tests, exploring elements of randomness, independence of observation, and sample sizes.By the time you finish this course, you’ll have a deeper understanding of hypothesis testing in R and when it’s appropriate to use specific tests on your data.
Throughout the course, you'll explore a Stack Overflow user survey and a dataset of late shipments of medical supplies."
Prerequisites
Sampling in R1
Introduction to Hypothesis Testing
Learn why hypothesis testing is useful, and step through the workflow for a one sample proportion test. In doing so, you'll encounter important concepts like z-scores, p-p-values, and false negative and false positive errors. The Stack Overflow survey and late medical shipments datasets are introduced.
2
Two-Sample and ANOVA Tests
Learn how to test for differences in means between two groups using t-tests, and how to extend this to more than two groups using ANOVA and pairwise t-tests.
3
Proportion Tests
Learn how to test for differences in proportions between two groups using proportion tests, extended it to more than two groups with chi-square independence tests, and return to the one sample case with chi-square goodness of fit tests.
4
Non-Parametric Tests
Learn about the assumptions made by parametric hypothesis tests and see how simulation-based and rank-based non-parametric tests can be used when those assumptions aren't met.
Hypothesis Testing in R
Course Complete
Earn Statement of Accomplishment
Add this credential to your LinkedIn profile, resume, or CVShare it on social media and in your performance reviewEnroll Now
FAQs
What are t-tests?
We use t-tests to determine whether or not the means of two groups of data are equal to each other. T-tests are one of the most common statistical tests.
What are chi-squared tests?
A chi-squared test is a test to measure the difference between the observed and expected frequencies.
What are 4 ways to test a hypothesis?
"We can outline the four steps for testing a hypothesis as: State the hypotheses (a null hypothesis and alternative hypothesis). Create an analysis plan outlining how to use data to accept or reject the null hypothesis. Analyze sample data using a hypothesis test. Interpret the results to determine whether to reject or accept the null hypothesis."
Join over 19 million learners and start Hypothesis Testing in R 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.Grow your data skills with DataCamp for Mobile
Make progress on the go with our mobile courses and daily 5-minute coding challenges.