topic badge

Honors: 9.045 Two-way relative frequency tables

Lesson

Concept summary

The joint relative frequency is the ratio of a joint frequency to the total number of data points and the marginal relative frequency is the ratio of the marginal frequency to the total number of data points. When these relative frequencies are displayed in a two-way table we call it a two-way relative frequency table.

A two way relative frequency table with 3 columns titled Child, Adult, and Total, and 4 rows titled Drawing, Painting, Graphics, and Total. The data is as follows. Within Drawing and Child is 22%, Adult is 8%, Total is 30%; within Painting: Child is 18%, Adult is 7%, Total is 25%; withing Graphics: Child is 9%, Adult is 36%, Total is 45%; within Total: Child is 49%, Adult is 51%, Total is 100%. Below the table is a rightwards arrow labeled Add across which starts at the Child column and ends at the Total column. On the right of the table is a downwards arrow labeled Add down which starts at the Drawing row and ends at the Total row. The values from the Child and Adult column, except the ones from the Total row, are labeled Joint relative frequencies. The values from the Total column and Total row, except for the last cell which contains 100%, are labeled Marginal relative frequencies.

A two-way relative frequency table shows the proportion or percentage of each entry out of the total number of data points.

Conditional relative frequency is the ratio of a joint relative frequency to a marginal relative frequency.

Row-relative frequency

A relative frequency table in which all entries are divided by their row total

Column-relative frequency

A relative frequency table in which all entries are divided by their column total

ChildAdult
Drawing44.9\%17.3\%
Painting36.7\%13.5\%
Graphics18.4\%69.2\%
Total100\%100\%

We can represent a row-conditional relative or column-conditional relative frequency table as a segmented bar chart for a more visual display of the same information.

A segmented bar graph showing percentages on the vertical axis with a scale from 0% to 100% in steps of 5%. The horizontal axis is labeled with 2 types of person: Child and Adult. On top of the graph is a legend showing 3 categories, each represented by a color: light blue for Graphics, orange for Painting, and dark blue for Drawing. A vertical bar which is divided into 3 unequal parts, is shown for each type of person: on the Child bar: light blue, from 0% mark to just below the 45% mark; orange, from just below the 45% mark to just above the 80% mark, and dark blue, from just above the 80% mark to 100% mark; on the Adult bar: light blue, from 0% mark to halfway between the 15% and 20% mark; orange, from halfway between the 15% and 20% mark to just above the 30% mark, and dark blue, from just above the 30% mark to 100% mark.

Using a tree diagram or relative frequency table, we can look at the different proportions of a population that test positive and negative for a characteristic or condition compared to those who actually have the characteristic or condition. In particular, we can identify the likelihood of a false positive or false negative.

False positive

A test result which incorrectly says that a particular condition or attribute is present, when it is should have said it was negative

False negative

A test result which incorrectly says that a particular condition or attribute is absent, when it is should have said it was positive

Worked examples

Example 1

This two-way table represents survey results from a sample of college students regarding their preferred place to study:

LibraryStudent UnionCoffee ShopHomeTotal
Sociology Majors43215922145
Math Majors34161541106
Total77377463251
a

Construct the relative frequency table for the data.

Approach

Relative frequency is found by dividing each entry in the table by the total population, which in this case is 251 students.

Solution

LibraryStudent UnionCoffee ShopHomeTotal
Sociology Majors{\frac{43}{251}=17\%}\frac{21}{251}=8\%\frac{59}{251}=24\%\frac{22}{251}=9\%\frac{145}{251}=58\%
Math Majors\frac{34}{251}=14\%\frac{16}{251}=6\%\frac{15}{251}=6\%{\frac{41}{251}=16\%}\frac{106}{251}=42\%
Total\frac{77}{251}=31\%\frac{37}{251}=15\%\frac{74}{251}=29\%\frac{63}{251}=25\%{\frac{251}{251}=100\%}

Reflection

The joint relative frequencies may not appear to equal the marginal relative frequencies due to rounding error.

b

Construct the row-relative frequency table for the data.

Approach

Row-relative frequency is a conditional frequency found by dividing each entry in the table by its row marginal frequency.

Solution

LibraryStudent UnionCoffee ShopHomeTotal
Sociology Majors{\frac{43}{145}=30\%}\frac{21}{145}=14\%\frac{59}{145}=24\%{\frac{22}{145}=22\%}{\frac{145}{145}=100\%}
Math Majors\frac{34}{106}=32\%\frac{16}{106}=15\%\frac{15}{106}=14\%\frac{41}{106}=39\%\frac{106}{106}=100\%
Total\frac{77}{251}=31\%\frac{37}{251}=15\%\frac{74}{251}=29\%\frac{63}{251}=25\%\frac{251}{251}=100\%

Reflection

In row-relative frequency tables the final column will always be 100\%.

c

Construct the column-relative frequency table for the data.

Approach

Column-relative frequency is a conditional frequency found by dividing each entry in the table by its column marginal frequency.

Solution

LibraryStudent UnionCoffee ShopHomeTotal
Sociology Majors\frac{43}{77}=56\%\frac{21}{37}=57\%\frac{59}{74}=80\%\frac{22}{63}=35\%\frac{145}{251}=58\%
Math Majors\frac{34}{77}=44\%\frac{16}{37}=43\%\frac{15}{74}=20\%\frac{41}{63}=65\%\frac{106}{251}=42\%
Total{\frac{77}{77}=100\%}\frac{37}{37}=100\%\frac{74}{74}=100\%{\frac{63}{63}=100\%}{\frac{251}{251}=100\%}

Reflection

In column-relative frequency tables the final column will always be 100\%.

Example 2

This two-way table represents the number of traffic violations in Portland, Oregon during the past three weeks:

SpeedingTexting While DrivingTotal
Teenage Drivers168096
Adult Drivers491564
Total6595160
a

Determine which traffic violation is committed most by teenage drivers and what proportion of the tickets for teenagers were of that type.

Approach

Teenage drivers represents a row category of data so we need to divide the joint frequencies in the first row by the marginal frequency of the first row. This is called row-relative frequency.

Solution

Speeding violations represent \frac{16}{96} \approx 17\% of teenage traffic violations and texting while driving represents \frac{80}{96} \approx = 83\% of teenage traffic violations. Texting while driving is the most common violation committed by teenage drivers.

Reflection

Carefully consider whether the question is answered by a relative frequency, row-relative frequency, or column-relative frequency before answering.

b

Find the percentage of all speeding violations that are commited by adult drivers.

Approach

Speeding violations represent a column category of data so we need to divide the joint frequency of an adult committing a speeding violation by the marginal frequency of speeding. This is called the column-relative frequency.

Solution

Adults commit \frac{49}{65} \approx 75\% of speeding violations.

c

Explain whether or not there is a relationship between age and type of traffic violation. Justify your conclusion.

Approach

We can use the row-conditional or column-conditional relative frequency tables to help with this. However, a segemented bar chart can help us to justify in a more visual way.

Solution

There is a relationship between age and traffic violation. We can see that in both the row-relative and column-relative frequency tables that the values for the same variable are quite different. However, we can see this more easily in the two segmented bar charts as we can see that the the proportions are significantly different for the different ages and violations.

SpeedingTexting While DrivingTotal
Teenage Drivers16.7\%83.3\%100\%
Adult Drivers34.0\%66\%100\%
A segmented bar graph showing percentages on the vertical axis with a scale from 0% to 100% in steps of 5%. The horizontal axis is labeled with 2 types of drivers: Teenage Drivers and Adult Drivers. On top of the graph is a legend showing 2 types of violation, each represented by a color: orange for Texting while driving, and blue for Speeding. A vertical bar which is divided into 2 unequal parts, is shown for each type of person: on the Teenage Drivers bar: Blue, from 0% mark to just above the 15% mark; Orange, from just above the 15% mark to 100% mark; on the Adult Drivers bar: Blue, from 0% mark to just below the 35% mark; Orange, from just below the 35% mark to 100% mark.
SpeedingTexting While Driving
Teenage Drivers24.6\%45.7\%
Adult Drivers75.4\%54.3\%
Total100\%100\%
A segmented bar graph showing percentages on the vertical axis with a scale from 0% to 100% in steps of 5%. The horizontal axis is labeled with 2 types of traffic violations: Speeding and Texting while driving. On top of the graph is a legend showing 2 types of drivers, each represented by a color: orange for Adult Drivers, and blue for Teenage Drivers. A vertical bar which is divided into 2 unequal parts, is shown for each type of traffic violation: on the Speeding bar: Blue, from 0% mark to just below the 25% mark; Orange, from just below the 25% mark to 100% mark; on the Texting while driving bar: Blue, from 0% mark to just above the 45% mark; Orange, from just above the 45% mark to 100% mark.

We can see that teenagers are more likely to be ticketed for texting than speeding, and adults are more likely to be ticketed for speeding than texting.

Outcomes

MA.912.DP.1.1

Given a set of data, select an appropriate method to represent the data, depending on whether it is numerical or categorical data and on whether it is univariate or bivariate.

MA.912.DP.3.1

Construct a two-way frequency table summarizing bivariate categorical data. Interpret joint and marginal frequencies and determine possible associations in terms of a real-world context.

MA.912.DP.3.2

Given marginal and conditional relative frequencies, construct a two-way relative frequency table summarizing categorical bivariate data.

MA.912.DP.3.3

Given a two-way relative frequency table or segmented bar graph summarizing categorical bivariate data, interpret joint, marginal and conditional relative frequencies in terms of a real-world context.

What is Mathspace

About Mathspace