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.

Math 3 emblem with sigma notation, a function, and a line graph.
Inside this lesson 10 sections 5 questions 7 figures

SECTION 1

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.

SECTION 2

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.

SECTION 3

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.

Population (Skewed)Values →Repeated Samplingn = 30 each timeSample 1 → x̄₁ = 42.3Sample 2 → x̄₂ = 39.7Sample 3 → x̄₃ = 44.1⋮Sample 500 → x̄₅₀₀ = 41.2Sampling Distributionx̄ values →μ = true meanKey ObservationsThe population can be any shape (here, skewed right).The sampling distribution of x̄ is approximately normal (bell-shaped).The center of the sampling distribution equals the population mean μ.The spread of the sampling distribution is narrower than the population's spread.More trials = smoother, more accurate sampling distribution.
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.

SECTION 4

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ˉ=μμ_x̄ = μ

The mean of the sampling distribution of x̄ (denoted μx̄) 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σ_x̄ = σ / √n

σx̄ 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)

Ifn≥30,thenxˉ≈Normal(μ,σ/√n)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.

SECTION 5

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.

Five-Step Simulation CycleStep 1Define the population & parameterStep 2Draw a random sample of size nStep 3Compute the statistic (e.g., x̄)Step 4Record the statistic & repeat many timesStep 5Display the results as a histogramRepeat 500+ timesExamplePopulation: GPA of allseniors (μ = 3.1, σ = 0.6)Sample size: n = 25Statistic: sample mean x̄Replicates: 500Expected results:Center ≈ 3.1SE = 0.6/√25 = 0.12Most x̄ values fallbetween 2.86 and 3.34(within ± 2 standard errors)The loop between Steps 2–4 is the heart of any simulation.
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.

SECTION 6

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. 1

    Step 1 — Define the Population and Statistic

    The 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. 2

    Step 2 — Predict the Sampling Distribution

    Before 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. 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. 4

    Step 4 — Display and Analyze the Histogram

    After 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. 5

    Step 5 — Interpret the Results

    The 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

SECTION 7

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.

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.

Comparison of simulation strengths and limitations

✦

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.

SECTION 8

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.

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.

Simulation vs. Central Limit Theorem

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.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

Explain in your own words why a sampling distribution is different from the distribution of the original population. What does each one show?
Show answer
The population distribution shows the spread of individual data values (for example, each student's height). The sampling distribution shows the spread of a statistic (like the sample mean x̄) computed from many different random samples. While individual values can vary a lot, sample means tend to cluster more tightly around the population mean. The sampling distribution is almost always narrower than the population distribution and, for large samples, tends to be approximately normal — even when the population is not.

Question 2: BASIC 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̄?
Show answer
The mean of the sampling distribution is μ_x̄ = μ = 50. The standard error is σ_x̄ = σ / √n = 10 / √25 = 10 / 5 = 2. So the sampling distribution of x̄ has a center of 50 and a standard error of 2. This means most sample means will fall within about 2 standard errors of 50, roughly between 46 and 54.

Question 3: INTERMEDIATE

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?
Show answer
The theoretical center is μ = 80 and the simulated center is 79.6, which is very close (a difference of only 0.4). The theoretical standard error is σ / √n = 12 / √40 ≈ 12 / 6.32 ≈ 1.90. The simulated standard deviation of the sample means is 1.95, which is close to 1.90. Both the center and spread of the simulation match the predictions well, so the simulation is performing as expected. Small discrepancies like these are normal because simulation involves randomness; running more trials (e.g., 1,000) would likely bring the simulated values even closer to the theoretical ones.

Question 4: APPLIED

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?
Show answer
The simulation tells us that if the true mean really is 30 minutes, then getting a sample mean of 32 or higher is quite rare — only 22 out of 1,000 simulated samples (2.2%) produced means that high. Your actual sample mean of 32.5 is even more extreme. Since this result would happen less than about 2.2% of the time by chance alone, this provides strong evidence that the true average delivery time is likely longer than 30 minutes. In formal statistics, this type of reasoning is the basis of hypothesis testing.

Question 5: CRITICAL 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.
Show answer
Both sampling distributions will be centered near μ = 60 because the sample mean is an unbiased estimator. However, the spread will differ: for n = 10, the standard error is 15/√10 ≈ 4.74, and for n = 100, it is 15/√100 = 1.5. The n = 100 distribution will be much narrower. In terms of shape, the n = 100 distribution will look very close to normal; the n = 10 distribution may still show slight irregularities, especially if the original population is not symmetric. The standard error decreases by the square root of n, not by n itself. Going from n = 10 to n = 100 is a tenfold increase in sample size, but the standard error only decreases by a factor of √10 ≈ 3.16. This square-root relationship means you need to quadruple your sample size to cut the standard error in half — a fundamental principle of diminishing returns in statistics.

SUMMARY

Lesson Summary

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