Lecture: Foundations & Types of Data
Lecture script · about 15–20 minutes spoken · Week 1
Opening
Think about the last time you checked a star rating before buying something. Or the last time a news story told you what most people think about some issue. In both cases, somebody gathered data from some people and then made a claim about a lot more people. A nurse reading a patient survey does the same thing. So does a business owner reading online reviews, and so does a field biologist counting penguins. Before any of them trusts the numbers, they need to know who was measured and how.
That's what this first lecture is about. This is the foundation of the course, so you don't need anything from before. We'll take five ideas in order. First, what statistics actually is. Second, the difference between the whole group a question is about and the part you measure. Third, the different kinds of data, and why the kind decides what you can do with it. Fourth, the ways people choose who gets measured, including two ways that go wrong. And fifth, the difference between watching and experimenting, and why only one of them can show a cause.
Most of our examples come from one real data set. Between 2007 and 2009, field researchers in Antarctica's Palmer Archipelago logged 344 penguins on three islands. For each bird they wrote down its species, its island, its sex, the year, and four body measurements. You'll meet these birds all term. Next week, in Week 2, we'll start drawing them. Today, we figure out what kind of data we're holding.
1. Statistics: from a question to an honest conclusion
Suppose a friend tells you that penguins weigh about 4 kilograms. You might nod along. But a careful listener asks a few things first. Which penguins? How many were weighed? Would a different group of penguins give the same answer?
Those follow-up questions are the heart of the subject. Every statistical claim makes four moves. It starts with a question. It collects data to answer that question. It reaches a conclusion. And it says something honest about the uncertainty in between, because a different set of data would have given a somewhat different answer. Put that together and you have a definition. Statistics is the practice of answering a question with data: collecting the data, describing them, and reaching a conclusion that says how uncertain it is.
Let's run the four moves on the penguins. The question is how heavy the penguins of the Palmer Archipelago are. The data are the field log. Two birds have no body measurements, so 342 penguins have a recorded body mass. The conclusion is that those 342 penguins average 4,201.75 grams, a little over 4 kilograms. And the uncertainty? If the researchers had found a different group of birds on the same islands, the average would have come out a bit different. So 4,201.75 grams is our best answer from this data. It isn't the final word on every penguin alive.
Here's why that last move matters. A precise number feels like proof. An average of 4,201.75 grams, down to two decimal places, sounds exact. But that number describes the birds that were weighed. Whether it describes all penguins depends on how those birds were found. A precise number can still answer the wrong question. That's the thread for the whole lecture: how the data were gathered comes first, and the result comes second.
Pause and try this. In the claim "the 342 measured penguins average 4,201.75 grams," which of the four moves is the 4,201.75? And what would an honest statement of the uncertainty add?
Take a moment before you go on.
Here's the answer. The 4,201.75 grams is the conclusion. The honest uncertainty statement adds that a different group of birds would give a somewhat different average, so this number comes from one sample of penguins, not from all of them.
2. Population and sample: tell the whole from the part
Picture a café owner who wants to know what her customers think of a new menu. She can't ask every person who has ever walked in. So she asks some of them and hopes they speak for the rest. That everyday move, asking some to learn about all, has two names you'll use all term.
A population is the entire group of individuals that a question is about. A sample is the part of a population that is actually observed or measured. The individuals don't have to be people. They can be penguins, months, patients, or receipts. And here's the key point: the question sets the population, not the data you happen to have. If the question is about penguins in the Palmer Archipelago, the population is every penguin there. The 344 birds in the field log are a sample of it. We write the sample's size with a small n, so n is 344 here.
Numbers that summarize these groups get names too. A parameter is a number that describes a whole population. A statistic is a number computed from a sample, and it estimates the matching parameter. So the 4,201.75-gram average of the measured penguins is a statistic. Nobody knows the matching parameter, the average over every penguin in the archipelago. That's exactly why we take samples.
Now compare something you can see completely. Think of a fair six-sided die. Its faces are 1, 2, 3, 4, 5, and 6. That's a whole population you can list. We write a population's size with a capital N, so N is 6 here. The average of the six faces is 3.5. Because 3.5 describes every face there is, it's a parameter. You didn't estimate it. You know it.
Here's a memory trick that saves a lot of mix-ups. Parameter starts with P, and so does population. Statistic starts with S, and so does sample. P goes with P. S goes with S.
Pause and try this. Is the 3.5 average of the die's faces a parameter or a statistic? And is the 4,201.75-gram average of the measured penguins a parameter or a statistic?
Match each number to the group it describes.
Here's the answer. The 3.5 is a parameter, because it describes the whole population of six faces. The 4,201.75 grams is a statistic, because it was computed from a sample of penguins and only estimates the average for all of them.
3. Types of data: sort every variable before you summarize it
Look at a coffee order. It has a size, a drink name, a price, and a time. Some of those are labels, and some are amounts. You'd never add two drink names together, but you might add two prices. That difference is our next big idea.
A variable is a characteristic recorded for each individual that can differ from one individual to the next. A categorical variable places each individual into a group, like species or island. A quantitative variable has values that are numbers counting or measuring an amount, so arithmetic on them makes sense. Quantitative variables split once more. A discrete variable has values you can list with gaps between them, like a count or a calendar year. A continuous variable can land anywhere in a range, limited only by how precisely you measure, like a mass in grams.
There's one more layer, the level of measurement. It's the scale a variable is recorded on, and there are four. Nominal means labels with no order, like species. Ordinal means an order with uneven gaps, like coffee sizes: small, medium, large. Interval means equal gaps but no true zero, like a calendar year. Ratio means equal gaps and a true zero that means none of the thing, like body mass. Here's why the levels matter. The most common category works at every level. The middle value needs at least ordinal data. And an average only makes sense for interval or ratio data.
So let's sort the field log. Species, island, and sex are labels with no order, so they're categorical and nominal. Year is a number you can subtract, so it's quantitative. It moves in whole steps, so it's discrete, and year zero isn't "no time at all," so it's interval. The four body measurements, bill length, bill depth, flipper length, and body mass, could land anywhere in a range, and zero means none. So they're continuous, at the ratio level.
Here's the trap that catches people. Suppose someone codes the species as 1, 2, and 3 and then reports an "average species." The codes are numbers, but they're labels in disguise. Species is still nominal, and that average means nothing. A jersey number works the same way. So ask what the value measures, not whether it's written with digits.
Pause and try this. Classify two of the penguin variables: year, and flipper length. For each, say categorical or quantitative, discrete or continuous, and give its level of measurement.
Work through one variable at a time.
Here's the answer. Year is quantitative, discrete, and interval: equal gaps between years, but no true zero. Flipper length is quantitative, continuous, and ratio, because a zero length would mean no flipper at all.
4. Sampling methods: choose who gets measured, and watch for bias
Think about tasting a pot of soup. You stir it, taste one spoonful, and trust that spoonful to speak for the whole pot. The stirring is what earns your trust. Without it, you might taste only the salty layer on top. Choosing a sample works the same way. How you choose matters more than how much you take.
Here are four ways to choose with chance built in. In a simple random sample, every possible group of the same size is equally likely to be picked. In a stratified sample, you split the population into groups that share a trait and take a random sample from every group. In a cluster sample, you split the population into groups, pick some whole groups at random, and measure everyone in them. In a systematic sample, you start at a random spot on a list and take every k-th individual after it.
Let's try them on the penguins. Imagine a follow-up team that can revisit only some of the 344 logged birds. For that question, the 344 birds are the population. A systematic plan that wants 43 birds divides 344 by 43 to get a step of 8. The team picks a random start from 1 to 8, then takes every 8th bird on the list. A stratified plan that wants 86 birds takes one in every 4 from each species. That's 38 Adelie, 17 Chinstrap, and 31 Gentoo, which adds back up to 86. Now a cluster plan treats each island as a group. Biscoe has 168 logged birds, Dream has 124, and Torgersen has 52. If chance picks Torgersen alone, the team gets 52 penguins, and every one of them is Adelie. Two whole species vanish. A cluster plan works best when each cluster looks like a small copy of the population, and these islands don't.
Two other methods skip chance, and both build in bias. That's a method's tendency to miss the truth in the same direction every time. A convenience sample takes whoever is easiest to reach, like a dining survey handed out only at the late-night snack counter. A voluntary-response sample takes whoever chooses to answer, like online product reviews, where people who loved or hated the product are the likeliest to write.
And here's the big misconception of the week. People often think a bigger sample fixes a biased method. Picture that store with thousands of reviews. Every extra review comes through the same door: people who chose to write. A bigger sample makes the result less jumpy from sample to sample. It doesn't change the direction of the lean. The cure is a better method, not more of the same one.
Pause and try this. In the stratified plan for 86 penguins, how many Gentoo birds does the team revisit? And why is that plan safer than visiting one randomly chosen island?
Think about what the islands look like.
Here's the answer. The team revisits 31 Gentoo birds. The stratified plan guarantees every species appears in its true share, while one island can leave out whole species, as Torgersen's 52 all-Adelie birds show.
5. Studies and experiments: know what can prove a cause
Imagine a clinic notices that patients who take a daily walk report better sleep. Should everyone start walking for sleep? Maybe. But the walkers chose to walk. They might also eat differently, work different hours, or worry less. Any of those could explain the better sleep.
That story leads to the last distinction of the week. In an observational study, researchers record what they find without assigning any treatment. In an experiment, researchers deliberately assign treatments and then measure the response. And in a randomized experiment, chance decides who gets which treatment. That one is special. When a coin flip, not the patient, decides who walks, the two groups end up alike in every other way, on average. Then a difference in sleep can be traced back to the walking. Only a randomized experiment supports a cause-and-effect conclusion.
So what kind of study is the penguin field log? Ask one question: did the researchers assign anything? They didn't. They recorded the birds they found, where they found them. That makes it an observational study. Now look at one pattern in it. All 124 Gentoo penguins in the log were recorded on Biscoe. Does living on Biscoe turn a penguin into a Gentoo? No. Species and island travel together in this data, and that's an association, not a cause. You couldn't run an experiment here anyway. No researcher can assign a penguin to a species.
Here's a case where an experiment is possible. A campus learning center wants to know if a new study app raises quiz scores. If students choose the app, the ones who choose it may already study more. But if a coin flip decides which volunteers get the app, the groups start out alike, and a difference in scores points to the app.
One honest caveat. Experiments aren't always possible or ethical. You can't assign people to smoke, and you can't assign penguins to islands. Then careful observational studies are the best evidence we have, and honest writers say "is associated with," not "causes."
Pause and try this. All 124 Gentoo penguins were logged on Biscoe. What kind of study produced that pattern, and can it show that the island causes the species?
Ask yourself whether anyone assigned anything.
Here's the answer. It came from an observational study, because the researchers recorded the birds where they found them and assigned nothing. So it shows an association between island and species, not a cause.
Closing
Let's pull the week together, in the order we built it. Statistics answers a question with data, reaches a conclusion, and stays honest about the uncertainty. The population is the whole group a question is about, and the sample is the part you measure; a parameter describes the population, and a statistic comes from the sample. Every variable is categorical or quantitative, and the level of measurement, from nominal up to ratio, decides which summaries make sense. Random methods choose a sample with chance, while convenience and voluntary-response samples lean, and a bigger sample doesn't fix the lean. Finally, watching shows association, and only a randomized experiment shows cause.
Next in this module, the Readings & Resources page offers optional extra reading, and then the lecture tutorial and the practice set let you sort variables and sampling plans yourself before the quiz. Next week, in Week 2, Summarizing Data with Tables & Graphs, the type of each variable you sorted today decides which table or picture it gets.
Built with The Course Maker · samples.thecoursemaker.com