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

Exercise

Replicating samples

When you calculate a point estimate such as a sample mean, the value you calculate depends on the rows that were included in the sample. That means that there is some randomness in the answer. In order to quantify the variation caused by this randomness, you can create many samples and calculate the sample mean (or another statistic) for each sample.

attrition_pop is available; pandas and matplotlib.pyplot are loaded with their usual aliases.

Instructions 1/2

undefined XP
    1
    2
  • Replicate the provided code so that it runs 500 times. Assign the resulting list of sample means to mean_attritions.