Displaying Categorical Data: Background You’ll Need 1

Learning Goals

This activity provides an opportunity to refresh the following skills:

You will also become familiar with these skills:

Throughout much of this course you will need to read and interpret frequency tables, bar graphs, and pie charts. These kinds of tables, graphs, and charts help us to visualize data collected about a situation in order to understand it clearly. To help you gain familiarity and practice with these ideas before the course section begins, let’s work with a small data set to see what methods are available to us for visualizing the data. You’ll also need an understanding of percentages and relative frequencies. Look for the recall boxes in the text and/or refer to the Student Resource pages indicated there if you need a refresher.

Shark Attacks

In this corequisite support activity, we’ll look at shark attacks in the United States and internationally. We will see how visual displays like tables and graphs can help us analyze the number of shark attacks that occur in each country or U. S. state.

a great white shark, swimming, its mouth slightly open

Carcharodon carcharias

To frame the landscape for this activity, think about shark attacks for a moment. What areas of the country or the world seem to be associated with a lot of interaction between sharks and humans? The United States and Australia might come to mind. Consider the two questions below.

In the United States, which state do you think has the most shark attacks?

Which country in the world do you think has the most? 

We can use data to answer questions like this. We’ll need to organize and visualize the data first to make it useful for drawing conclusions. A tool that is commonly used to organize data like the number of shark attacks per location is a frequency table.

Frequency tables

Frequency tables include information about a number of times something occurs, also known as the frequency of occurrences. One column in the table lists different categories or groups. Another column lists the frequency of occurrences associated with each category or group.

Interactive Example

Suppose your school has decided to get a large number of people together for an evening to watch the popular TV show, Shark Week. The refreshment committee sent out a survey asking everyone to list a preference for one of 5 snack options and received 73 responses. The table below lists all the snacks on the survey and the number of people who listed each as their preference.

Refreshment Options for Shark Week Watch Party
Snack Count
Pizza 22
Sliders 13
Chip and Dip 12
Wings 19
Veggie Tray and Dip 7
  1. How many people said they would prefer chip and dip as the refreshment at the party?
  2. What were the least two favorite snacks of all the responses?

Now you try it with the shark attack data listed below.

Below is a frequency table of shark attacks in the United States.[1] A frequency table organizes categorical data by listing the different possible categories and the number of times each category occurs in the dataset. For example, in the table below, we see that over some period of time California had [latex]33[/latex] shark attacks, Florida had [latex]203[/latex], and so on.

Shark Attacks in the United States
U.S. State Count
California [latex]33[/latex]
Florida [latex]203[/latex]
Hawaii [latex]51[/latex]
North Carolina [latex]23[/latex]
Other [latex]27[/latex]
South Carolina [latex]34[/latex]
Texas [latex]16[/latex]

question 1

question 2

question 3

Relative frequency

When considering data in a frequency table, we often want to know how much a certain frequency represents of the total. For example, 23 shark attacks in North Carolina sounds like quite a lot. But how much of all shark attacks do those 23 represent? Knowing the answer to that may help us feel better about deciding on a location for a beach vacation. Listing the relative frequency for each of the counts in a table will help to understand this.

The relative frequency is a proportion (or percentage) of a particular category out of the entire group. See the interactive example below for a demonstration of how to calculate the relative frequency of shark attacks in North Carolina. You may wish to refresh your skills to convert fractions to proportions or percentages in the Recall box first.

recall

To write the relative frequency of an item in a frequency table, divide the frequency (count) of an item by the total frequency of the table.

Ex. Calculate the relative frequency of shark attacks in North Carolina as a proportion rounded to [latex]4[/latex] decimal places.

Core Skill:

Core Skill:

[Also see Corequisite Support Activities 1E and 2D for more practice.] 

Interactive example

For example, in the table Shark Attacks in the United States, we can see that the [latex]23[/latex] shark attacks in North Carolina were  out of [latex]387[/latex] shark attacks in all the states combined. If we want to know what proportion or percentage of the total attacks occurred in North Carolina, we can express them as a ratio (fraction), then convert the ratio to a proportion (decimal) or a percentage.

[latex]\dfrac{\text{# attacks in N.C.}}{\text{# total attacks}}=\dfrac{23}{387} \approx0.0594[/latex] or about [latex]5.94[/latex]%

We can express the relative frequency by saying either of the following.

The proportion of U.S. shark attacks in North Carolina is [latex]0.0594[/latex] 

About [latex]5.94[/latex]% of U.S. shark attacks occurred in North Carolina.

Compute the relative frequencies for each of the following location. Recall that there were [latex]387[/latex] total attacks.

  1. California: [latex]33[/latex] attacks
  2. Florida: [latex]203[/latex] attacks
  3. Hawaii: [latex]51[/latex] attacks

Frequency tables commonly include a column for relative frequency, expressed as a proportion (decimal) or a percent. See the Recall box above for a refresher on how to convert fractions to proportions and percentages then complete the missing information in the table below.

Recall that a relative frequency represents the proportion or percentage of a particular frequency out of the total frequency. The table below contains the same information as the one you examined above, but adds columns for Proportion and Percent (%). For example, we can see in the table that the proportion of shark attacks that occurred in California out of the total number of shark attacks is [latex]0.0853[/latex], which is equivalent to [latex]8.53[/latex]% of all the shark attacks listed. In the following question, you’ll need to compute the missing proportion and percent for the rows Other, South Carolina, and Texas.

Shark Attacks in the United States
U.S. State Count Proportion Percent (%)
California [latex]33[/latex] [latex]0.0853[/latex] [latex]8.53[/latex]
Florida [latex]203[/latex] [latex]0.5245[/latex] [latex]52.45[/latex]
Hawaii [latex]51[/latex] [latex]0.1318[/latex] [latex]13.18[/latex]
North Carolina [latex]23[/latex] [latex]0.0594[/latex] [latex]5.94[/latex]
Other [latex]27[/latex]
South Carolina [latex]34[/latex]
Texas [latex]16[/latex]

question 4


  1.  Sharks US only (csv). (n.d.). The Art & Science of Learning from Data. Retrieved from https://img1.wsimg.com/blobby/go/bbca5dba-4947-4587-b40a-db346c01b1b3/downloads/sharksUS.csv?ver=1622756678385