Sampling distribution simulations
When we collect data, we usually only see one sample — but different samples from the same population can give different results. To understand how sample statistics behave across many samples, we study their sampling distribution.
Simulating sample results
One of the clearest ways to see how a statistic varies from sample to sample is to simulate the process many times. The steps below outline how to carry out a simulation of a sampling distribution.
Practice problem
The following multi-part example walks through how choices like the sample size and the number of repetitions shape what a simulated sampling distribution actually looks like.
Example:
Consider a population that follows a uniform distribution between and .
Part a.
Find the population mean and the population standard deviation.
Recall that the equation for the population mean of a uniform distribution is where and are the minimum and maximum values respectively.
Since and ,
Recall that the equation for the standard deviation of a uniform distribution is where and are the minimum and maximum values respectively.
Solution:
Thus, the population mean is and the population standard deviation is .
Now that we know the population’s true mean and standard deviation, we can think about how simulation choices affect how closely our results will reflect those true values.
Part b.
Suppose that James and Mark are both going to do a simulation. Both are using a sample size but James is doing the simulation times while Mark is doing the simulation times. Who’s simulation is going to produce more accurate results and why?
Each repetition produces a sample statistic (such as a sample mean), and those statistics naturally vary from sample to sample. When you repeat the simulation more times, the overall simulated distribution becomes smoother and the average of the simulated statistics tends to settle closer to the population value.
At some point, increasing further gives diminishing returns:
Case Value of Effect Larger Little change in results Small Less reliable output
Solution:
Mark’s simulation will typically produce more accurate and stable results because it uses many more repetitions. With only repetitions, James’s results can be strongly affected by random variation from a few unusual samples, while with repetitions, Mark’s results are much less sensitive to that randomness.
The next two parts shift focus from the number of repetitions to the sample size , and ask what shape we should expect the simulated distribution to take.
Part c.
If a simulation of at least and is performed, what would you expect the shape of the distribution to be?
Using a large number of repetitions (such as ) won’t change the underlying theoretical shape, but it will make the simulated histogram look more clearly normal and less “bumpy” due to random simulation noise.
Solution:
With , the central limit theorem applies to the sample mean, so the sampling distribution of the sample mean is expected to be approximately normal.
Part d.
If a simulation of at least is performed, but , what would you expect the shape of the distribution to be?
For comparison, if , the “sample mean” is just a single observation from the population, so the distribution would look uniform. With , averaging pulls values toward the center, so the distribution becomes more concentrated around , but not enough to be approximately normal.
Solution:
With , the central limit theorem does not give a strong normal approximation for the sample mean. Because the population is uniform, the sampling distribution of the sample mean will still be symmetric and centered near , but it won’t look as close to a normal distribution as it would with a larger (like ). You should expect a broader spread and more simulated sample means farther from than you’d typically see under a normal approximation.