Session Ready
Exercise

Calculating the sample mean

Simulation involves generating samples and then measuring. In this exercise, we'll generate some samples and calculate the sample mean with the describe() method. See what you observe about the sample mean as the number of samples increases.

We've preloaded the binom object and the describe() method from scipy.stats for you, so you can calculate some values.

Instructions 1/3
undefined XP
  • 1

    Generate a sample of 100 fair coin flips using .rvs() and calculate the sample mean using describe().

    • 2

      Generate a sample of 1,000 fair coin flips and calculate the sample mean.

    • 3

      Generate a sample of 2,000 fair coin flips and calculate the sample mean.