Applications of Bar Graphs: Apply It 1

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

Using Data Displays to Analyze Demographic Change

Woman stands in front of a voting booth wearing an "I am a voter" sticker.
Figure 1. Understanding who votes—and how—can help researchers explore how shifting demographics might influence future elections.

In a previous example, we studied the voting patterns of different groups within the United States and found that voter patterns varied by race in 2020. If we wish to predict potential changes in future voting outcomes, we may want to research the following question: Has the racial composition of the United States population changed across generations?

contingency table is a table that displays the results of two categorical variables simultaneously. It is also called a two-way table. Side-by-side bar graphs present data for two categorical variables from more than one group by creating two bars on the chart for each group — one bar for each variable. In the stacked bar graph, each bar represents the responses of one group. The height of each color within that bar represents a percentage of a particular response, and the combination of all colors represents the total (100%) of all responses within that group. 
The following table[1] provides the racial composition for four different generations in the U.S.: “Baby Boomers” (born before 1962), “Gen Xers” (born 1965–1980), “Millennials” (born 1981–1996), and “Gen Zers” (born after 1996).

Racial Composition Across Generations
Generation White Hispanic Black Asian Other
Boomers [latex]81.20[/latex]% [latex]4.00[/latex]% [latex]12.90[/latex]% [latex]1.00[/latex]% [latex]1.00[/latex]%
Gen X [latex]70.00[/latex]% [latex]12.00[/latex]% [latex]15.00[/latex]% [latex]0.00[/latex]% [latex]3.00[/latex]%
Millennials [latex]61.00[/latex]% [latex]17.00[/latex]% [latex]15.00[/latex]% [latex]4.00[/latex]% [latex]3.00[/latex]%
Gen Z [latex]51.00[/latex]% [latex]24.50[/latex]% [latex]13.70[/latex]% [latex]5.90[/latex]% [latex]4.90[/latex]%

The table contains survey information on the racial composition of similar groups of people ([latex]7–22[/latex] years old) at similar points in time within each generation. For example, an analysis of the 1987 Current Population Survey (CPS) of Americans reported the racial and ethnic composition of Gen Xers (born between 1965 and 1980) was [latex]70[/latex]% White, [latex]12[/latex]% Hispanic, [latex]15[/latex]% Black, [latex]0[/latex]% Asian, and [latex]3[/latex]% Other. Asians were not separately identified by the population survey until 1988.

Let’s use the Describing and Exploring Categorical Data tool to create a side-by-side bar graph AND a stacked bar graph to visualize changes in the racial composition.

[Trouble viewing? Click to open in a new tab.]


  1.  Parker, K. & Igielnik, R. (2020, May 14). On the cusp of adulthood and facing an uncertain future: What we know about Gen Z so far. Pew Research Center. https://www.pewresearch.org/social-
    trends/2020/05/14/on-the-cusp-of-adulthood-and-facing-an-uncertain-future-what-we-know-about-gen-z-
    so-far-2/