Study guide: Bivariate Analysis with Contingency Tables

Course Outline

  1. Contingency Table Structure
  2. Marginal and Conditional Distributions
  3. Percentages and Independence
  4. Visualizing Conditional Distributions
  5. Measuring Categorical Association
  6. Lurking Variables and Simpson’s Paradox

1. Contingency Table Structure

Key Concepts & Definitions

  • Contingency table: Organized counts for two categorical variables, with the categories of one variable in rows and those of the other in columns; each cell counts observations with that combination of categories.

Essential Points

  • In the course’s contingency-table convention, Variable 1 is placed in rows and Variable 2 in columns.

2. Marginal and Conditional Distributions

Key Concepts & Definitions

  • Marginal distribution: The frequency distribution of one variable considered by itself, shown in the corresponding margin of a contingency table.
  • Conditional distribution: The distribution of one variable within each category of the other variable, as shown by the appropriate rows or columns of a contingency table.

Essential Points

  • In the sex-and-smoking example, the columns show the conditional distribution of smoking status within each sex category, while the rows show sex distributions within smoking categories.

Memory Hook

Margins describe each variable alone; conditional distributions compare one variable within categories of the other.

3. Percentages and Independence

Key Concepts & Definitions

  • Independence: Two categorical variables are independent when the distribution of one variable is the same across every category of the other variable.

★ Must-know

  • A table of overall relative frequencies is obtained by dividing every cell count by the total count and expressing the result as a percentage.

  • Column percentages are obtained by dividing each cell count by its column total, while row percentages are obtained by dividing each cell count by its row total.

Further detail

📌 The phrase “percent of everyone” refers to a cell’s share of the table total, whereas “percent of people with a specified characteristic” uses the total for that characteristic as its denominator.

  • In the sex-and-smoking example, about three quarters of both female and male students are non-smokers, so the variables appear almost independent.

4. Visualizing Conditional Distributions

★ Must-know

  • A 100% segmented bar chart displays conditional distributions by giving each category of the first variable a bar totaling 100%, then dividing that bar into segments for categories of the second variable.

Further detail

  • Similar-looking bars in a 100% segmented chart indicate similar conditional distributions and support a conclusion of approximate independence.

  • Separate pie charts can also display conditional distributions, and similar pie charts support a conclusion of approximate independence.

  • For tattoo status and Hepatitis C, about 33% of people tattooed at a commercial parlor had Hepatitis C, compared with 3.5% of people with no tattoo, indicating that the variables are not independent.

5. Measuring Categorical Association

Key Concepts & Definitions

  • Chi-squared statistic: A measure of association comparing observed contingency-table counts with counts expected if the variables were independent.
  • Cramér’s V: A coefficient derived from the chi-squared statistic that measures association on a scale from 0 for no association to 1 for perfect association.

★ Must-know

📐 Formula - The expected count in row i and column j under independence is Eij=RiCjnE_{ij}=\frac{R_iC_j}{n}, where RiR_i is the row total, CjC_j is the column total, and nn is the sample size.

📐 Formula - The chi-squared statistic is χ2=∑i∑j(Oij−Eij)2Eij\chi^2=\sum_i\sum_j\frac{(O_{ij}-E_{ij})^2}{E_{ij}}, where OijO_{ij} and EijE_{ij} are the observed and expected counts in cell i,j.

Further detail

  • Under total independence the chi-squared statistic is zero; the sex-and-smoking example gives χ2=0.004523\chi^2=0.004523, indicating almost no dependence.

📐 Formula - Cramér’s V is calculated as V=χ2nmin⁡(R−1,C−1)V=\sqrt{\frac{\chi^2}{n\min(R-1,C-1)}}, where R and C are the numbers of rows and columns and n is the sample size.

  • The chi-squared statistic varies with sample size and with the number of rows and columns, so its magnitude alone is difficult to use to assess association strength.

  • For sex and smoking, Cramér’s V is 0.0015, indicating a very weak association; for tattoo origin and Hepatitis C, it is 0.3, which the course describes as low dependence.

6. Lurking Variables and Simpson’s Paradox

Key Concepts & Definitions

  • Lurking variable: A third variable used to divide observations into groups when a relationship between two variables changes or disappears after the groups are combined.
  • Simpson’s paradox: A statistical situation in which a trend or relationship observed within multiple groups disappears when the groups are combined according to a third variable.

Essential Points

  • In the airline-arrivals example, the overall comparison makes airline and on-time arrival appear almost independent, but comparisons by destination show clearer differences; destination is the lurking variable.
  • In the airline-arrivals example, the course concludes that US Airways is more likely to arrive on time regardless of destination.

Memory Hook

A lurking variable changes the group mix, so a within-group trend can disappear when groups are combined.

Test yourself

Take a 15-question practice quiz on Bivariate Analysis with Contingency Tables, with every answer explained.

1. A researcher records each customer's preferred payment method and membership tier. In a contingency table, what does the cell at the intersection of “card” and “premium” represent?

2. A table follows the convention that Variable 1 is shown in rows and Variable 2 in columns. If Variable 1 is region and Variable 2 is product type, where should product type appear?

Take the quiz →

Study with flashcards

Memorize the key concepts of Bivariate Analysis with Contingency Tables with 36 flashcards.

What does a contingency table organize?

Counts for two categorical variables.

What does each cell in a contingency table count?

Observations with a particular combination of categories.

What does a marginal distribution show about a variable in a contingency table?

Its frequency distribution considered by itself.

See the flashcards →

Related classes

Make your own study guides

Upload your class notes and Revizly writes a study guide, a quiz and flashcards in about a minute.

Study guide maker