MATH 3 • STATISTICS & PROBABILITY

Sampling Distributions via Simulation — I can use simulation to estimate a sampling distribution conceptually at my level.

Discover how repeating random samples reveals predictable patterns in data.

Historical Context & Motivation

Imagine you want to know the average height of every student in your school, but measuring all 2,000 students would take forever. Instead, you grab a random group of 30 students and compute their average. But here's the catch — a different group of 30 students would give you a slightly different average. How do you know whether your single sample is any good? This question has puzzled statisticians for centuries, and it eventually led to one of the most powerful ideas in all of statistics: the sampling distribution.

A sampling distribution shows us every possible value a statistic (like a sample mean) could take if we repeated the sampling process over and over. Early mathematicians worked out the theory with pencil and paper, but modern computers have made it possible to simulate the process — generating thousands of random samples in seconds and watching the pattern emerge on screen.

1733
De Moivre's Bell Curve
Abraham de Moivre first described the normal (bell-shaped) curve while studying probabilities in coin flips, laying the groundwork for understanding how averages behave.
1908
Student's t-Distribution
William Sealy Gosset, working at the Guinness brewery, developed methods for small samples — showing that sampling distributions change shape when sample sizes are small.
1930s
Central Limit Theorem Formalized
Mathematicians rigorously proved that sample means form a normal distribution regardless of the population's shape, as long as the sample size is large enough.
1990s–Today
Computer Simulation Era
With fast computers and software, students and researchers can now simulate thousands of samples in seconds, making sampling distributions visible and intuitive rather than purely theoretical.

The central question this lesson addresses is: How can we use simulation to build and understand a sampling distribution without needing advanced formulas? By the end, you will be able to run a mental (or actual) simulation, sketch the resulting distribution, and explain what it tells us about real-world samples.

Core Principles & Definitions

Before we run any simulations, let's lock in the key vocabulary. These four ideas are the building blocks for everything that follows.

1

Population vs. Sample

The population is the entire group you care about. A sample is a smaller subset drawn from it at random. We use samples because measuring the whole population is usually impractical.
2

Statistic vs. Parameter

A parameter is a fixed number that describes the population (like the true mean μ). A statistic is a number computed from a sample (like the sample mean x̄). Statistics vary from sample to sample.
3

Sampling Distribution

A sampling distribution is the distribution of a statistic over many repeated random samples of the same size from the same population. It answers: 'How much does this statistic bounce around?'
4

Simulation

A simulation uses random number generators (computers, dice, spinners) to mimic the sampling process many times. Each repetition is called a trial or replicate.
KEY TAKEAWAY
Think of it like a basketball player shooting 100 free throws. Each shot either goes in or doesn't — that's one trial. The player's percentage after one set of 10 shots might be 70%, another set might be 80%. If you recorded the percentage for every set of 10 shots, you'd build a sampling distribution of free-throw percentages. That distribution tells you what percentages are typical and how much variation to expect.

Visual Explanation — Watching the Distribution Form

The diagram below shows the simulation process step by step. On the left, we have a population that is skewed right — most values are low but a few are very high (think household incomes). In the middle, we repeatedly draw random samples of size n = 30 and compute each sample mean. On the right, we stack up those sample means into a histogram — the sampling distribution. Notice how the sampling distribution is much more symmetric and bell-shaped than the original population, even though the population itself was skewed.

Left: a skewed population. Middle: we draw many random samples of size 30 and record each sample mean. Right: the resulting sampling distribution of x̄ is approximately bell-shaped and centered on the true population mean μ.

This visual captures the core surprise of sampling distributions: even when the population is far from normal, the distribution of sample means tends to look bell-shaped as long as the sample size is large enough. This result is so important that it has its own name — the Central Limit Theorem — which we will explore further in Section 8.

Mathematical Framework

While simulation lets us see a sampling distribution, a few formulas help us predict its center and spread without running thousands of trials. These formulas connect the population's parameters to the sampling distribution's behavior.

CENTER OF THE SAMPLING DISTRIBUTION
μ_x̄ = μ
The mean of the sampling distribution of x̄ (denoted μ) equals the population mean μ. In other words, if you average all possible sample means, you get the true population mean. The sample mean is an unbiased estimator of μ.
SPREAD OF THE SAMPLING DISTRIBUTION (STANDARD ERROR)
σ_x̄ = σ / √n
σ is the standard error — the standard deviation of the sampling distribution. σ is the population standard deviation, and n is the sample size. As n increases, the standard error shrinks, meaning sample means cluster more tightly around μ.
SHAPE CONDITION (CENTRAL LIMIT THEOREM)
If n ≥ 30, then x̄ ≈ Normal(μ, σ/√n)
When the sample size n is at least about 30 (a common rule of thumb), the sampling distribution of x̄ is approximately normal regardless of the population's shape. If the population is already normal, then any sample size works.
📐 WHY DOES √n MATTER?
Imagine you're estimating the average temperature by averaging thermometer readings. One reading can be way off. Average 4 readings and the error is cut in half (√4 = 2). Average 100 readings and the error drops to one-tenth (√100 = 10). The square root in the formula shows you get diminishing returns — you need four times as many data points to cut the error in half again.

Step-by-Step Simulation Process

Now let's break down exactly how you would run a simulation, whether by hand with dice, using a calculator's random-number function, or with software like a spreadsheet or an online applet. The diagram below outlines the five-step cycle that every simulation follows.

The five-step simulation cycle. The orange dashed arrow shows the repetition loop: Steps 2–4 are performed hundreds of times before the final histogram is built in Step 5.

A few practical notes: the more replicates you run, the smoother and more accurate your estimated sampling distribution becomes. Running 50 trials gives you a rough sketch; running 1,000 or more gives a reliable picture. Also, every trial must use a fresh random sample — never reuse the same data, or your results will be misleading.

💡 Hands-On Tip
You can simulate right now! Open a spreadsheet and use the RANDBETWEEN function to generate random data. For instance, =RANDBETWEEN(1,6) simulates rolling a die. Create 30 values, compute their average, then press Ctrl+Shift+F9 (or Cmd+Shift+F9) to re-randomize and record a new average. Repeat 50 times to build a mini sampling distribution.

Worked Example — Simulating Mean Wait Times

A school cafeteria claims the average wait time in the lunch line is μ = 4.5 minutes with a standard deviation of σ = 2.0 minutes. A student wants to test this by taking random samples of n = 36 students and computing each sample's mean wait time. She plans to run 500 simulated samples using a random number generator. Let's walk through the simulation and analyze the resulting sampling distribution.

Cafeteria Wait-Time Simulation
1
Step 1 — Define the Population and StatisticThe population consists of all students' wait times, with μ = 4.5 minutes and σ = 2.0 minutes. The statistic of interest is the sample mean x̄. We will draw samples of size n = 36.
Population: μ = 4.5 min, σ = 2.0 min, n = 36
2
Step 2 — Predict the Sampling DistributionBefore simulating, we can predict what the sampling distribution should look like. The center should equal μ = 4.5. The standard error is σ/√n = 2.0/√36 = 2.0/6 = 0.333 minutes. Since n = 36 ≥ 30, the distribution should be approximately normal.
Expected: center = 4.5, standard error ≈ 0.33, shape ≈ normal
3
Step 3 — Run the Simulation (First Few Trials)Using a random number generator set to produce values from a distribution with mean 4.5 and SD 2.0, the student generates 36 random wait times and averages them. Trial 1 gives x̄ = 4.72. Trial 2 gives x̄ = 4.31. Trial 3 gives x̄ = 4.55. She continues this process for all 500 trials, recording each x̄.
500 sample means recorded: 4.72, 4.31, 4.55, …
4
Step 4 — Display and Analyze the HistogramAfter plotting all 500 sample means, the histogram is bell-shaped and centered near 4.5. The student computes the mean of all 500 sample means and gets 4.48, which is very close to 4.5. The standard deviation of the 500 sample means is 0.34, which is close to the predicted 0.33.
Simulated center ≈ 4.48 (predicted 4.50); simulated SE ≈ 0.34 (predicted 0.33)
5
Step 5 — Interpret the ResultsThe simulation confirms our predictions. About 95% of the 500 sample means fell between 4.5 − 2(0.33) = 3.84 and 4.5 + 2(0.33) = 5.16 minutes. This means that if a student took a single sample of 36 classmates and got x̄ = 5.4, that result would be unusually high — it falls outside the range of typical sample means, suggesting the true average might actually be higher than 4.5.
95% of sample means fall roughly between 3.84 and 5.16 minutes

Strengths & Limitations of Simulation

Simulation is an incredibly useful tool, but like any tool, it has both advantages and drawbacks. Understanding these will help you decide when simulation is the best approach and when traditional formulas might be more efficient.

Comparison of simulation strengths and limitations
AspectStrengthsLimitations
AccessibilityNo advanced math needed — you just repeat a sampling process and look at the results.Requires a computer or calculator for large numbers of trials.
FlexibilityWorks for any statistic (mean, median, proportion, range) and any population shape.Results change slightly each time you run it — there is inherent randomness.
AccuracyWith enough trials (1,000+), the estimate closely matches the true sampling distribution.With too few trials (under 100), the picture can be misleading.
InsightMakes abstract concepts visible — you can literally see the bell curve forming.Cannot prove a mathematical theorem; it only provides empirical evidence.
KEY TAKEAWAY
Simulation is like test-driving a car versus reading the specs. The formulas tell you the engine has 200 horsepower (σ/√n = 0.33), but the simulation lets you feel the ride — you watch the histogram grow, see where most values land, and develop intuition for what's typical and what's unusual. Both approaches complement each other.

Connection to the Central Limit Theorem

Everything you observe in a simulation is backed by a deep theoretical result called the Central Limit Theorem (CLT). The CLT says that the sampling distribution of the sample mean will be approximately normal for large n, regardless of the population's shape. Simulation gives you hands-on evidence of this theorem; the theorem gives you mathematical certainty.

Simulation vs. Central Limit Theorem
FeatureSimulation ApproachCentral Limit Theorem (Theoretical)
How you find the shapeRun many trials, plot a histogram, and observe the shape.The theorem guarantees a normal shape for n ≥ 30 (rule of thumb).
How you find the centerAverage all your simulated statistics.The formula states μ_x̄ = μ exactly.
How you find the spreadCompute the standard deviation of your simulated statistics.The formula gives σ_x̄ = σ / √n exactly.
PrecisionApproximate — varies slightly with each run.Exact (given the assumptions are met).
Best used whenExploring new situations, building intuition, or when formulas are unknown.You need quick, precise answers and the conditions are satisfied.

In future courses (like AP Statistics or college statistics), you will use the CLT to solve problems analytically — computing probabilities with z-scores instead of running simulations. But the conceptual understanding you build through simulation right now will make those formal methods much easier to learn. Think of simulation as the training wheels that help you ride confidently before the math becomes the engine.

Practice Problems

PROBLEM 1CONCEPTUAL
Explain in your own words why a sampling distribution is different from the distribution of the original population. What does each one show?
PROBLEM 2BASIC CALCULATION
A population has a mean of μ = 50 and a standard deviation of σ = 10. If you take random samples of size n = 25, what are the mean and standard error of the sampling distribution of x̄?
PROBLEM 3INTERMEDIATE
A student runs 200 simulations with sample size n = 40 from a population with μ = 80 and σ = 12. She finds the mean of her 200 sample means is 79.6 and the standard deviation of her sample means is 1.95. How do these simulated values compare to the theoretical predictions? Is the simulation performing well?
PROBLEM 4APPLIED
A delivery company claims its average delivery time is 30 minutes. You suspect it's longer. You simulate 1,000 samples of n = 50 orders from a distribution with μ = 30 and σ = 8. In your simulation, only 22 out of 1,000 sample means exceeded 32 minutes. If your actual random sample of 50 orders yields x̄ = 32.5 minutes, what can you conclude?
PROBLEM 5CRITICAL THINKING
Suppose you run two separate simulations of the sample mean: one with n = 10 and one with n = 100, both from the same population (μ = 60, σ = 15), each with 500 trials. Describe how the two resulting sampling distributions would compare in terms of center, spread, and shape. Then explain why increasing the sample size from 10 to 100 does not cut the standard error to one-tenth of its original value.

Lesson Summary

A sampling distribution is the distribution of a statistic (such as the sample mean x̄) computed from many repeated random samples of the same size from a population. Using simulation, we can estimate this distribution by repeating a five-step cycle: define the population, draw a random sample, compute the statistic, record it, and display all the results as a histogram. The more trials we run, the smoother and more accurate our estimate becomes.

The sampling distribution of x̄ has three key properties. Its center equals the population mean μ. Its spread is measured by the standard error σ/√n, which shrinks as the sample size grows. Its shape becomes approximately normal for large enough samples (n ≥ 30), a result guaranteed by the Central Limit Theorem. Simulation makes these abstract ideas concrete by letting you watch the bell curve form one sample at a time.

Varsity Tutors • Math 3 • Sampling Distributions via Simulation