Chapter 2: Displaying and Describing Categorical Data
Recall that a variable is a characteristic of an individual, and a variable can take different
values for different individuals. When we speak of the “distribution” of a variable, we
mean, “What are the values of the variable and how often does each value occur?".
Distributions are best displayed in tables, charts, and graphs. All provide compact and
visually appealing ways of summarizing variables or data. Every statistical analysis of
data should include graphical summaries. We emphasize this as follows:
Three Rules of Data Analysis:
Rule 1. Make a picture.
Rule 2. Make a picture.
Rule 3. Make a picture.
These pictures give good general impressions of the data, the distribution of the
variable, trends, possible outliers, and later on, relationships among variables. They also
suggest which numerical summaries will be useful.
Frequency Table:
A table of counts (i.e. frequencies) of each of the values of a categorical variable,
together with relative frequencies (also called proportions) or percents.
Example: 20 students’ response to a multiple-choice question with 5 possible answers
DABAADACDDAABAAAEECA
Values Frequency Relative Frequency Percentage
A 10 .50 50%
B 2 .10 10%
C 2 .10 10%
D 4 .20 20%
E 2 .10 10%
Total 20 1.00 100%
One useful type of graph of a frequency table for a categorical variable is a “bar graph”
or “bar chart”. Here is a bar chart (created in Excel) for the above frequency table.
1
, Responses to Multiple Choice Question
12
10
8
Frequency
6
4
2
0
A B C D E
Response Choice
Note that the Y-axis could have shown the Percentage or Relative Frequency instead of
the Frequency.
When the bars are reordered and presented from lowest to highest or highest to lowest,
the chart is known as a Pareto chart.
A segmented or stacked bar chart divides up a 100% bar into segments, the widths of
which are proportional to the relative frequencies.
Would a pie chart be suitable here? Yes and No
Although pie charts are the most ubiquitous of graphs, they are rarely the best choice of
graphical display. A pie chart has very low data density. The percentages in it can be
better presented in a table. There are only two things worse than a pie chart: a 3-D pie
chart or multiple pie charts! See Tufte (1983) for more criticism of pie charts.
How would you compare two groups?
Clustered bar chart – works well
Multiple segmented bar charts – works well
Multiple pie charts – this does not work well!
Note that if you have only a very small number of values, a graph may be a waste of
time and space. My personal preference is that if you have fewer than five numbers to
display, just summarize it in a sentence. For example, if there are 60 domestic students
and 40 international students in a class of 100 students, write, “The class is 60%
domestic and 40% international”. Don’t bother with a bar chart for two bars!
There are lots of other possibilities, including line graphs, dot plots, and much more.
Check out “Insert > Charts” in Microsoft Excel for illustrations.
Area Principle: area should be proportional to the magnitude of what it represents.
Beware of misleading graphs that violate this principle.
2
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller rakshitrajwani. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $7.99. You're not tied to anything after your purchase.