Sampling Variation

This example is taken from the VIT package and its Sampling Variation module. The idea that the Sampling Variation example attempts to show is how the statistic you calculate from a population of data varies with repeated sampling, especially when the size of the sample changes.

The demonstration that has been prepared here is divided into three panels which are (from top to bottom): Data, Sample, Statistic. The animation that is performed attempts to perform the following:

  1. Selecting a sample from a population in the Data panel
  2. Pulling the currently selected sample into the Sample panel
  3. Generate a sample statistic, and leaving a “ghost” statistic behind.
  4. Pull the sample statistic into the statistic panel and turn it into a point.
  5. Repeat to build up a distribution of sample statistics.

For this quick demonstration, we will be performing 10 slow iterations, followed by 10 fast iterations.

<%= brew("mainPlot") %>