Session Ready
Exercise

Sample Statistics versus Population

In this exercise you will work with a preloaded population. You will construct a sample by drawing points at random from the population. You will compute the mean standard deviation of the sample taken from that population to test whether the sample is representative of the population. Your goal is to see where the sample statistics are the same or very close to the population statistics.

Instructions
100 XP
  • Compute and print the mean and standard deviation of the population data.
  • Use the np.random.seed() method to set numpy's pseudorandom sampler seed as 42.
  • Use np.random.choice() to create a sample of size=31, where size is the number of points drawn from the population.
  • Compute and print the mean and standard deviation of the sample and inspect the printed values of the sample statistics and population statistics to see whether they differ.