Applications of Bar Graphs: Learn It 1

  • Create side-by-side and stacked bar graphs using technology
  • Use side-by-side and stacked bar graphs to compare different groups

Comparing a Variable Across Groups

Both pie charts and bar graphs are good visual representations of a categorical variable from a single population or group. But what can we do if we want to compare a categorical variable across multiple groups?

contingency table (two-way table)

A contingency table is a table that displays the results of two categorical variables simultaneously. This is also called a two-way table.

  • The advantage of a contingency table is that you can see each precise percentage of responses or frequency of responses.
  • A disadvantage is that the table does not present a strong visual comparison between the groups.

Side-by-Side Bar Charts

Side-by-side bar charts and stacked bar charts are extensions of bar graphs or pie charts that allow us to conduct comparisons between multiple data sets. These bar charts will help us to explore how to display and interpret changes in a categorical variable of interest when comparing multiple populations or groups of interest.

side-by-side bar charts

Side-by-side bar charts present data for two categorical variables from more than one group by creating multiple bars on the chart for each group, with one bar for each variable.

The 2016 presidential race was very different from the one in 2020. In 2016, fewer people turned out to vote,[1] more people were deemed ineligible ([latex]6[/latex] million felons in 2016[2] compared to [latex]5.1[/latex] million felons in 2020),[3] and the election results were much closer. In 2016, Hillary Clinton won the popular vote, and fewer than [latex]80,000[/latex] votes out of [latex]137[/latex] million votes cast determined the outcome of Donald Trump being selected as our president.[4]Looking to our future, one question might be, “If we increase legitimate voter participation, will one party benefit?” We can better answer this question if we study the voting patterns of different groups within the United States. CNN used an exit poll to estimate the presidential 2020 voting patterns by race.[5] The following is a table of the results, where the rows describe the different groups of people of interest (White, Black, Latinx, Asian, and Other) and the columns represent the vote choices (Biden, Trump, or Other).

Presidential 2020 Voting Patterns Percentage by Race
  Biden Trump Other
White [latex]41[/latex] [latex]58[/latex] [latex]1[/latex]
Black [latex]87[/latex] [latex]12[/latex] [latex]1[/latex]
Latinx [latex]65[/latex] [latex]32[/latex] [latex]3[/latex]
Asian [latex]61[/latex] [latex]34[/latex] [latex]5[/latex]
Other [latex]55[/latex] [latex]41[/latex] [latex]4[/latex]

Among Asians, for example, [latex]61[/latex]% voted for Biden, [latex]34[/latex]% voted for Trump, and the remaining [latex]5[/latex]% voted for someone else.

Translating the table to a visual might aid in the comparison between the groups.

Let’s take the table of voting patterns we looked at above and compare it to a side-by-side bar graph containing the same information.

Bar graph demonstrating how America voted in 2020 based off of different racial groups.
Figure 1. This graph allows for quick visual comparisons of voter preferences across racial groups, highlighting differences in support for Biden, Trump, and others.

The groups of interest are listed on the horizontal axis (Whites, Blacks, Latinx, Asian, and Other), and the percentages associated with each voter choice are on the vertical axis.

When percentages of an entire group are reported, within each group, the heights of the bars should total [latex]100[/latex]. This represents [latex]100\%[/latex] of all responses within that group. Using a side-by-side bar graph that chooses to represent percentages within groups (as opposed to the numbers of actual ballots cast within groups) means that you cannot make conclusions about counts. Rather, you can make conclusions about relative proportions or percentages within each group.

  1. Schaul, K., Rabinowitz, K., & Mellnik, T. (2020, December 28). 2020 turnout is the highest in over a century. The Washington Post. https://www.washingtonpost.com/graphics/2020/elections/voter-turnout/
  2. Uggen, C., Larson, R., & Shannon, S. (2016, October 16). 6 million lost voters: State-level estimates of felony disenfranchisement, 2016. The Sentencing Project. https://www.sentencingproject.org/publications/6-million-lost-voters-state-level-estimates-felony-disenfranchisement-2016/
  3. Maxouris, C. (2020, October 15). More than 5 million people with felony convictions can’t vote in this year’s election, advocacy group finds. CNN. https://www.cnn.com/2020/10/15/us/felony-convictions-voting-sentencing-project-study/index.html
  4. Why voting matters: Supreme Court edition. (2018, June 28). Axios. Retrieved from https://www.axios.com/hillary-clinton-2016-election-votes-supreme-court-liberal-justice-1b4bc4fc-9fad-44b4-ab54-9ef86aa9c1f1.html
  5. Exit polls. (2020). CNN Politics. Retrieved from https://www.cnn.com/election/2020/exit-polls/president/national-results