Get startedGet started for free

Systematic sampling

One sampling method that avoids randomness is called systematic sampling. Here, you pick rows from the population at regular intervals.

For example, if the population dataset had one thousand rows, and you wanted a sample size of five, you could pick rows 0, 200, 400, 600, and 800.

attrition_pop is available; pandas has been pre-loaded as pd.

This exercise is part of the course

Sampling in Python

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Set the sample size to 70
sample_size = ____

# Calculate the population size from attrition_pop
pop_size = ____

# Calculate the interval
interval = ____
Edit and Run Code