Tutorials › Introduction to Statistics › Anatomy of a Two-Way Table

Two-Way Tables and Association · Tutorial 200 of 996

Anatomy of a Two-Way Table

Learn to locate and interpret each part of a two-way table and verify its totals using campus survey examples.

Beginner 9 min read

What You'll Learn

  • Identify the row and column categories that define each cell.
  • Explain what a cell count represents in a campus survey.
  • Find row totals, column totals, and the grand total.
  • Check a table by summing its cells in two different ways.
  • Distinguish category counts from the totals displayed at the edges of a table.

Reading the Structure of a Two-Way Table

A survey question often records two categorical characteristics for each person. For example, a campus survey might record a student's class year and usual study location. A two-way table organizes the resulting counts so that one characteristic labels the rows and the other labels the columns. Each number inside the table summarizes how many respondents fall into one combination of categories.

Reading the table accurately starts with its layout: identify what the rows represent, what the columns represent, and then locate the count where a particular row and column meet. The numbers at the edges summarize the interior counts. They are useful for checking the table and answering questions about how many respondents are in a particular row or column.

Definition: A two-way table displays counts for two categorical variables. The interior of the table consists of cells, each formed by the intersection of one row category and one column category. A row total is the sum of the counts across a row; a column total is the sum of the counts down a column. The grand total is the sum of all interior cell counts, and gives the total number of recorded responses represented in the table.

For a cell count to have the straightforward interpretation used here, each person represented in the table should contribute to exactly one cell: the person has one recorded category for the row variable and one for the column variable. The table should also make clear whether it includes all respondents or only those with complete answers to both questions. If some answers are missing, the reported grand total may be smaller than the number of people invited to participate.

Cells: Counts for Category Combinations

A cell is not a category by itself. It represents a combination of one row category and one column category. Read a cell by naming both categories, then stating the count in context. For example, a count at the intersection of “first-year” and “library” means the number of surveyed students who are both first-year students and report the library as their usual study location.

The row and column labels matter: the number alone does not tell you which combination it describes. Before interpreting any cell, follow its row label across and its column label down, or vice versa, until they meet. The table below uses hypothetical responses from 110 students.

Worked Example: Finding and Interpreting a Cell

A hypothetical campus survey asks 110 students for their class year and usual study location. The recorded counts are displayed below. Find the count for upper-year students who usually study at home, and explain what it represents.

Class yearLibraryDormHomeRow total
First-year24161050
Upper-year30121860
Column total542828110

Find the “Upper-year” row and the “Home” column. Their intersection contains 18. Thus, 18 of the surveyed students were upper-year students who reported usually studying at home. This is a count of respondents, not a percentage.

The cell count can be checked against its row and column totals. The upper-year row contains 30 library responses, 12 dorm responses, and 18 home responses, which sum to 60. The home column contains 10 first-year and 18 upper-year responses, which sum to 28.

A cell count describes respondents who satisfy both category labels together. It does not, by itself, describe the total number in the row category or the total number in the column category. Those questions require the corresponding edge totals.

Row Totals and Column Totals

A row total summarizes all cells across one row. In the first row of the example, the 50 first-year students are distributed among the three listed study locations: 24 library, 16 dorm, and 10 home. Adding those counts gives the row total:

$$ 24+16+10=50 $$

A column total summarizes all cells down one column. In the library column, 24 first-year students and 30 upper-year students reported the library as their usual study location, so the column total is \(24+30=54\). Row totals answer “how many are in this row category?” and column totals answer “how many are in this column category?” In either case, the answer concerns the respondents represented by the table.

The grand total appears where the row-total and column-total summaries meet. It represents all the responses counted in the table. In the example, adding the row totals gives \(50+60=110\), while adding the column totals gives \(54+28+28=110\). Both calculations should agree with the total obtained by adding every interior cell.

Worked Example: Calculating Edge Totals and the Grand Total

In another hypothetical campus survey, students report whether they live on campus and their usual way of getting to class. Use the interior counts to calculate each row total, each column total, and the grand total.

ResidenceWalkBikeBusRow total
On campus381210?
Off campus81428?
Column total????

Row totals. Add across each row. For on-campus students, \(38+12+10=60\). For off-campus students, \(8+14+28=50\).

Column totals. Add down each column. The walk total is \(38+8=46\); the bike total is \(12+14=26\); and the bus total is \(10+28=38\).

Grand total. Adding the row totals gives \(60+50=110\). As a check, adding the column totals gives \(46+26+38=110\). Therefore the completed table has a grand total of 110 surveyed students.

Each number has a specific interpretation. For instance, 26 is the number of surveyed students who reported biking to class, regardless of whether they live on or off campus. The 60 is the number of surveyed on-campus students across all three travel categories. The grand total, 110, is the total number represented in the table.

Why the Two Ways of Adding Must Agree

A useful check is that the grand total found from the row totals must equal the grand total found from the column totals. This is not a coincidence. Each respondent is counted once in one interior cell, and thus once in one row total and once in one column total.

For a table with \(r\) rows and \(c\) columns of interior counts, write the count in row \(i\) and column \(j\) as \(n_{ij}\). The row total \(R_i\) is the sum of the counts across row \(i\), and the column total \(C_j\) is the sum down column \(j\). Both ways of adding count every interior cell once:

$$ \sum_{i=1}^{r} R_i = \sum_{i=1}^{r}\sum_{j=1}^{c} n_{ij} = \sum_{j=1}^{c} C_j = N $$

Here \(N\) is the grand total. The middle expression makes the reason explicit: first add across each row and then combine rows, or first add down each column and then combine columns. Either process includes exactly the same cell counts. This check assumes the displayed cells cover the responses being summarized and that no respondent is counted in multiple cells.

If the two totals do not agree, do not interpret the table as though it were consistent. Recheck the arithmetic and confirm that every displayed row and column is included. A mismatch can point to an addition error, an omitted cell, or totals copied from a different version of the data.

Worked Example: Checking a Completed Table

A hypothetical survey of students records preferred tutoring format and course load. Suppose the table is reported as follows. Verify the totals and interpret the grand total.

Course loadIn personOnlineRow total
Part time421860
Full time253560
Column total6753120

Check the row totals first. The part-time row gives \(42+18=60\), and the full-time row gives \(25+35=60\). Then check the column totals: \(42+25=67\) for in-person tutoring, and \(18+35=53\) for online tutoring.

The grand total from the two row totals is \(60+60=120\). From the column totals it is \(67+53=120\). The interior cells also sum to \(42+18+25+35=120\). All three calculations agree, so the displayed counts are internally consistent. The grand total means that 120 student responses are represented in this table.

Reading Totals Carefully

Totals are counts, not labels for additional response categories. The “On campus” row total in the second example is 60 because it combines the three travel categories for respondents in that row. It does not describe a separate fourth travel choice. Similarly, the “Bus” column total combines the residence categories; it is not another residence category.

A total also answers a different question from an interior cell. In the tutoring table, 42 counts part-time students who prefer in-person tutoring. The row total of 60 counts all surveyed part-time students in either tutoring category. The column total of 67 counts all surveyed students who prefer in-person tutoring, regardless of course load. The grand total of 120 counts all students represented.

Keep the wording of an interpretation aligned with the part of the table being read. For an interior cell, name both category labels. For a row total, name the row category and say it combines the table's column categories. For a column total, name the column category and say it combines the row categories. For the grand total, state how many responses are represented overall.

Common Mistake: Treating a Total as a Cell

A common error is to describe a row total as though it belonged to one particular column category. For example, seeing 60 at the end of the “On campus” row and claiming “60 on-campus students walk to class” would be incorrect. That 60 includes walkers, cyclists, and students who take the bus.

The correction is to trace the number's position before interpreting it. A number inside the table is a cell count and corresponds to one row-and-column combination. A number at the end of a row combines the interior cells in that row; a number at the bottom of a column combines the cells in that column. The grand total combines all interior cells.

Another tempting shortcut is to assume a total equals the number of people originally contacted. It equals the number represented by the recorded table, which may be less if some people did not respond or did not answer both questions. Check the survey description before making a claim about who is included.

Key takeaway: Read an interior cell using both its row and column labels. Add across a row for its row total, down a column for its column total, and across all cells for the grand total. The row totals, column totals, and interior cells must all lead to the same grand total.

Check Your Understanding

Use the table structure and interpretations from this tutorial to answer the questions.

  1. In a table of class year by usual study location, what two category labels do you need to identify before interpreting an interior cell?
  2. A row contains counts 17, 23, and 10. Calculate the row total and state what it represents in a survey.
  3. A column contains counts 14, 9, and 27. Calculate its column total and describe what that total combines.
  4. A table's row totals sum to 96, but its column totals sum to 94. What should you do before interpreting the totals?
  5. Explain why a row total is not an additional response category.