Sampling Distributions
Data Matters is an introduction to statistics that I wrote 25 years ago. In 2004, Michael Kahn reviewed Data Matters and reported that the textbook included “sound but nontraditional discussions.” I am now wrapping up work on an update. The last steps I’m taking is providing here some quick summaries of the ways Data Matters presents statistical ideas better than any other intro textbook. These are the kinds of “sound but nontraditional discussions” that Michael Kahn wrote about.
This blog post is about the first of the nontraditional discussions.
The only people I know will read this article are my wife and a couple Redditors. For my audience of three, I will try to provide enough explanation, so this makes sense. Unlike Data Matters, I will not explain why you would want to know what “sampling distributions” are. For that, pick up a copy of Data Matters itself (available here). (Sorry!)
A sampling distribution is a set of possible outcomes that you could find when you collect data, along with the probabilities that you will see each of those outcomes. For example, if you collect data by flipping a coin, there are two possible outcomes (heads and tails) and each outcome has a 50% chance of appearing. For coin flips, your sampling distribution is: heads, 50%; tails, 50%.
(This is painful for me. Why do you care about flipping a coin? The me who wrote Data Matters 25 years ago cries out, “STOP! You have to explain why they should care. Tell them about how this is the foundation of the research that tells us that climate change will create widespread famines in Africa in the 2030's.” I reply, “I don’t have space. For why, they can read the book.” And the me who wrote Data Matters replies, “FINE! I’ll just be over here in the corner, puking.”)
So bear with me while I write to you about flipping coins, even though I didn’t explain why you would care.
You can’t see the sampling distribution of coin flip outcomes. I know it’s there by looking at a coin and thinking about it, but it is not visible. I can draw a picture of it:
In the picture above, rather than reporting probabilities of heads or tails, I’m showing the probabilities of the percent heads of the coins on each flip. With a single flip, you get either 100% heads or 0% heads, so there are two bars. Each outcome has a 50% chance of happening. That’s why the bars are the same height. This is a picture of a sampling distribution, a thing we can never actually see.
What we can see is what happens when the sampling distribution generates events in the real world.
I created a YouTube video to show you sampling distributions and how they are related to real-world events. To understand what follows, watch the first minute of the video.
Here is a copy of the sheet I started with in the video. (I forgot to label my axes.)
In the video, I have five coins. I shake those five coins in my hands and throw them down 50 times. Each time, I record what percent of the coins came up heads.
When someone runs a survey or an experiment, they are collecting a sample of data. In the video, I collected 50 samples. Each sample had 5 observations. It is as if I ran 50 surveys and recorded for each survey what percent came up heads.
For the coin tosses in the video, the sampling distribution was the collection of possible percent heads (0, 20%, 40%, 60%, 80%, & 90%) and the probabilities for each of those percent heads.
We discover sampling distributions by thinking about things. For this video, I figured out the sampling distribution before I started tossing the handfuls of coins. Here is how:
The width of a sampling distribution is indicated with something called a “standard error”. Percents are special partly because, if we know the probability and we know the sample size, we can figure out the standard error and that will tell us how wide the sampling distribution is.
Percents have sampling distributions that are roughly normally distributed around the probability generating the event. (In this case, the event is a heads, and the probability is 50%.) “Normally distributed” means that 34% of the chances for the outcomes are for outcomes between the middle of the sampling distribution and 1 standard error down. Another 13.5% of the chances are for outcomes between 1 standard error down and 2 standard errors down. The table below shows the full range of a normally distributed sampling distribution:
The Standard Error is abbreviated as “se” and the se for percents is calculated with this equation (from Data Matters):
se = SQRT(p(1-p)/n)
At least that’s how you would write that equation in Excel. Here’s how it would be written in math:
Where p is the probability, and n is the number of observations. In the coin tosses of the video, the probability is 50% and n = 5, so:
(Inside Data Matters, calculations like this are described in more detail.)
Get Nick Maxwell’s stories in your inbox
Join Medium for free to get updates from this writer.
That 0.22 lets us fill in the sampling distribution:
That sampling distribution is what was plotted with the black lines:
When the video started, this graphic had only one thing on it: a picture of the sampling distribution. I then filled in a second thing, a histogram of what actually happened (with orange bars).
If you haven’t watched the whole video yet, now is a good time to do so.
Here’s how the chart looks at the end:
A histogram (like this orange histogram) is created by recording measurements. Each measurement gets its own block, and the blocks combine to create bars. In the video, each measurement comes from a sample of five coins. The orange marks are the blocks that combine to create the bars of the histogram.
This histogram has an axis on the right that shows how often each outcome appeared. A histogram that shows how often things happened is called a “frequency histogram”
When contrasting a frequency histogram with a sampling distribution, we can highlight that the histogram came from our experience by calling it an “empirical frequency histogram.”
An empirical frequency histogram doesn’t exactly match the probabilities of the sampling distribution that created the data. In the video, the sampling distribution said we would have 2% (2.5% rounded) 100% heads and 2% zero percent heads. The empirical frequency histogram shows that we got 4% in each of those. The sampling distribution set a probability of 13.5% for 20% and for 80%. 8% of my tosses had 20% heads and 22% of my tosses had 80% heads.
That’s how things work: frequency histograms don’t perfectly match sampling distributions. For example, the chances of a heads is 50%, but if you flipped coins ten times, you won’t necessarily get 5 heads and 5 tails.
The probabilities in a sampling distribution are not what happened and what happened is not the same as the probabilities. A sampling distribution is not a frequency histogram. A frequency histogram is not a sampling distribution.
That’s important: what happens is the empirical frequencies. The probabilities do not happen. The probabilities do make particular frequencies more likely to occur, and the ones that are most likely to occur are indicated by the sampling distribution on the paper at the start of the video.
Why is it called a “standard error”?
Good question! But this blog post is too long already. Maybe I’ll get to that later.
Now your part
Get a handful of coins — more than 5. Calculate the standard error. Draw a sampling distribution. Figure out what it’s saying are likely counts of each possible percentage.
For any of this, if you don’t see how to do it, ask about it in r/DataMatters.
Then shake up and toss your coins at least 20 times and create a frequency histogram over your sampling distribution. Note that there seems to be an almost spooky tendency for the percent heads to match what you drew before you started tossing coins.
One Last Graphic
Observations appear in the frequency histogram from the sampling distribution (the set of possible outcomes and their probabilities).
Join In the Conversation
For a Reddit-style conversation about this, join in at r/DataMatters.








