← Back to the Introduction to Statistics outline The Course Maker
← Introduction to Statistics outline
Week 8 · Lecture

Lecture: Midterm Review & Exam

Introduction to Statistics Free sample edition

Lecture script · about 15–20 minutes spoken · Week 8

Opening

Here's a question I love to ask at this point in the course. A penguin steps onto a field scale and the reading says 4,000 grams. Is that a heavy penguin? Take a second with it. You probably want to say "it depends," and you'd be right. It depends on what kind of penguin it is, and on what's normal for that kind. By the end of today, you'll be able to say exactly how heavy, in a way that works for penguins, test scores, lab results, and race times alike.

That question shows up everywhere. A nurse reads one patient's lab value against a healthy range. A coach compares one sprinter's time with the rest of the team. A field biologist decides whether a bird is heavy for its species. Each of them is asking where one number stands in its group.

This is Week 8, the middle of the course, and the week of the midterm. So today does two jobs. First, we'll walk back through Weeks 1 to 7 as four questions you can now answer about any set of numbers. Where did the numbers come from? What do they look like? Do two variables move together? And how likely is an outcome, and what should you expect? Then we'll add one new tool, the z-score, which takes the mean and the standard deviation you met in Week 3 and turns them into a measure of standing. Next week, in Week 9, The Normal Distribution, that z-score becomes the starting point for the normal model.

1. Where did the numbers come from?

Let's start where the course started. Before you trust any number, ask who was measured and how. Picture a restaurant sign that says nine out of ten diners loved the food. Maybe it's true for the diners who chose to leave a review. That doesn't make it true for everyone who ate there.

Week 1 gave you the words for this. A population is the whole group a question is about, and a sample is the part of it you actually observe. A parameter describes a population, and a statistic is computed from a sample and estimates the matching parameter.

Our penguin field log is the running example. It records 344 penguins on three islands. Nobody weighed every penguin in the region, so the log is a sample, and the average mass of the measured birds is a statistic. Compare that with the six faces of a fair die. Those six faces are every face there is, so they're a whole population, and their average, 3.5, is a parameter.

There's one more question about where numbers come from: did anyone assign anything? In an observational study, the researcher records what's there. In an experiment, the researcher assigns treatments. The penguin researchers recorded the birds they found and assigned nothing. So the field log is an observational study, and its patterns show association, not cause. Only a randomized experiment supports a cause-and-effect claim.

One trap is worth naming. People often think a huge sample cures a biased method. It doesn't. If a review site only hears from happy customers, thousands more of them still lean happy. A bigger sample shrinks the chance wobble, not the bias.

Pause and try this. Is the average body mass of the measured penguins a parameter or a statistic?

Say your answer out loud before I give mine.

Here's the answer. It's a statistic. It's computed from the 342 measured birds in the sample, and it estimates the average for the whole population of penguins it stands in for.

2. What do the data look like?

Now picture all 342 measured body masses as a histogram, a bar for each range of weights. Most of the birds pile up in the middle. Then a thinner tail of heavy birds stretches out to the right, toward the heaviest bird at 6,300 grams. That shape tells you which summaries to trust.

Week 2 taught you to name a shape by its tail, not by its pile. The long tail here runs to the right, so the shape is right-skewed. Week 3 then showed what skew does to a center. The mean uses every value, so a tail of heavy birds pulls it up. The median only cares which value sits in the middle, so it barely moves.

You can see that in the numbers. The sample mean is 4,201.75 grams, and the median is 4,050 grams. The mean sits above the median, which fits a mildly right-skewed shape. So for a typical penguin, the median is the more resistant center.

For spread, the sample standard deviation is about 801.95 grams. Notice the units. A standard deviation is in grams, the same units as the data, while its square, the variance, would be in squared grams.

Then there's the five-number summary: a minimum of 2,700, a first quartile of 3,550, the median of 4,050, a third quartile of 4,750, and a maximum of 6,300 grams. The interquartile range, the spread of the middle half, is 1,200 grams. One and a half times that is 1,800. Step 1,800 below the first quartile and you reach 1,750 grams. Step 1,800 above the third quartile and you reach 6,550 grams. Those are the fences. The lightest and heaviest birds both sit inside them, so no body mass is flagged as a potential outlier.

Pause and try this. A classmate says most birds sit on the left, so the masses are left-skewed. What's the fix?

Think about which part of the picture names the skew.

Here's the answer. Skew is named by the tail, not the pile. The long tail runs toward the heavy birds on the right, so the shape is right-skewed, and that's why the mean sits above the median.

3. Do two variables move together?

Think about a growing child. Taller children tend to have bigger feet. That's a pattern between two things measured on the same people, and Week 4 taught you to read patterns like that.

For the penguins, the two things are flipper length and body mass. Plot one against the other and the points climb from the lower left to the upper right in a band that follows a straight line. The correlation coefficient, r, puts one number on that. It runs from negative 1 to 1, it has no units, and it measures the direction and strength of a straight-line pattern. Here r is 0.8712. That's close to 1 and positive, so the association is strong, positive, and linear.

Now the doubt that should always follow. Does a long flipper cause a heavy bird? The field log can't say, because it's an observational study. And there's a lurking story inside it. Gentoo penguins average about 5,076 grams, and Adelie penguins average 3,700.66 grams. Every Gentoo in the log lives on Biscoe. So if you compared mass by island, you couldn't tell whether the island or the species was behind the difference. Species is a confounding variable, mixed up with the thing you're studying so you can't pull the two apart.

There's one more trap from Week 4. A small r doesn't mean no relationship at all. It means no straight-line relationship. A perfect U shape can have an r of 0, so always look at the plot as well as the number.

Pause and try this. If r were close to 0 for some pair of variables, what could you conclude?

Careful with that one.

Here's the answer. Only that there's no strong straight-line pattern. A curved pattern could still be there, so you'd look at the scatterplot before saying anything more.

4. How likely is it, and what should you expect?

Suppose a friend tags a penguin at random and tells you only one thing: it lives on Biscoe. Does that change your guess about its species? It should. That's a conditional probability, the chance of one event once you know another has happened.

Out of all 344 penguins, 124 are Gentoo, so the chance a random bird is a Gentoo is about 36.0 percent. But on Biscoe there are 168 birds, and 124 of them are Gentoo. So once you know the bird is on Biscoe, the chance jumps to about 73.8 percent. Knowing the island changed the chance, so species and island are not independent.

The order of the condition matters, too. Every Gentoo lives on Biscoe, so the chance a Gentoo is on Biscoe is 1. That's a completely different number from the chance a Biscoe bird is a Gentoo. Always divide by the group you were given.

Weeks 6 and 7 added a second question: what should you expect in the long run? The expected value of a random variable is its long-run average. For one fair die, it's 3.5, with a standard deviation of about 1.71. No single roll can ever show 3.5. It's what your average settles near over many rolls.

The guessing quiz brings it together. Picture someone guessing on 10 questions, each with four options, so each guess is right with chance 0.25. That's a binomial count: a fixed number of independent tries, two outcomes each, and the same chance every time. Its mean is the number of tries times the chance, which is 2.5 correct answers, with a standard deviation of about 1.37. The chance of getting 5 or more right by pure guessing is 0.0781, about 8 tries in 100. And since the expected count of successes, 2.5, is below 10, a normal curve isn't a good stand-in for this count.

Pause and try this. Someone says the expected value of a die roll is 3.5, so you should expect to roll a 3.5. What's wrong?

No die has a face like that.

Here's the answer. The expected value is a long-run average, not a prediction for one roll. You'll never roll 3.5, but over many rolls your average face settles near it.

5. Measure relative standing with a z-score

Now for the new idea. Think of a swim coach looking at one lap time and asking, "Is that fast for this team?" The coach doesn't care much about the raw seconds. The coach cares where the time sits compared with teammates. Near the team average, or far from it? And far compared with what? The natural yardstick is the team's own standard deviation, the typical distance from the mean.

That's exactly what this tool does. Relative standing is where one value sits compared with the rest of its group: above or below the group's mean, and by how much, measured in the group's own standard deviations. A z-score is the number of standard deviations a value sits above or below the mean of its group. You find it in two moves. Subtract the mean from the value. Then divide by the standard deviation. A positive z-score is above the mean, a negative one is below it, and it has no units.

Let's go back to our 4,000 gram penguin and say it's an Adelie. The Adelie birds in the field log have a mean of 3,700.66 grams and a standard deviation of 458.57 grams. First move: 4,000 minus 3,700.66 is 299.34 grams. Second move: 299.34 divided by 458.57 is about 0.65. So this bird sits about 0.65 standard deviations above the Adelie mean. It's a little heavier than a typical Adelie, and nothing about it is unusual.

The same two moves work against a whole population. On a fair die, the mean face is 3.5 and the standard deviation is about 1.71. A roll of 6 sits 2.5 above the mean, and that's about 1.46 standard deviations. Even the top face of a die is less than 2 standard deviations out.

Here's the trap. People often say "z equals 0.65 grams." But the grams cancel when you divide grams by grams. A z-score is a pure count of standard deviations. If you're working in a spreadsheet, the function called STANDARDIZE does both moves for you: you give it the value, the mean, and the standard deviation.

Pause and try this. A z-score comes out negative. What does the minus sign tell you?

One word answers most of it.

Here's the answer. Below. A negative z-score means the value sits below its group's mean, and the size of the number says how many standard deviations below.

6. Compare across groups with z-scores

Now let's hand the same 4,000 grams to a different bird. Gentoo penguins are a larger species. In the field log, the Gentoo birds have a mean of 5,076.02 grams and a standard deviation of 504.12 grams. Is a 4,000 gram Gentoo heavy too?

Same two moves. First: 4,000 minus 5,076.02 is negative 1,076.02 grams. Second: divide by 504.12, and you get about negative 2.13. This bird sits about 2.13 standard deviations below the Gentoo mean. It's unusually light for its species.

Put the two birds side by side. Both weigh exactly 4,000 grams. Against the Adelie, the z-score is about 0.65: a little heavy, nothing special. Against the Gentoo, it's about negative 2.13: far lighter than typical. Same scale reading, two very different stories. What changed is the reference group, the group whose mean and standard deviation the z-score measures a value against.

This is why z-scores are so handy. Because they have no units, they let you compare positions across groups with different centers and spreads. Think of a friend who scored the same on two different exams. Once you know each exam's mean and standard deviation, you can finally say which score stands out more.

One caution, and it matters. A big z-score is a reason to look closer, not a reason to delete. The light Gentoo is a real bird. Remember February in Week 3. It got flagged, and it stayed in the data, because it's a real month. And a z-score measures distance, not rarity. Saying exactly how rare a value is needs a model of the group's shape, and that's next week's job.

Pause and try this. Which bird stands out more from its own species, the 4,000 gram Adelie or the 4,000 gram Gentoo?

Compare the sizes, not the signs.

Here's the answer. The Gentoo. Its z-score, about negative 2.13, is much farther from 0 than the Adelie's 0.65, so it sits much farther from what's typical for its group.

Closing

Let's pull it together in the order we took it. First, ask where the numbers came from: a sample or a population, and an observational study or an experiment. Second, name the shape by its tail and pick the center and spread that fit it. Third, read a correlation as a straight-line pattern, and remember that an observational study shows association, not cause. Fourth, divide a conditional probability by the group you were given, and read an expected value as a long-run average. Fifth, a z-score subtracts the mean and divides by the standard deviation, so it counts standard deviations from the mean. And sixth, the same value can tell two different stories in two different reference groups.

Next in this module come the slide deck, the Readings & Resources page, the practice set, and the discussion, and then the midterm, with its study guide and practice exam to help you get ready. Next week, in Week 9, The Normal Distribution, the normal model takes the z-score you learned today and turns it into the share of a group that sits below a value.


Built with The Course Maker · samples.thecoursemaker.com