Chapter 3 800 Children and Teens, part one
Next we look at a data set that has information on 800 US children and teens (aged 5–19) from 2003.
You will find information about
Weight, and other things.
Your first task is to explore the data. Here are some questions you can address:
- What attributes do you expect to be related?
- Can you show that relationship in a graph?
- What other relationships can you show?
- Try making more than one graph, and then select points in one of them. What happens? How might that be useful?
- What do you think the units are for these values?
BMI? If you don’t know, look it up.
3.2 A Specific Question: Who is Taller?
Who is taller, males or females?
Stereotypically, we probably agree that, in general, males are taller. But is that really true? Let’s use the data to find out.
The next illustration contains a CODAP document that graphs
That’s the obvious way to look at our question.
It looks as if the pile of males is a bit higher up in the graph, that is, they’re taller. But how much? Let’s find the mean.
Oh, and if you’re reading this book in a browser, that illustration is live. You don’t have to make a separate CODAP window for this bit.
- Click on the graph to select it.
- At the right of the graph, click on the “ruler” icon. A panel opens up. We call these things “palettes.”
- Click the checkbox for mean. (Of course you can try other options as well.)
- Hover over the mean lines that appear. You can see the values.
You should find that the average height of males is about 10 (cm) greater than the average height of females. So that shows that our preconception (males are taller) is correct.
If you stop and think a bit, our graph is deeply bogus. It’s a bad analysis. Why?
Try not to read ahead…
- If you’re a student in a class, discuss with your group.
- If you’re studying alone, think about this before scrolling down to see what we think.
3.3 Making the Question More Specific
The problem is that we haven’t taken
Age into account,
Age is much more important than
Gender in determining height.
The whole long tail of short people—for both males and females–is made up of little kids.
If you’re not convinced, drop
Age into the middle of the graph.
Go ahead, we’ll wait.
In general (the graph says), the short people are younger. Make sure you can explain how the graph shows that. What is it about the colors that says short people are younger?
Still, it’s a confusing graph. Let’s make it simpler.
Instead of looking at everybody we have, ages 5–19, let’s just look at one age: 10-year-olds. First we’ll filter the graph so it shows only 10-year-olds. Then we’ll compare the heights of those boys and those girls.
You get a fresh, live document below. Follow these steps for the filtering:
Ageto the horizontal axis so you have a graph of
- Take a moment to discuss (or reflect) on whether that graph makes sense. It tells a story. What is it?
- Select all the 10-year-olds. Do this by dragging a rectangle around those points. If this is unfamiliar to you, you can probably figure it out by messing around. If that doesn’t work for you, get help!
- With the graph selected, click on the “eyeball” palette on the right to bring up a menu.
- Choose Hide Unselected Cases. Aha! Now the graph has only 10-year-olds.
meanon the graph so you get their average heights. See if you can get this graph:
Some questions to answer; if you don’t know, don’t be afraid to ask others!
- How did you compare the 10-year-old girls to the boys?
- Are there other ways to compare them in a graph? Sure there are!
- Which way works better?
- The heights of females overlap with heights of males. What does that mean?
- What are the mean heights of the 10-year-old girls and boys?2 How did you find them?
- For the whole dataset, males are taller. For 10-year-olds, females are taller. How is that possible? Does it fit with your experience?
3.4 Groupwork! Getting all the means
If you’re in a class, and there is enough time, your instructor will break you into groups.
Each group will be responsible for a couple of ages. For each age, do what we just did for 10-year-olds: find the mean height for the girls and the boys at that age. Then enter your data on a class table, which may be on a whiteboard, or perhaps online in a shared table such as a Google Sheet.
Then, when all the groups are done, enter your data into a fresh CODAP document. How do you do that?
- Begin with a fresh CODAP document.
- Make a new table (look in the Tables tool).
- Create the relevant columns (what columns do you need?).
- Enter the data by typing the numbers in to the table cells.
If you have the data in a Sheet, you could, instead:
- Begin with a fresh CODAP document.
- Export the sheet as a .csv file. (in Google, it’s in the File menu. Choose Download and then Comma-separated Values.)
- Drop the file into your CODAP document.
Then plot the means as a function of age. Make sure you can tell the males from the females!
Plotting two things at once
If the males and females are in different columns in your table, you might first plot the females on the vertical axis and age on the horizontal. But then, if you plot the males in the normal way, the female data will disappear. How do you get them both on the same graph?
The trick is this: as you are dragging the males in, wait. With the mouse down, pause and look: there is a gray outline of a plus sign at the top of the axis. Drop the attribute there instead of on the axis; it will add the data to the plot instead of replacing it.
If you’re using a touch device such as an iPad, this may not be possible! Don’t worry, in a couple of lessons you’ll learn a better way.↩