Achievable logoAchievable logo
AP Statistics
Sign in
Sign up
Purchase
Textbook
Practice exams
Support
How it works
Resources
Exam catalog
Mountain with a flag at the peak
Textbook
Introduction
1. One variable data
2. Two variable data
3. Data collection
4. Probability and random variables
5. Sampling distributions
5.1 Calculations for the normal distribution
5.2 Central limit theorem
5.3 Biased and unbiased estimators
5.4 Sample proportions
5.5 Sample means
5.6 Sampling distribution simulations
6. Categorical data
7. Quantitative data
8. Chi-square
9. Linear regression
Wrapping up
Achievable logoAchievable logo
5.6 Sampling distribution simulations
Achievable AP Statistics
5. Sampling distributions
Our AP Statistics course is currently in development and is a work-in-progress.

Sampling distribution simulations

5 min read
Font
Discuss
Share
Feedback
Definitions
Sampling distribution
the probability distribution of a statistic computed from many repeated samples drawn from the same population.

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.

How to simulate a sample distribution:

  1. Identify the population and the statistic: Specify the population and its key characteristics (such as mean and standard deviation, or median and IQR). Then choose the sample statistic you want to study (for example, the sample mean, sample proportion, etc.).
  2. Select a sample size n: Choose the sample size you’ll draw from the population in each repetition of the simulation.
  3. Repeat sampling many times (N times): Randomly select a sample of size n from the population and calculate the chosen statistic for that sample. Repeat this process N times, recording the statistic each time.
  4. Plot the distribution: Optionally, plot the results to get a clear visual of the simulated sampling distribution.
  5. Analyze the distribution: Describe the shape, center, and spread of the simulated sampling distribution, and compare what you see to the theoretical expectations from Step 1. Choose a measure of center that matches the shape (mean for roughly symmetric distributions, median for skewed distributions). For spread, use standard deviation with the mean and IQR with the median.
Sidenote
Important to know!

One of the most common uses of sampling distribution simulations is to illustrate the central limit theorem by simulating the sampling distribution of the sample mean.

Practice problem

The following multi-part example walks through how choices like the sample size n and the number of repetitions N shape what a simulated sampling distribution actually looks like.

Example:

Consider a population that follows a uniform distribution between 0 and 10.

Part a.

Find the population mean and the population standard deviation.

Recall that the equation for the population mean of a uniform distribution is μ=2a+b​ where a and b are the minimum and maximum values respectively.

Since a=0 and b=10,

μ​=2a+b​=20+10​=210​=5​

Recall that the equation for the standard deviation of a uniform distribution is σ=12(b−a)2​​ where a and b are the minimum and maximum values respectively.

σ​=12(10−0)2​​=12100​​≈2.887​

Solution:

(spoiler)

Thus, the population mean is μ=5 and the population standard deviation is σ∼2.887.

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 n but James is doing the simulation N=10 times while Mark is doing the simulation N=1000 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 N further gives diminishing returns:

Case Value of N Effect
Larger N 1000→10000 Little change in results
Small N 10 Less reliable output

Solution:

(spoiler)

Mark’s simulation will typically produce more accurate and stable results because it uses many more repetitions. With only N=10 repetitions, James’s results can be strongly affected by random variation from a few unusual samples, while with N=1000 repetitions, Mark’s results are much less sensitive to that randomness.

The next two parts shift focus from the number of repetitions N to the sample size n, and ask what shape we should expect the simulated distribution to take.

Part c.

If a simulation of at least N=1000 and n=30 is performed, what would you expect the shape of the distribution to be?

Using a large number of repetitions (such as N=1000) 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:

(spoiler)

With n=30, 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 N=1000 is performed, but n=3, what would you expect the shape of the distribution to be?

For comparison, if n=1, the “sample mean” is just a single observation from the population, so the distribution would look uniform. With n=3, averaging pulls values toward the center, so the distribution becomes more concentrated around 5, but not enough to be approximately normal.

Solution:

(spoiler)

With n=3, 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 5, but it won’t look as close to a normal distribution as it would with a larger n (like 30). You should expect a broader spread and more simulated sample means farther from 5 than you’d typically see under a normal approximation.

Sampling distribution

  • Probability distribution of a statistic from repeated samples
  • Key for understanding variability of sample statistics
  • Common statistics: sample mean (xˉ), sample proportion (p^​)

Simulating a sampling distribution

  • Identify population, statistic, and parameters (mean, SD, etc.)
  • Choose sample size n and number of repetitions N
  • Randomly sample n values, compute statistic, repeat N times
  • Analyze shape, center, and spread of simulated distribution

Central Limit Theorem (CLT)

  • As n increases, sampling distribution of xˉ approaches normal
  • Applies even if population is not normal
  • Larger n yields more normal-like sampling distribution

Simulation accuracy

  • Larger N (number of repetitions) gives smoother, more reliable results
  • Small N leads to more variability and less stable estimates
  • Diminishing returns for very large N (e.g., N=1000 vs N=10000)

Uniform distribution example

  • Population mean: μ=2a+b​=5
  • Population standard deviation: σ=12(b−a)2​​≈2.887
  • For n=30, sampling distribution of xˉ is approximately normal
  • For n=3, sampling distribution is symmetric but not normal; more spread and less concentration around mean

Key summary points

  • Sampling distribution: distribution of a statistic from all possible samples of size n
  • Simulation: repeatedly sample, compute statistic, analyze resulting distribution
  • CLT: larger n makes sampling distribution of mean more normal
  • Larger N (repetitions) improves simulation reliability

Sign up for free to take 5 quiz questions on this topic

Previous
Next  | 6.1 Introduction to confidence intervals
All rights reserved ©2016 - 2026 Achievable, Inc.

Sampling distribution simulations

Definitions
Sampling distribution
the probability distribution of a statistic computed from many repeated samples drawn from the same population.

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.

How to simulate a sample distribution:

  1. Identify the population and the statistic: Specify the population and its key characteristics (such as mean and standard deviation, or median and IQR). Then choose the sample statistic you want to study (for example, the sample mean, sample proportion, etc.).
  2. Select a sample size n: Choose the sample size you’ll draw from the population in each repetition of the simulation.
  3. Repeat sampling many times (N times): Randomly select a sample of size n from the population and calculate the chosen statistic for that sample. Repeat this process N times, recording the statistic each time.
  4. Plot the distribution: Optionally, plot the results to get a clear visual of the simulated sampling distribution.
  5. Analyze the distribution: Describe the shape, center, and spread of the simulated sampling distribution, and compare what you see to the theoretical expectations from Step 1. Choose a measure of center that matches the shape (mean for roughly symmetric distributions, median for skewed distributions). For spread, use standard deviation with the mean and IQR with the median.
Sidenote
Important to know!

One of the most common uses of sampling distribution simulations is to illustrate the central limit theorem by simulating the sampling distribution of the sample mean.

Practice problem

The following multi-part example walks through how choices like the sample size n and the number of repetitions N shape what a simulated sampling distribution actually looks like.

Example:

Consider a population that follows a uniform distribution between 0 and 10.

Part a.

Find the population mean and the population standard deviation.

Recall that the equation for the population mean of a uniform distribution is μ=2a+b​ where a and b are the minimum and maximum values respectively.

Since a=0 and b=10,

μ​=2a+b​=20+10​=210​=5​

Recall that the equation for the standard deviation of a uniform distribution is σ=12(b−a)2​​ where a and b are the minimum and maximum values respectively.

σ​=12(10−0)2​​=12100​​≈2.887​

Solution:

(spoiler)

Thus, the population mean is μ=5 and the population standard deviation is σ∼2.887.

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 n but James is doing the simulation N=10 times while Mark is doing the simulation N=1000 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 N further gives diminishing returns:

Case Value of N Effect
Larger N 1000→10000 Little change in results
Small N 10 Less reliable output

Solution:

(spoiler)

Mark’s simulation will typically produce more accurate and stable results because it uses many more repetitions. With only N=10 repetitions, James’s results can be strongly affected by random variation from a few unusual samples, while with N=1000 repetitions, Mark’s results are much less sensitive to that randomness.

The next two parts shift focus from the number of repetitions N to the sample size n, and ask what shape we should expect the simulated distribution to take.

Part c.

If a simulation of at least N=1000 and n=30 is performed, what would you expect the shape of the distribution to be?

Using a large number of repetitions (such as N=1000) 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:

(spoiler)

With n=30, 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 N=1000 is performed, but n=3, what would you expect the shape of the distribution to be?

For comparison, if n=1, the “sample mean” is just a single observation from the population, so the distribution would look uniform. With n=3, averaging pulls values toward the center, so the distribution becomes more concentrated around 5, but not enough to be approximately normal.

Solution:

(spoiler)

With n=3, 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 5, but it won’t look as close to a normal distribution as it would with a larger n (like 30). You should expect a broader spread and more simulated sample means farther from 5 than you’d typically see under a normal approximation.

Key points

Sampling distribution

  • Probability distribution of a statistic from repeated samples
  • Key for understanding variability of sample statistics
  • Common statistics: sample mean (xˉ), sample proportion (p^​)

Simulating a sampling distribution

  • Identify population, statistic, and parameters (mean, SD, etc.)
  • Choose sample size n and number of repetitions N
  • Randomly sample n values, compute statistic, repeat N times
  • Analyze shape, center, and spread of simulated distribution

Central Limit Theorem (CLT)

  • As n increases, sampling distribution of xˉ approaches normal
  • Applies even if population is not normal
  • Larger n yields more normal-like sampling distribution

Simulation accuracy

  • Larger N (number of repetitions) gives smoother, more reliable results
  • Small N leads to more variability and less stable estimates
  • Diminishing returns for very large N (e.g., N=1000 vs N=10000)

Uniform distribution example

  • Population mean: μ=2a+b​=5
  • Population standard deviation: σ=12(b−a)2​​≈2.887
  • For n=30, sampling distribution of xˉ is approximately normal
  • For n=3, sampling distribution is symmetric but not normal; more spread and less concentration around mean

Key summary points

  • Sampling distribution: distribution of a statistic from all possible samples of size n
  • Simulation: repeatedly sample, compute statistic, analyze resulting distribution
  • CLT: larger n makes sampling distribution of mean more normal
  • Larger N (repetitions) improves simulation reliability

More from Sampling distributions

  • Calculations for the normal distribution
  • Central limit theorem
  • Biased and unbiased estimators
  • Sample proportions
  • Sample means