mathleaks.com mathleaks.com Start chapters home Start History history History expand_more Community
Community expand_more
menu_open Close
{{ filterOption.label }}
{{ item.displayTitle }}
{{ item.subject.displayTitle }}
arrow_forward
No results
{{ searchError }}
search
Expand menu menu_open home
{{ courseTrack.displayTitle }}
{{ statistics.percent }}% Sign in to view progress
{{ printedBook.courseTrack.name }} {{ printedBook.name }}
search Use offline Tools apps
Login account_circle menu_open
Statistics

Drawing and Interpreting Two-Way Frequency Tables

In surveys, multiple questions are often asked. Thus, it can be interesting to study the answers to more than one question at a time. Using a two-way frequency table, the answers to two questions can be analyzed together.

Concept

Categorical Data

Categorical data, also called qualitative data, is data that can be split into groups. In other words, it is data belonging to one or more categories that have a fixed number of possible outcomes or values. An example of categorical data is the continent in which a country lies.

Every country on Earth is generally accepted to lie within one of these seven continents, and can therefore be categorized as belonging to one continent or another.

Concept

Frequency Table

A frequency table is a type of table that is used to present values and their frequencies for a particular data set. It lists the possible values or outcomes of the category, and then it lists how many times each value or outcome is observed. As an example, the results of asking a group of ten people about their favorite animals can be presented in a frequency table.

Preference Frequency
Cats
Dogs
Quokkas
Turtles
Frequency tables can be used to describe frequency distributions. To help people understand the data in a frequency table, its data can be represented visually, among other methods, by using a bar graph for categorical data or a histogram in case of numerical data.
fullscreen
Exercise

For a school project, Petrus asked some of his classmates how many pets they've had in total in their life. Unsorted, his results were Dividing his data into the groups and how should his frequency table look?

Show Solution
Solution

To begin, we can set up the table. The right column should show frequency, so the left column is "number of pets." Let's add the groups to the left column.

Number of pets Frequency

We can now look at the data and count how many times an answer was given in each group. For instance, five of the classmates answered and three gave an answer of or Filling in the entire table like this gives us the desired frequency table.

Number of pets Frequency

Concept

Two-Way Frequency Table

A two-way frequency table, also known as a two-way table, is a table that displays categorical data that can be grouped into two categories. One of the categories is represented by the rows of the table, the other by the columns. For example, the table below shows the results of a survey in which participants were asked if they have a driver's license and if they own a car.

two-way table

Here, the two categories are car and driver's license, both with possible answers of yes and no. The entries in the table are called joint frequencies. Two-way frequency tables often include the total of the rows and columns. These totals are called marginal frequencies.

two-way table
The sum of the Total row and the Total column is equal to the sum of all joint frequencies and is called the grand total. In the case of the survey, the grand total is From the table it can be read that, among other things, people both have a driver's license and own a car. It can also be read that people do not have a driver's license.

Method

Drawing a Two-Way Frequency Table

Organizing data in a two-way frequency table can help with visualization, which in turn makes it easier to analyze and present the data. To draw a two-way frequency table, three steps must be followed.

  1. Determine the Categories
  2. Fill the Table With Given Data
  3. Find Any Missing Frequencies

Suppose that people took part in an online survey, where they were asked whether they prefer top hats or berets. Out of the males that participated, of them prefer berets. Also, of the females chose top hats as their preference. The steps listed above will be developed for this example.

1

Determine the Categories

First, the two categories of the table must be determined, after which the table can be drawn without frequencies. Here, the participants gave their hat preference and their gender, which are the two categories. Hat preference can be further divided into top hat and beret, and gender into female and male.

two-way table

The total row and total column are included to write the marginal frequencies.

2

Fill the Table With Given Data

The given joint and marginal frequencies can now be added to the table.

two-way table

3

Find Any Missing Frequencies

Using the given frequencies, more information can potentially be found by reasoning. For instance, because out of the males prefer berets, the number of males who prefer top hats is equal to the difference between these two values. Therefore, there are males who prefer top hats. Since there are females who prefer top hats, the number of participants who prefer this type of hat is the sum of these two values. It has been found that participants prefer top hats. Continuing this reasoning, the entire table can be completed.

two-way table

Concept

Joint and Marginal Relative Frequencies

In a two-way frequency table, a joint relative frequency is the ratio of a joint frequency to the grand total. Similarly, a marginal relative frequency is the ratio of a marginal frequency to the grand total. Consider an example two-way table.

two-way table

Here, the grand total is The joint and marginal frequencies can now be divided by to obtain the and relative frequencies. Clicking in each cell will display its interpretation.

two-way table

Concept

Conditional Relative Frequency

A conditional relative frequency is the ratio of a joint frequency to either of its corresponding two marginal frequencies. Alternatively, it can be calculated using joint and marginal relative frequencies. As an example, the following data will be used.

two-way table

Using the column totals, the left column of joint frequencies should be divided by and the right column by Since the column totals are used, the sum of the conditional relative frequencies of each column is

two-way table

The resulting two-way frequency table can be interpreted to obtain the following information.

  • Out of all the participants with a driver's license, about of them own a car.
  • Out of all the participants with a driver's license, about of them do not own a car.
  • Out of all the participants without a driver's license, about of them own a car.
  • Out of all the participants without a driver's license, about of them do not own a car.

Method

Recognizing Associations in Data

Continuing on the example above, it can be seen that among people with a driver's license, having a car is common, and among those without a license, owning a car is uncommon. Thus, it can be reasoned that there is an association between having a driver's license and owning a car. Finding the conditional relative frequencies using the row totals instead, gives a slightly different result.

Driver's license
Yes No
Car Yes
No

Here, it is shown that among car owners, almost everyone has a driver's license, but among those without a car, roughly half have a driver's license. This isn't as obvious, but it shows a tendency of relating car ownership with having a driver's license, which further confirms the association. In some cases, it is obvious that answers in one category might be the result of the other category, such as in the following example.

Bed time
Before 9.30 a.m. After 9.30 a.m.
Age 10-12
13-15
16-18

A person's bed time might be dependent on their age, but their age is not dependent on their bed time. Because of this, it is recommended to use the age totals when finding the conditional relative frequencies. This gives the distribution of bed time given a certain age span, which will clearly show any association.

Bed time
Before 9.30 a.m. After 9.30 a.m.
Age 10-12
13-15
16-18
A trend of going to bed after 9.30 a.m. as age increases can now be seen in the table. Thus, there is an association.
fullscreen
Exercise

Eugenia is passionate about two things in particular, hot air balloons and forks. Lately, she's run an online survey, where people answer if they have ever flown a hot air balloon and how many forks they have, urging all her friends to share the link to it. She's now finally made a post of the results:

"Thank you, all participants. More than I predicted, of you, have flown in a hot air balloon. Out of these have between eleven and twenty forks, and have between six and ten forks. In total, people have between six and ten forks, and people have never flown in a hot air balloon and have between eleven and twenty forks."

Help her visualize the data by drawing a two-way frequency table including all joint and marginal frequency. Then, draw a two-way table with joint relative and marginal relative frequencies. Finally, find and use the conditional relative frequencies to determine if there are any apparent associations in the data.

Show Solution
Solution

To begin, we'll establish the different categories for this data set. Based on Eugenia's questions, we can sort the data into two categories: "hot air balloon" and "forks." Next, we'll draw a two-way frequency table that organizes Eugenia's results.

Hot air balloon
Yes No Total
Forks 0-5
6-10 22 312
11-20 44 583
Total 75 1105

Notice that the "Yes" column, the "11-20" row, the "Total" row, and the "6-10" row each have only one cell missing. Thus, we can complete each by reasoning.

Hot air balloon
Yes No Total
Forks 0-5
6-10 22 312
11-20 44 583
Total 75 1105

The remaining two cells can be found by reasoning in the same way. First, we'll find the number of people who have not ridden in a hot air balloon and own 0-5 forks, then we'll find the remaining total.

Hot air balloon
Yes No Total
Forks 0-5 9
6-10 22 290 312
11-20 44 583 627
Total 75 1030 1105

Now that we have complete two-way table, we can see the joint and marginal frequencies for Eugenia's data. To find the joint relative and marginal relative frequencies, we'll divide each frequency by the total number of participants,

Hot air balloon
Yes No Total
Forks 0-5
6-10
11-20
Total

From the relative frequencies above, we can notice trends in Eugenia's data. For instance, only of participants have ridden in a hot air balloon, and own between and forks. Lastly, we can calculate the conditional relative frequencies using either the row or the column totals. Here, we'll arbitrarily use the column totals.

Hot air balloon
Yes No
Forks 0-5
6-10
11-20

For both groups of people, those who have and have not ridden in a hot air balloon, few have between and forks, while more than half have between and forks.


{{ 'mldesktop-placeholder-grade-tab' | message }}
{{ 'mldesktop-placeholder-grade' | message }} {{ article.displayTitle }}!
{{ grade.displayTitle }}
{{ exercise.headTitle }}
{{ 'ml-tooltip-premium-exercise' | message }}
{{ 'ml-tooltip-programming-exercise' | message }} {{ 'course' | message }} {{ exercise.course }}
Test
{{ 'ml-heading-exercise' | message }} {{ focusmode.exercise.exerciseName }}
{{ 'ml-btn-previous-exercise' | message }} arrow_back {{ 'ml-btn-next-exercise' | message }} arrow_forward