Linear-by-linear association test 2026-09-29
For a two-way contingency table whose row and column variables are ordinal categorical variables, assign row scores and column scores . The linear-by-linear association statistic measures the weighted covarianceAfter normalization, its square is asymptotically under independence. A signed, one-sided version tests a specified direction of ordinal association and can have greater statistical power than an omnibus independence test against a monotone alternative.
Past exam of the mathematics course of the University of Cambridge 2019 ii Paper 1 13J d Solution Created 2026-09-24 Updated 2026-10-03
Both variables are ordinal categorical variables, and the proposed alternative is directional: higher scores should tend to occur at higher prices. Assign increasing numerical scores to low, medium, high price and to poor, good, excellent quality, and use a one-sided linear-by-linear association test. Its statistic is based on the sample covariance, or equivalently the correlation, of those scores under the fixed margins.
This test uses one degree of freedom and directs its rejection region toward positive association. The four-degree-of-freedom likelihood-ratio test of independence in a contingency table spends power on every possible departure from independence, including unordered and negative patterns, so the ordered one-sided test is more powerful when the stated alternative is credible.
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 1 13J i Solution Created 2026-09-24 Updated 2026-09-29
Kilometres is an ordinal categorical variable: its five levels have a meaningful order. Treating it as an ordinary factor would use four indicator variables and hence four unrelated regression coefficients. Converting the levels to numerical scores instead imposes a single linear trend across successive mileage bands. This is more parsimonious and gives greater precision when that trend is a reasonable approximation, although it also assumes that adjacent levels are equally spaced in their effect.