Categorical variable Created 2026-09-29 Updated 2026-10-05
A categorical variable takes values in a finite or countable set of labels. A regression model usually represents an unordered categorical predictor by indicator variables relative to a reference level in a regression factor.
Past exam of the mathematics course of the University of Cambridge 2018 ii Paper 1 5J Solution Created 2026-09-24 Updated 2026-10-03
Write for the request count on day . Both fits are Poisson regression models with independentIn model 1,where the variables are indicator variables for winter, weekend, bank holiday, and low or medium pollution; non-winter weekdays that are not bank holidays and have high pollution form the baseline. Model 2 imposesretaining only winter and weekend effects.
The models are nested, and the likelihood-ratio test statistic is the decrease in residual deviance,There are three restrictions. By Wilks theorem, under this statistic is asymptotically a chi-squared distribution with three degrees of freedom. Sincewe reject model 2 at the level in favour of model 1.
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.