HomeRSampling in R

# Sampling in R

4.3+
40 reviews
Intermediate

Master sampling to get more accurate statistics with less data.

4 Hours15 Videos51 Exercises

or

Training 2 or more people?Try DataCamp For Business

## Course Description

Sampling is a cornerstone of inference statistics and hypothesis testing. It's tremendously important in survey analysis and experimental design. This course explains when and why sampling is important, teaches you how to perform common types of sampling, from simple random sampling to more complex methods like stratified and cluster sampling. Later, the course covers estimating population statistics, and quantifying uncertainty in your estimates by generating sampling distributions and bootstrap distributions. Throughout the course, you'll explore real-world datasets on coffee ratings, Spotify songs, and employee attrition.

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

Free

Learn what sampling is and why it is useful, understand the problems caused by convenience sampling, and learn about the differences between true randomness and pseudo-randomness.

Play Chapter Now
Sampling and point estimates
50 xp
Reasons for sampling
50 xp
Simple sampling with dplyr
100 xp
Simple sampling with base-R
100 xp
Convenience sampling
50 xp
Are findings from the sample generalizable?
100 xp
Are these findings generalizable?
100 xp
Pseudo-random number generation
50 xp
Generating random numbers
100 xp
Understanding random seeds
100 xp
2. 2

### Sampling Methods

Learn how to and when to perform the four methods of random sampling: simple, systematic, stratified, and cluster.

3. 3

### Sampling Distributions

Learn how to quantify the accuracy of sample statistics using relative errors, and measure variation in your estimates by generating sampling distributions.

4. 4

### Bootstrap Distributions

Learn how to use resampling to perform bootstrapping, used to estimate variation in an unknown population. Understand the difference between sampling distributions and bootstrap distributions.

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

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.3
from 40 reviews
60%
18%
20%
0%
3%
Sort by
• Nurym S.
9 months

Insightful

• Thomas S.
10 months

Helped me a lot to understand sampling and bootstrapping.

• Fulvio B.
10 months

Well structured, it gives the basis to understand sampling and to decide which type of sampling is better.

• Richard L.

Solid instruction and materials that covers the intricacies of doing sampling in a statistically correct way

• Nguyễn K.

Great course

"Insightful"

Nurym S.

"Helped me a lot to understand sampling and bootstrapping."

Thomas S.

"Well structured, it gives the basis to understand sampling and to decide which type of sampling is better."

Fulvio B.