01 / 20

Sampling Distributions
via Simulation

Learn how repeated random sampling reveals the shape, center, and spread of a statistic: the key to understanding statistical inference.

Math 3

What Is a Sampling Distribution?

Imagine you draw a random sample of size \( n \) from a population and compute a statistic (like the sample mean \( \bar{x} \)). Now imagine repeating that process hundreds or thousands of times. The distribution of all those computed statistics is called the sampling distribution.

Three Key Distributions

Population
The entire group you want to study. Has a fixed parameter (e.g., \( \mu \)).
Sample
A subset of size \( n \) drawn at random. Produces a statistic (e.g., \( \bar{x} \)).
Sampling Distribution
The distribution of that statistic across many repeated samples of size \( n \).

Why Use Simulation?

In the real world, we usually collect only one sample. We cannot literally repeat the sampling process thousands of times. Simulation lets a computer mimic that process so we can see the sampling distribution emerge.

1
Define the population (or assume a model for it).
2
Draw a random sample of size \( n \) and compute the statistic.
3
Repeat steps 1-2 many times (e.g., 1,000 or 10,000 times).
4
Plot the results in a histogram to see the sampling distribution.

Building It Step by Step

Population
mean = \( \mu \)
Sample 1 → \( \bar{x}_1 \)
Sample 2 → \( \bar{x}_2 \)
Sample k → \( \bar{x}_k \)
...
Plot all \( \bar{x} \) values
Sampling Distribution of \( \bar{x} \)
values of \( \bar{x} \)

The Central Limit Theorem

The Central Limit Theorem (CLT) is the theoretical backbone of what simulation reveals. It states:

Center, Spread, and Shape

Center
The mean of the sampling distribution equals the population mean: \( \mu_{\bar{x}} = \mu \). The statistic is unbiased.
Spread
The standard error is \( \text{SE} = \frac{\sigma}{\sqrt{n}} \). Larger \( n \) means less variability.
Shape
Approximately normal for large \( n \) (CLT). Rule of thumb: \( n \geq 30 \) is often sufficient.

Parameter vs. Statistic

Parameter Statistic
Describes The entire population A single sample
Symbol (mean) \( \mu \) \( \bar{x} \)
Symbol (proportion) \( p \) \( \hat{p} \)
Fixed or varies? Fixed (one true value) Varies from sample to sample
Known? Usually unknown Calculated from data

Effect of Sample Size \( n \)

\( \bar{x} \)
\( \mu \)
n = 5 n = 30 n = 100 Frequency

How to Run a Simulation

1
State the population model. Define the distribution (e.g., mean \( \mu = 70 \), \( \sigma = 10 \)).
2
Choose your sample size \( n \) and the number of repetitions (e.g., \( n = 25 \), repeat 1,000 times).
3
For each repetition: draw \( n \) values at random, compute \( \bar{x} \) (or \( \hat{p} \)), and record it.
4
Create a histogram of all recorded statistics. This approximates the sampling distribution.
5
Describe center, spread, shape. Compare to theoretical predictions from the CLT.

Example 1: Mean of Dice Rolls

A fair die has outcomes \( \{1, 2, 3, 4, 5, 6\} \) with \( \mu = 3.5 \) and \( \sigma \approx 1.71 \). Roll the die \( n = 10 \) times and record \( \bar{x} \). Repeat 1,000 times.

2.0 2.5 3.0 3.5 4.0 4.5
\( \mu = 3.5 \)
Frequency

Example 2: Proportion of Heads

Flip a fair coin \( n = 40 \) times and record \( \hat{p} \), the proportion of heads. Repeat 2,000 times. The population proportion is \( p = 0.5 \).

Center
\( \mu_{\hat{p}} = p = 0.5 \)
Standard Error
\( \text{SE} = \sqrt{\frac{p(1-p)}{n}} = \sqrt{\frac{0.25}{40}} \approx 0.079 \)

Example 3: Skewed Population

Consider household income, which is right-skewed. Suppose \( \mu = \$55{,}000 \) and \( \sigma = \$30{,}000 \). Simulate taking samples of \( n = 50 \) and computing \( \bar{x} \).

Population (Skewed) Income → n = 50 × 1,000 reps
Sampling Dist of \( \bar{x} \)
\( \bar{x} \)
\( \mu = \$55\text{k} \)

Common Mistakes to Avoid

✕ Confusing Distributions
The sampling distribution is not the same as the population distribution or the sample data distribution. It describes the statistic, not individual data points.
✕ Too Few Repetitions
Running only 20 or 50 simulations gives a jagged histogram. Use at least 1,000 repetitions to see a smooth pattern emerge.
✕ Ignoring Sample Size
The CLT requires \( n \) to be large enough. For skewed populations, \( n = 5 \) is usually not sufficient for normality. Check with simulation.

Summary: Key Formulas

Sample Mean \( \bar{x} \) Sample Proportion \( \hat{p} \)
Center \( \mu_{\bar{x}} = \mu \) \( \mu_{\hat{p}} = p \)
Standard Error \( \frac{\sigma}{\sqrt{n}} \) \( \sqrt{\frac{p(1-p)}{n}} \)
Shape (CLT) Approx. Normal for large \( n \) Approx. Normal if \( np \geq 10 \) and \( n(1-p) \geq 10 \)
Simulation verifies All three properties All three properties

Question 1 of 5

A population has mean \( \mu = 100 \) and standard deviation \( \sigma = 20 \). If you take samples of size \( n = 25 \), what is the standard error of the sampling distribution of \( \bar{x} \)?

Question 2 of 5

What does the Central Limit Theorem tell us about the sampling distribution of \( \bar{x} \)?

Question 3 of 5

A student runs a simulation with 50 repetitions of drawing samples of size \( n = 30 \). The resulting histogram looks rough and jagged. What should they do?

Question 4 of 5

In a simulation, 1,000 samples of size \( n = 40 \) are drawn from a population with \( p = 0.3 \). What is the approximate standard error of the sampling distribution of \( \hat{p} \)?

Question 5 of 5

A right-skewed population is sampled with \( n = 5 \). The simulation histogram of \( \bar{x} \) also appears right-skewed. Which statement best explains this?