Session Ready
Exercise

Approximate sampling distribution

Calculating the exact sampling distribution is only possible in very simple situations. With just five eight-sided dice, the number of possible rolls is 8 ^ 5, which is over forty thousand. When the dataset is more complicated, for example where a variable has hundreds or thousands or categories, the number of possible outcomes becomes too difficult to compute exactly.

In this situation, you can calculate an approximate sampling distribution by simulating the exact sampling distribution. That is, you can repeat a procedure over and over again to simulate both the sampling process and the sample statistic calculation process.

tibble and ggplot2 are loaded.

Instructions 1/4
undefined XP
  • 1
  • 2
  • 3
  • 4
  • Sample one to eight, five times, with replacement. Assign to five_rolls.
  • Calculate the mean of five_rolls.