Sampling Distributions
via Simulation
Learn how repeated random sampling reveals the shape, center, and spread of a statistic: the key to understanding statistical inference.
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
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.
Building It Step by Step
The Central Limit Theorem
The Central Limit Theorem (CLT) is the theoretical backbone of what simulation reveals. It states:
Center, Spread, and Shape
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 \)
How to Run a Simulation
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.
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 \).
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} \).
Common Mistakes to Avoid
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?