1. Learn
  2. /
  3. Courses
  4. /
  5. Sampling in Python

Connected

Exercise

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.

Instructions 1/2

undefined XP
    1
    2
  • Set the sample size to 70.
  • Calculate the population size from attrition_pop.
  • Calculate the interval between the rows to be sampled.