{{ 'ml-label-loading-course' | message }}
{{ toc.name }}
{{ toc.signature }}
{{ tocHeader }} {{ 'ml-btn-view-details' | message }}
{{ tocSubheader }}
{{ 'ml-toc-proceed-mlc' | message }}
{{ 'ml-toc-proceed-tbs' | message }}
Lesson
Exercises
Recommended
Tests
An error ocurred, try again later!
Chapter {{ article.chapter.number }}
{{ article.number }}. 

{{ article.displayTitle }}

{{ article.intro.summary }}
Show less Show more expand_more
{{ ability.description }} {{ ability.displayTitle }}
Lesson Settings & Tools
{{ 'ml-lesson-number-slides' | message : article.intro.bblockCount }}
{{ 'ml-lesson-number-exercises' | message : article.intro.exerciseCount }}
{{ 'ml-lesson-time-estimation' | message }}
In probability, tables are used to display a data set. For example, frequency tables show how often an outcome appears in a category. To represent a data set that includes two categories, another type of table is needed. This lesson will discuss how to create and interpret these tables.

Catch-Up and Review

Here are a few recommended readings before getting started with this lesson.

Challenge

Chocolate Bar or Fruit?

Zosia attends North High School in Honolulu. She asked students whether they prefer a chocolate bar or a piece of fruit as a lunchtime snack and whether or not they surf. She obtained the following information.

Results of Zosia's Survey
Letting be the event that a student surfs and be the event that a student prefers fruit as a lunchtime snack, Zosia wants to calculate the following probabilities.
Discussion

Two-Way Frequency Tables, Joint and Marginal Frequencies

A two-way frequency table, also known as a two-way table, displays categorical data that can be grouped into two categories. One of the categories is represented in the rows of the table, the other in the columns. For example, the table below shows the results of a survey where 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 have possible responses of yes and no. The numbers in the table are called joint frequencies. Also, two-way frequency tables often include the total of the rows and columns — these are called marginal frequencies. Select any frequency in the table below to display more information.
two-way table
The sum of the Total row and the Total column, which in this case is equals the sum of all joint frequencies. This is called the grand total. A joint frequency of shows that people have a driver's license and own a car. A marginal frequency of shows that people do not have a car. The rest of the numbers from the table can also be interpreted.
Discussion

Making 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 the given data.
  3. Determine if there are any missing frequencies. If so, find those.

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, prefer berets. Also, of the females chose top hats as their preference. The steps listed above will now be used to analyze and present the data.

1
Determine the Categories
expand_more

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
expand_more

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

two-way table
3
Find Any Missing Frequencies
expand_more
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 with this reasoning, the entire table can be completed.
two-way table
Example

Night Owl or Early Bird?

Zain has a job leading backpackers on excursions in the High Sierras. To better understand what time of day to plan certain activities, Zain posed a question to backpackers about their sleep patterns: Are you a night owl or an early bird? Zain then categorized the participants by sleep pattern and age — younger than and or older. Here is part of what was gathered.

  • people age or older said they are early birds.
  • people younger than participated in the survey.
  • people, of any age, said they are night owls.

Zain made a two-way frequency table with the data they collected. Unfortunately, some of the data values got smudged and are unable to be read! The missing data values have been replaced with letters, for now.

two way table
Find the missing joint and marginal frequencies to help Zain complete the table. Zain's next excursion depends on it.

Hint

Begin by finding the number of people age or older who participated in the survey. To do so, calculate the difference between the grand total and the number of participants younger than That would be divided by

Solution

Start by finding the missing marginal frequency of the last column of the table, labeled A. Note that people participated in the survey and of them are younger than Therefore, the number of participants who are or older can be found by calculating the difference between these two values.
This information can be added to the table.
two way table
With this information, the joint frequency that represents the number of night owls aged or older can be calculated. Of the participants aged or older, are early birds. Therefore, the number of night owls aged or older is the difference between these two values.
This information can also be added to the table.
two way table
The missing marginal frequency in the last row will now be calculated. Of the participants, said they are night owls. To find the number of early birds, the difference between these two values will be calculated.
One more cell can be filled in!
two way table
Finally, the missing joint frequencies and in the first row can be found.
The table can be completed with this information! Click on each cell to see its interpretation.
two way table
Discussion

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 the following example of a 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
Example

Joint and Marginal Relative Frequencies for Night Owls and Early Birds

Previously, Zain made a two-way frequency table about backpackers sleep patterns.

two-way table representing the data collected by Zain

Zain wants to dig deeper into the data for even more clear interpretations, so they plan to calculate the joint and marginal relative frequencies.

two-way table to be completed with the joint and marginal relative frequencies
Zain is beginning to feel a little tired themselves. Give them a hand and complete the table by matching each value with its corresponding cell.

Hint

Divide the joint and marginal frequencies by the grand total.

Solution

To calculate the joint and marginal relative frequencies, the joint and marginal frequencies must be divided by the grand total,

finding the joint and marginal relative frequencies

The table below shows the joint and marginal relative frequencies.

two-way table showing the joint and marginal relative frequencies

One finding — of a variety — based on the joint and marginal relative frequencies, shows that about one-third of the participants who are or older are night owls. Additionally, Zain can see that the participants are almost equally distributed among the categories, as both pairs of marginal relative frequencies have values close to


Discussion

Conditional Relative Frequency

A conditional relative frequency is the ratio of a joint frequency to either of its two corresponding 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

Referring to the column totals, the left column of joint frequencies should be divided by and the right column by Furthermore, 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.
Example

Conditional Relative Frequencies for Night Owls and Early Birds

Using their two-way frequency table, Zain wants to continue improving the interpretation of their data by finding the conditional relative frequencies.

two way table

Zain will use the row totals to make the calculations.

two way table
Zain, really feeling close to being able to make some rock-solid interpretations, could still use a bit more help!

Hint

Since Zain uses the row totals, the joint frequencies in the first row must be divided by and the joint frequencies in the second row must be divided by

Solution

Zain uses the row totals. Therefore, the joint frequencies in the first row must be divided by and the joint frequencies in the second row must be divided by

two way table

The table below shows the conditional relative frequencies.

two way table

Extra

Applying Zain's Findings to an Actual Backpacking Trip

Zain interprets the various findings as reason to believe when planning night activities, like storytelling over a campfire, they could tailor the stories for an older generation. Interestingly, the older backpackers, as a whole, seem to prefer nights more than the younger backpackers. Zain can now plan according to these interpretations.


Example

Finding Conditional Probabilities Using Conditional Relative Frequencies

Zain will now consider the two-way table that shows conditional relative frequencies obtained using row totals.

two way table

They want to calculate some conditional probabilities by using the table. Help Zain find these probabilities!

a Knowing that a person is aged or older, find the probability that they are a night owl.
b Knowing that a person is younger than find the probability that they are an early bird.
c Knowing that a person is younger than find the probability that they are a night owl.
d Knowing that a person is aged or older, find the probability that they are an early bird.

Hint

Consider the fact that the conditional relative frequencies were found using row totals.

Solution

The table was created using row totals. Therefore, the first cell of the first row shows the probability of a person being a night owl given that they are younger than Similarly, the second cell of the first row shows the probability of a person being an early bird given that they are younger than

two way table

Likewise, the first cell of the second row shows the probability of a person being a night owl given that they aged or older. Similarly, the second cell of the second row shows the probability of a person being an early bird given that they are aged or older.

two way table
Example

Using a Two-Way Table to Determine Independence

Paulina conducted a survey at Washington High. She asked students whether they have cable TV and whether they took a vacation last summer. She displays the results in a two-way frequency table.

two-way table with categories took vacation and cable TV
Using the table, Paulina wants to find out whether or not taking a vacation and having cable TV are independent events for this population of students.

Hint

What is the probability that a student chosen at random took a vacation last summer? What is the probability that a random student who has cable TV took a vacation last summer?

Solution

Let be the event that a student took a vacation last summer and be the event that a student has cable TV. The table shows that from a total of participants, students took a vacation last summer.

two-way table
With this information, the probability of randomly choosing a student who took a vacation can be found.
Evaluate right-hand side
Next, the probability that a random student who has cable TV took a vacation last summer will be found. The table shows that out of the students who have cable TV, took a vacation last summer.
two way table
Now, the probability of event given event can be found.
Evaluate right-hand side
Comparing the found probabilities, it can be seen that they are not equal.
This means that event a student having cable TV, affects event a student took a vacation last summer. Therefore, these events are not independent. Also, since students with cable TV are more likely to have taken a vacation last summer.
Closure

Chocolate Bar or Fruit?

At the beginning of the lesson, Zosia asked students of North High School in Honolulu whether they prefer a chocolate bar or a piece of fruit as a lunchtime snack and whether they surf or not.

surf, chocolate, and fruit
Letting be the event that a student surfs and the event that a student prefers a piece of fruit as a lunchtime snack, Zosia wants to calculate the following probabilities.

Hint

Make a two-way frequency table to display the obtained information.

Solution

A two-way frequency table can be made to organize the obtained information.

two way table

Next, the missing marginal frequencies can be calculated.

two way table

Now, two of the three missing joint frequencies can be calculated.

two way table

Finally, the last empty cell can be filled.

two way table

Now that the two-way table is complete, the desired probabilities can be found. Out of a total of students, surf and prefer fruit as a lunch snack.

two way table
With this information, and can be calculated.
Also, of the students who prefer fruit, surf. Likewise, of the students who surf, prefer fruit.
two way table
Knowing this, and can be calculated.


Loading content