HomeRHypothesis Testing in R

# Hypothesis Testing in R

4.1+
34 reviews
Intermediate

Learn how and when to use hypothesis testing in R, including t-tests, proportion tests, and chi-square tests.

4 Hours16 Videos53 Exercises

or

Training 2 or more people?Try DataCamp For Business

## 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."

### .css-1goj2uy{margin-right:8px;}Group.css-gnv7tt{font-size:20px;font-weight:700;white-space:nowrap;}.css-12nwtlk{box-sizing:border-box;margin:0;min-width:0;color:#05192D;font-size:16px;line-height:1.5;font-size:20px;font-weight:700;white-space:nowrap;}Training 2 or more people?

Try DataCamp for BusinessFor a bespoke solution book a demo.

### In the following Tracks

Certification Available

#### Data Analyst with R

Go To Track
Certification Available

Go To Track

Go To Track
1. 1

### Introduction to Hypothesis Testing

Free

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.

Play Chapter Now
Hypothesis tests and z-scores
50 xp
Uses of A/B testing
50 xp
Calculating the sample mean
100 xp
Calculating a z-score
100 xp
p-values
50 xp
Criminal trials and hypothesis tests
50 xp
Left tail, right tail, two tails
100 xp
Calculating p-values
100 xp
Statistical significance
50 xp
Decisions from p-values
50 xp
Calculating confidence intervals
100 xp
Type I and type II errors
100 xp
2. 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. 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. 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.

### In the following Tracks

Certification Available

#### Data Analyst with R

Go To Track
Certification Available

Go To Track

#### Statistician with R

Go To Track

In other tracks

Statistics Fundamentals with R

Collaborators

Prerequisites

Sampling in R
Richie Cotton

Data Evangelist at DataCamp

Richie is a Data Evangelist at DataCamp. He has been using R since 2004, in the fields of proteomics, debt collection, and chemical health and safety. He has released almost 30 R packages on CRAN and Bioconductor – most famously the assertive suite of packages – as well as creating and contributing to many others. He also has written two books on R programming, Learning R and Testing R Code.
See More

## Don’t just take our word for it

*4.1
from 34 reviews
53%
21%
21%
3%
3%
Sort by
• David C.
8 months

It's a great course but I struggle to remember the theory despite multiple watches

• James K.
11 months

Very practical presentation, covering the essential ideas and content stripped to bare minimum without compromising on coverage.

• Deyanira L.

Excellent

• Nicolas F.
over 1 year

Very helpful course that explains the basics of hypothesis testing providing a foundation of completing these research tasks in R. Thank you!

• Valentino M.
over 1 year

Very intuitive, organized, and user-friendly

"It's a great course but I struggle to remember the theory despite multiple watches"

David C.

"Very practical presentation, covering the essential ideas and content stripped to bare minimum without compromising on coverage."

James K.

"Excellent"

Deyanira L.

or