Session Ready
Exercise

Visualizing Variation of a Statistic

Previously, you have computed the variation of sample statistics. Now you'll visualize that variation.

We'll start with a preloaded population and a predefined function get_sample_statistics() to draw the samples, and return the sample statistics arrays.

Here we will use a predefined plot_hist() function that wraps the matplotlib method axis.hist(), which both bins and plots the array passed in. In this way you can see how the sample statistics have a distribution of values, not just a single value.

Instructions
100 XP
  • Pass the population into get_sample_statistics() to get the sample statistic distributions.
  • Use np.linspace() to define histogram bin edges for each statistic array.
  • Use the predefined plot_hist() twice, to plot the statistic distributions means and deviations as two separate histograms.