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.
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.
Here, the two categories are
driver's license, both with possible answers of
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.
Totalrow and the
Totalcolumn 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.
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.
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.
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.
The total row and total column are included to write the marginal 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.
As part of a school project, Zain asked people whether they are a night owl or an early bird. Zain decided to categorize the participants by their answer and age — younger than or aged or older. They obtained the following information.
Zain made a two-way frequency table and added this information.
Start by finding the number of people aged or older who participated in the survey. To do that, calculate the difference between the grand total and the number of participants younger than
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 aged or older can be found by calculating the difference between these two values. This information can be added to the 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.
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 must be calculated. One more cell can be filled in!
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.
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.
Zain made a two-way frequency table as a part of a school project. The table categorizes the participants as
night owls or
early birds and as younger than years or aged or older.
To get a deeper understanding of the preferences of the participants, Zain wants to calculate the joint and marginal relative frequencies.
To obtain the joint and marginal relative frequencies, the joint and marginal frequencies must be divided by the grand total,
The table below shows the joint and marginal relative frequencies.
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.
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
The resulting two-way frequency table can be interpreted to obtain the following information.
To do so, Zain will use the row totals.
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
The table below shows the conditional relative frequencies.
Consider the fact that the conditional relative frequencies were found using row totals.
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
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.
taking a vacationand
having cable TVare independent events for this population of students.
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.
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.
A two-way frequency table can be made to organize the obtained information.
Next, the missing marginal frequencies can be calculated.
Now, two of the three missing joint frequencies can be calculated.
Finally, the last empty cell can be filled.
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.
With this information, and can be calculated. Also, of the students who prefer fruit, surf. Likewise, of the students who surf, prefer fruit.
Knowing this, and can be calculated.