We rarely have access to an entire population. Instead, we take a sample and use it to learn about the population. The quality of that sample matters.
Imagine that we want to know the average height of everyone in a large population.
Measuring every person would be expensive and time-consuming. Instead, we can select a smaller group — a sample.
If the sample is selected properly, it can give us useful information about the much larger population.
Every member of the population should have a known opportunity to be selected. This helps prevent the sample from systematically favouring one type of observation over another.
A population can contain thousands, millions or even billions of observations.
A sample is simply a smaller collection selected from that population.
The complete group we are interested in.
Examples include every voter, every customer, every transaction or every investment return.
A smaller group selected from the population.
We use the sample to estimate characteristics of the larger population.
Let's make this concrete.
We will create a population of 1,000 observations with different values and randomly select a sample from it.
Every time you take a new sample, the observations will be different — and so will the sample mean.
The population has not changed. Only the sample has. If the sample mean changes, that is sampling variability.
Suppose we want to estimate the average value of a population.
A random sample gives observations from across the population. But imagine that instead we deliberately select observations from only one part of the population.
The resulting estimate could be systematically wrong.
Observations are selected randomly from the entire population.
Observations are deliberately selected from one end of the population.
A sample does not need to perfectly represent every feature of the population. Random selection simply gives us a defensible mechanism for making the sample representative on average.
One random sample gives us one estimate. But what happens if we repeatedly take new random samples from exactly the same population?
The sample means will vary.
This is not a mistake. It is a fundamental feature of sampling.
Each point in the distribution represents the mean of one random sample. The distribution tells us how our estimate would behave if we repeated the sampling process many times.
Larger samples generally give us more information about the population.
More importantly, the means of larger samples tend to fluctuate less from sample to sample.
This is one of the most important ideas in statistics. Increasing sample size reduces sampling variability.
We can now combine the ideas.
Start with the same population, repeatedly take random samples, calculate the mean of every sample, and then plot those means.
With enough samples, the shape of this distribution becomes visible.
Under suitable conditions, the distribution of sample means becomes approximately Normal as the sample size becomes sufficiently large.
We are not changing the original population. We are changing the number of times we sample it.
Random sampling is not just a mathematical exercise. It is used whenever we want to learn about a large population without observing every member of it.
A sample of voters can be used to estimate the views of a much larger population.
Manufacturers can inspect a sample of products rather than testing every item.
Researchers often study a sample of participants to learn about a wider population.
Analysts can use samples of historical returns to learn about the behaviour of an investment.
Random sampling reduces the risk of systematic bias, but not every sample is random.
Consider an online survey asking: "Should the government increase funding for cycling?"
If the survey is promoted only on a cycling website, the people who choose to respond are unlikely to represent the wider population.
Ten thousand badly selected observations can give a worse estimate than a much smaller genuinely random sample.
We have now built an important chain of ideas.
We can repeat the sampling process thousands of times and study the resulting distribution.
But there is another powerful possibility.
Instead of sampling from a population of people, transactions or measurements, we can sample from a model of possible future outcomes.
We repeatedly generate random outcomes from a model, build thousands of possible scenarios, and then examine the distribution of the results.
Random sampling gives us the machinery we need.
We know how to generate random observations. We know how to take samples. We know how repeated samples create distributions.
Now we can use the same principle to simulate possible futures.
This is the foundation of Monte Carlo simulation.