Skip to main content
HomeR

Course

Hypothesis Testing in R

IntermediateSkill Level
4.7+
897 reviews
Updated 11/2025
Learn how and when to use hypothesis testing in R, including t-tests, proportion tests, and chi-square tests.
Start Course for Free
RProbability & 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

Group

Training 2 or more people?

Try DataCamp for Business

Course 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 R
1

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.
Start Chapter
2

Two-Sample and ANOVA Tests

3

Proportion Tests

4

Non-Parametric Tests

Hypothesis Testing in R
Course
Complete

Earn Statement of Accomplishment

Add this credential to your LinkedIn profile, resume, or CV
Share it on social media and in your performance review
Enroll Now

Don’t just take our word for it

*4.7
from 897 reviews
78%
20%
2%
0%
0%
  • Napaporn
    16 hours ago

  • James
    2 days ago

  • Ahmad kedebi
    2 days ago

  • Emily
    2 days ago

  • Abdullateef
    3 days ago

  • Charlie
    4 days ago

Napaporn

James

Ahmad kedebi

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.