Skip to content

Mathematics and Statistics · Ch 13 — Bivariate Frequency Distribution and Chi-Square Statistic

Attributes, Contingency Tables and Independence

3

Attributes, Contingency Tables and Independence

Not every characteristic can be measured as a number. Sex (male / female), literacy (literate / illiterate), or whether a customer liked a product (yes / no) are qualitative characteristics, called attributes. Each attribute sorts the units into a few mutually exclusive categories. When two attributes are recorded for the same set of units, the counts are laid out in a two-way table of frequencies called a contingency table — structurally the same as a bivariate frequency table, but with categories of attributes labelling the rows and columns instead of numerical classes.

The central question about two attributes is whether they are associated (related) or independent (unrelated). For example: is preferring a product associated with the customer's sex, or does the split of likes-to-dislikes look the same for men as for women? The tool for answering this begins by asking what the table would look like if the two attributes were perfectly independent.

Note

Expected Frequency Under Independence

If two attributes are independent, the frequency expected in the cell of row ii and column jj is

Eij=(row i total)×(column j total)N=Ri×CjNE_{ij} = \dfrac{(\text{row } i \text{ total}) \times (\text{column } j \text{ total})}{N} = \dfrac{R_i \times C_j}{N}

where RiR_i is the ii-th row total, CjC_j the jj-th column total, and NN the grand total.

The logic is proportional: if an attribute's categories are unrelated to the other's, then each row should split across the columns in the same proportion as the overall column totals do. So the proportion Cj/NC_j / N of the whole sample that falls in column jj should, under independence, also be the proportion of row ii that falls in column jj — giving Eij=Ri×(Cj/N)E_{ij} = R_i \times (C_j / N), which is the formula above. …

Definition 1Attribute

A qualitative (non-numerical) characteristic that sorts units into categories, e.g. sex (male/female) or literacy (literate/illiterate). Two attributes recorded together are d …

Definition 2Contingency Table

A two-way frequency table whose rows and columns are the categories of two attributes and whose cells count the units in each combination of categories; the observed cel …

Definition 3Expected Frequency

The frequency a cell would hold if the two attributes were independent, Eij=RiCj/NE_{ij} = R_i C_j / N, where RiR_i and CjC_j are the row and column total …

Definition 4Independence of Attributes

Two attributes are independent when the category-split of one does not depend on the category of the other; equivalently, every observed frequency equals its expected …