Lecture: Summarizing Data with Tables & Graphs
Lecture script · about 15–20 minutes spoken · Week 2
Opening
Think about the screen-time report your phone sends you once a week. It doesn't hand you a list of every minute you spent on every app. It gives you a short summary and a picture: one bar per day, and a few totals by category. You glance at it for two seconds and you know your week. That's the whole idea of this lecture. A long list of values is hard to take in. A good table and a good graph let you take it in at a glance.
People do this at work every day. A nurse scans a chart of patient wait times, and a small-business owner reads a bar chart of sales. Both need to read the picture correctly and notice when it's drawn to mislead.
In Week 1, you learned where data come from and what kind of data you're holding. This week that pays off, because the type of a variable decides its picture. Groups get bars and slices. Amounts get dots, stems, and bins. Next week, in Week 3, Numerical Summaries: Center & Spread, we'll put numbers on the middle and the spread. Today is about seeing the data first.
We'll take five ideas in order: counting groups, picturing amounts, describing shape, reading a table that counts two things at once, and catching a graph that lies. Most of our examples come from the 344 penguins you met last week. We'll also borrow two things you already own: a calendar and a pair of dice.
1. Tables and charts for categories: count, share, and picture
Imagine you volunteer at a food bank after a big donation drive. The tables are covered with cans, boxes of pasta, and bags of rice. Someone asks what came in. You wouldn't read every label aloud. You'd make piles, one per kind of item, and count each pile. That's all a frequency table is. A frequency is the number of individuals that fall in one category or one bin of a variable. A frequency table is a table that lists each category or bin of a variable beside its frequency, the count of individuals in it.
Now try the penguins. The field log holds 152 Adelie penguins, 68 Chinstrap penguins, and 124 Gentoo penguins. Add those three counts and you get 344, which is every bird in the log. If the counts don't add back to the total, a bird was missed or counted twice.
A bare count can fool you, because it hides the question "out of how many?" So we turn each count into a share. A relative frequency is a frequency divided by the total number of individuals, written as a proportion or a percentage, so it shows each category's share of the whole. For the penguins, Adelie is about 44.2 percent of the log, Chinstrap about 19.8 percent, and Gentoo about 36.0 percent. Each of those is rounded to one decimal, and together they make 100.0 percent.
Next we draw it. A bar chart is a graph of a categorical variable that draws one separate bar per category, with each bar's height showing that category's frequency or relative frequency. Picture three bars on a shared floor. The Adelie bar stands tallest, the Gentoo bar is next, and the Chinstrap bar is shortest. There are gaps between the bars, because the categories are separate groups. You could line them up in any order.
A pie chart is a circle cut into slices, one per category, where each slice's share of the circle equals that category's relative frequency; it fits only when the categories together make up one whole. Each penguin has exactly one species, so a pie is honest here. But a survey that asks which streaming services you use, check all that apply, lets one person check several boxes. Its shares can add up to far more than 100 percent, so a pie chart of them makes no sense.
So here's the rule of thumb. Bars compare. Pies split one whole.
Pause and try this. On a pie chart of the three penguin species, which species gets the smallest slice, and about how much of the circle does it fill?
Think about it for a few seconds before you read on.
Here's the answer. Chinstrap gets the smallest slice, at about 19.8 percent, which is roughly a fifth of the circle. It has the smallest count, 68 birds out of 344, so it has the smallest share.
2. Graphs for numbers: dot plots, stem plots, and histograms
Species is a label. Body mass is an amount, and amounts live on a number line, where a heavier bird sits further to the right. So the pictures for amounts start from a number line. The pattern you get, which values occur and how often each one occurs, is called the distribution of the variable.
Start small, with a calendar. The 12 months of a common year have 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, and 31 days. A dot plot is a graph of a quantitative variable that places one dot above a number line for each individual, stacking the dots that share a value. For the months, that's one dot above 28, a stack of four dots above 30, and a stack of seven dots above 31. Then 1 plus 4 plus 7 makes 12, one dot per month. Nothing sits above 29, because no month in a common year has 29 days.
A stem plot is a display of a quantitative variable that splits each value into a stem, its leading digits, and a leaf, its last digit, then lists the leaves in order beside their stems. For the months, the stems are the tens digits, 2 and 3. Beside stem 2 sits a single leaf, an 8, which is February's 28. Beside stem 3 sit four zeros and seven ones. A stem plot is like a dot plot turned on its side, except that every original value can still be read off it.
Dots and leaves work well for 12 values. They don't work for 342 penguin body masses. A dot per bird would be a crowded smear. So we group the values. A histogram is a graph of a quantitative variable that splits the number line into equal-width bins and draws touching bars whose heights show how many values fall in each bin. A bin is one of those equal-width intervals, and every value is counted in exactly one bin.
The lightest penguin weighs 2,700 grams and the heaviest weighs 6,300 grams. Suppose you choose bins 500 grams wide, starting at 2,500 grams. To reach past 6,300, the bins run up to 6,500 grams, and that makes 8 bins. The lightest bird lands in the first bin and the heaviest in the last. Software counts the birds in each bin and draws the bars. Your job is to pick a sensible width and then read the shape.
A histogram looks like a bar chart with the gaps closed, but it isn't one. Its bars stand for neighboring stretches of one number line, so they stay in order, they touch, and they share one width.
Pause and try this. You have the body masses of 342 penguins. Should you draw a dot plot, a stem plot, or a histogram, and why?
Give it a moment.
Here's the answer. Draw a histogram. With 342 values, dots and leaves get too crowded to read, and what matters is the overall shape, which bins show well.
3. Shape: read the tail, the peaks, and the stragglers
Think of a playground slide seen from the side: a tall ladder at one end and a long, gentle slope at the other. Lots of distributions look like that, with a tall pile of values on one side and a long, thinning stretch on the other. That thinning stretch has a name. A tail is the thin end of a distribution, where the values are few and spread out, on the far side from the main pile of values.
Shape comes down to three questions. Is it balanced or lopsided? How many peaks does it have? Does anything sit far from the rest?
Start with balance. Symmetric describes a distribution whose left and right sides are close to mirror images of each other around its center. Roll two dice and add the faces. There are 36 equally likely ways the dice can land. The sum 7 can happen in 6 of those ways, more than any other sum. As you move out from 7, the counts fall off the same way on both sides, down to a single way to roll a 2 and a single way to roll a 12. That's symmetric.
Now lopsided. Right-skewed describes a distribution whose long tail stretches to the right, toward the larger values. Left-skewed describes a distribution whose long tail stretches to the left, toward the smaller values. Here's the rule to carry with you: name the skew by the tail, not by the pile.
Go back to the months. The pile is the tall stack at 31. The lone 28 sits off by itself on the left. The tail points left, so the month lengths are left-skewed.
Now the penguins. Their histogram has its main pile in the middle bins and a long, thinning tail of heavy birds off to the right. Two numbers back that up. The middle value of the 342 masses, with half the birds lighter and half heavier, is 4,050 grams. The average is 4,201.75 grams, which sits above the middle. A long tail pulls the average toward it. So an average above the middle points to a tail on the right, and body mass is mildly right-skewed.
Next, peaks. Unimodal describes a distribution with one clear peak. The dice sums are unimodal, with their peak at 7. Bimodal describes a distribution with two clear peaks, which often signals that two different groups have been mixed together. Picture the times customers walk into a café near a campus. If a crowd comes before morning classes and another comes at lunch, the arrival times have two humps. Two peaks hint that two groups are hiding in one picture.
Last, stragglers. An outlier is a value that falls far from the overall pattern of the rest of the data. Is February an outlier? It sits alone, but it's only 2 days below the nearest value, 30. Without a stated rule, calling it an outlier is a judgment call. So say what you see, that one month sits apart in the left tail, and don't claim more. Next week you'll get a rule that makes the call for you.
Pause and try this. A classmate looks at the month lengths and says, "Most of the dots are piled up on the right, at 31, so this is right-skewed." What would you tell them?
Take a few seconds.
Here's the answer. Tell them it's left-skewed. The pile is on the right, but skew is named for the tail, and the thin side points left, toward February's 28.
4. Two-way tables: read two categories at once
Picture a food truck owner who counts orders by menu item and, at the same time, by lunch or dinner. A grid with items down the side and meals across the top shows both at once.
A two-way table is a table that counts individuals by two categorical variables at once, with the categories of one variable as rows and the categories of the other as columns. A cell is one box inside a two-way table, holding the count of individuals who belong to one row category and one column category at the same time.
Every penguin has a species and an island, so let's count them both ways. Put species down the side and the three islands, Biscoe, Dream, and Torgersen, across the top. The Adelie row has 44 birds on Biscoe, 56 on Dream, and 52 on Torgersen, and those add to 152. The Chinstrap row has all 68 of its birds on Dream. The Gentoo row has all 124 of its birds on Biscoe.
Now read down the columns. Biscoe holds 44 Adelie and 124 Gentoo, for 168 birds. Dream holds 56 Adelie and 68 Chinstrap, for 124 birds. Torgersen holds 52 birds, every one of them Adelie. And 168, plus 124, plus 52 brings you back to 344. The row totals and the column totals both reach the same grand total.
Adelie is the only species on all three islands, while Chinstrap shows up only on Dream and Gentoo only on Biscoe. Because this was an observational study, that pattern is an association, not a cause.
Here's a trap in this exact table. The number 124 appears twice. It's the Gentoo total, and it's also the Dream total. Those are two different groups that happen to share a count. So before you use any number from a two-way table, say its row label and its column label.
Pause and try this. How many penguins were logged on Dream, and which two species make up that number?
Think it through before you read on.
Here's the answer. There were 124 penguins on Dream: 56 Adelie and 68 Chinstrap. You get that by reading down the Dream column, not across the Gentoo row.
5. Misleading graphs: catch the trick before it catches you
Picture an ad for a new phone with two bars for battery life. The new phone's bar towers over the old one. You'd guess the battery lasts several times longer. Then you read the numbers along the side of the chart, and the scale doesn't start at zero. A small gain has been drawn as a giant one.
A misleading graph is a graph whose design, rather than its data, leads a reader to a wrong impression of the numbers. Two tricks show up again and again.
The first is the truncated axis, a graph axis that starts at a value other than zero, which can make small differences between bars look large. Try it with the months. Draw a bar chart of month lengths, but start the vertical axis at 27 days instead of zero. February's bar is drawn 1 unit tall, because 28 is 1 above 27. A 31-day month's bar is drawn 4 units tall. February now looks like a quarter of a month. In fact, February has about 90.3 percent as many days as a 31-day month. It's only 3 days shorter. Start the axis at zero, and the bars come out nearly the same height, which is the truth.
The second trick is an area distortion, a picture graph that scales an icon in both height and width, so the icon's area grows much faster than the amount it stands for. Suppose a coffee chain shows its large cup as an icon twice as tall and twice as wide as its regular cup. The large cup holds twice as much. But 2 times 2 is 4, so the icon covers 4 times the area. Your eye reads area, and the cup looks four times bigger than it is.
The zero rule is for bars, because a bar's length is its whole message; a histogram's number line can start near the data. And a spreadsheet will draw a truncated axis without complaint, so checking the axis is your job.
Pause and try this. On the month chart with its axis starting at 27, February's bar looks a quarter as tall as January's. If you reset the axis to start at zero, what would you see?
Take a moment before the answer.
Here's the answer. The two bars would look nearly the same height. February has 28 days and January has 31, so February's bar would be about 90.3 percent as tall, which matches the real difference.
Closing
Let's pull the week together in the order we built it. A frequency table counts each category, and a relative frequency turns each count into a share; bars compare, and pies split one whole. Amounts live on a number line, where a dot plot or stem plot handles a few values and a histogram handles many. You describe shape by its balance, its peaks, and any stragglers, and you name the skew by the tail. A two-way table counts two variables at once, so read the row and the column before the number. And a bar chart's axis must start at zero, while an icon should grow in one direction only.
Next in this module come the Readings & Resources page, the lecture tutorial, the practice set, and the quiz, where you build tables and read shapes yourself, and then the discussion, where you judge a graph. Next week, in Week 3, Numerical Summaries: Center & Spread, the middle and the spread you've only described in words get numbers of their own.
Built with The Course Maker · samples.thecoursemaker.com