Past exam of the mathematics course of the University of Cambridge 2002 iii Paper 36 2 i Solution Created 2026-10-03 Updated 2026-10-14
For logistic regression, set and . Its Bernoulli log-likelihood, score function and Fisher information arewhere . Solve by Fisher scoring or iteratively reweighted least squares. One scoring step isEquivalently regress the working response on using weights . Iterate until the likelihood and coefficients stabilize, with rank and convergence checks. Separation in logistic regression can prevent a finite maximum: if a predictor direction strictly separates the zeros and ones, moving indefinitely along it improves the likelihood rather than producing a finite root.
Under the unrestricted model, each individual probability is estimated independently as . Every observed binary outcome then has probability one, so, using boundary limits,The resulting residual deviance is . It is a legitimate likelihood contrast and can be used to compare fitted models. However, individual Bernoulli deviance need not have a chi-squared calibration: the saturated model has one boundary-valued parameter for each single observation, and its dimension grows with . The fixed-dimensional regularity behind Wilks theorem does not justify a reference here.
For a concrete demonstration, let the true model contain only an intercept and have success probability . Its fitted probability is , andwhereas a variable divided by converges to one. Thus treating the raw Bernoulli residual deviance as an ordinary absolute goodness-of-fit statistic can reject a correct model systematically. In contrast, deviance differences between fixed-dimensional nested logistic models have their usual asymptotic chi-squared reference under the relevant regularity assumptions. For absolute fit use meaningful replicated covariate groups and grouped-binomial logistic regression, or assess residual patterns and prediction on held-out data; a model-specific parametric bootstrap can calibrate a chosen statistic.