Mathematics and Statistics · Ch 13 — Bivariate Frequency Distribution and Chi-Square Statistic
Attributes, Contingency Tables and Independence
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.
Expected Frequency Under Independence
If two attributes are independent, the frequency expected in the cell of row and column is
where is the -th row total, the -th column total, and 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 of the whole sample that falls in column should, under independence, also be the proportion of row that falls in column — giving , which is the formula above. …
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 …
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 …
The frequency a cell would hold if the two attributes were independent, , where and are the row and column total …
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 …