Educerie · AP · Statistics
AP Statistics 1.4
Graphical Representations for One Categorical Variable
How do we describe data about one variable, and how must the data be collected before we can trust what they say?
What you will learn
- Understand that a bar chart shows counts or proportions with separated bars
- Understand that a pie chart shows each category as a share of the whole
- Know how to justify a claim with numbers read from a graph
- Know how to compare groups of different size on relative frequencies
You must be able to
- Construct a bar chart with labeled axes and a vertical axis that starts at zero
- Calculate the angle of each pie chart slice from its relative frequency
- Justify a claim about a categorical variable using values read from the graph
- Compare two schools or groups from side-by-side relative frequency bars
- Explain why counts cannot be compared when the groups differ in size
In the exam. Section I multiple choice, as a bar chart or pie chart to read, or a claim to check against a graph. In Section II, a graph of a categorical variable can appear in the multi-focus questions, where you read values, compare two groups and justify a claim. The graph is usually given. The marks are for reading it correctly and saying what it shows.
1Bar charts
Bar chart = a graph with one bar for each category of a categorical variable. The height or length of a bar is the frequency (count) or the relative frequency (proportion) of that category. A bar chart is also called a bar graph.
Figure 1 shows how the 200 students at School A travel to school.
Read it in this order:
- The horizontal axis lists the categories: walk, bus, car, bike.
- The vertical axis gives the number of students.
- The tallest bar is bus, at 82 students. The shortest is bike, at 20.
To draw a good bar chart:
- Label both axes. Name the categorical variable (how students travel) and the measurement (number of students).
- Start the vertical axis at zero. A bar's height is its value. If the axis starts higher, the bars exaggerate the differences.
- Leave gaps between the bars. Categories are separate groups, so the bars do not touch. This is the way to tell a bar chart from a histogram (Topic 1.5), whose bars touch because the horizontal axis is a number line.
- Give every bar the same width. Only the height carries information.
The categories have no natural order, so they can be placed in any order. Many people put them from tallest to shortest, which makes the ranking easy to read.
A bar chart can show relative frequencies instead of counts. The shape is the same. Only the scale on the vertical axis changes: in Figure 1 the Bus bar would be at 0.41 rather than 82.
2Pie charts
Pie chart = a circle divided into slices, with one slice for each category. The area of each slice, as a fraction of the whole circle, is the relative frequency of that category. The slices together make up 100% of the area.
Figure 2 shows the same 200 students.
To draw a pie chart, turn each relative frequency into an angle. A full circle is 360 degrees.
| Category | Relative frequency | Angle |
|---|---|---|
| Walk | 0.23 | |
| Bus | 0.41 | |
| Car | 0.26 | |
| Bike | 0.10 | |
| Total | 1.00 | 360° |
The angles add up to 360, which is a check on the arithmetic.
Two limits of a pie chart:
- It only works for parts of one whole. The slices must add to 100%.
- Slices of similar size are hard to rank by eye. In Figure 2, Car (26%) and Walk (23%) look close. A bar chart makes that difference clearer, because it compares lengths along a line.
3Reading a graph to justify a claim
A graph reveals information about the variable that can be used to justify claims in context. A justified claim has three parts:
- The claim, stated in the words of the context.
- The evidence, a value or comparison read from the graph.
- The link between them, in a sentence.
Example: "Bus is the most common way School A students travel to school. The bus bar is the tallest, at 82 of the 200 students, which is 41%."
The claim names the group, the variable and the category. The evidence gives the count and the proportion. If the graph shows only counts, divide by the total yourself.
A claim must match the graph.
- "Most students at School A take the bus" is not supported. 41% is the largest share but it is less than half.
- "More students walk than cycle" is supported. 46 is greater than 20.
- "Twice as many students take the bus as take the car" is not supported. , not 2.
Always check a claim that uses "most", "twice" or "majority" against the number. Each word has a precise meaning.
4Comparing two groups
Frequency tables, relative frequency tables, bar charts and pie charts can compare two or more groups on the same categorical variable. This is the same skill as Topic 1.3, drawn as a graph.
School A has 200 students and School B has 500. Their counts cannot be set next to each other, because the totals differ. Use relative frequencies, as in Figure 3.
Read Figure 3 category by category:
- Walk: School B's bar (0.34) is taller than School A's (0.23).
- Bus: the bars are the same height (0.41).
- Car: School A's bar (0.26) is taller than School B's (0.19).
- Bike: School A's bar (0.10) is taller than School B's (0.06).
A correct comparison in context: "A larger proportion of School B students walk (0.34 compared with 0.23 at School A). The two schools have the same proportion of bus riders, 0.41. A larger proportion of School A students come by car or by bike."
The values are from the survey in Topic 1.3, and the bar heights in Figure 3 match its relative frequency table. Use the same two schools to practice: write the comparison for car, then for bike.
5Choosing the right graph
Match the graph to the variable.
| Variable | Graph |
|---|---|
| Categorical, one group | Bar chart or pie chart |
| Categorical, comparing groups | Side-by-side bar charts of relative frequencies |
| Quantitative | Dotplot, histogram, stem-and-leaf plot or boxplot (Topics 1.5 and 1.8) |
A histogram is for a quantitative variable. Do not use one for a categorical variable. If a question asks you to justify a graph choice, say what type the variable is and that the graph shows that type.
One more check: if the question mentions parts that add to a whole, a pie chart is possible. If it compares several groups or has many categories, a bar chart is the clearer choice.
6Misleading graphs
A graph can mislead without any false number on it.
- A vertical axis that does not start at zero. Small differences look large. Two bars of 82 and 90 on an axis that starts at 80 look like 2 against 10.
- Counts for groups of different size. The larger group looks bigger on every bar, whatever the shares are.
- Slices that do not add to 100%, or a pie chart for categories that are not parts of a whole.
When you read a graph, check the axis first and then the numbers.
Practice questions
30 questions on this note, from easy to hard. Each one you get right lights a star of this topic's constellation.