Sampling distribution demonstration




Shiny app by Gail Potter
Base R code by Gail Potter
Shiny source files: GitHub Gist
Cal Poly Statistics Dept Shiny Series

In the left panel, specify a population shape, sample size, and statistic of interest. When you press the 'Draw samples' button, a sample from that population will be generated and plotted below left. The statistic will be calculated and added to the histogram at right. By generating many different samples, you can see how the statistic tends to vary from one sample to the next. That distribution is called the 'sampling distribution'. You can change the population distribution to see how that impacts your sample histogram as well as the sampling distribution.