Use logistic regression when the response variable is binary, for example whether a lecturer missed a deadline. It relates the event's log odds to one or more predictors, producing fitted probabilities between zero and one. Exponentiating a coefficient gives an odds ratio for a specified predictor change, conditional on the other model terms. An odds ratio is not generally a ratio of probabilities; the corresponding probability change depends on the starting probability and other predictors.
Report the outcome coding, estimated associations with confidence intervals, and relevant model checks. Sparse events, complete separation and dependent observations can make ordinary estimates or inferential procedures unreliable; repeated observations may need a generalized linear mixed model. For prediction, evaluate calibration and discrimination on data not used to tune the model. An adjusted association in an observational study does not automatically identify a causal effect.
Past exam of the mathematics course of the University of Cambridge 2010 iii Paper 37 3 b Solution Created 2026-10-03 Updated 2026-10-14
Independence gives the log-likelihoodDifferentiating yields the score equationsWhen a finite maximum-likelihood estimator exists, multiplying these equations by givesThe qualification about a finite estimator matters under complete separation in logistic regression, where coefficient estimates can escape to infinity.
Past exam of the mathematics course of the University of Cambridge 2022 iii Paper 218 2 e Solution 2026-09-28
The successful hard-margin fit proves that the transformed observations are separable. This creates complete separation in unpenalized logistic regression: scaling a separating coefficient vector continually raises the likelihood, so no finite maximum-likelihood estimate exists. The nearly singular observed information produces the enormous reported standard errors.
A ridge-penalized logistic regression, or equivalently a Bayesian logistic model with a proper Gaussian prior, gives finite, stable coefficients. Firth bias reduction is another standard remedy.
Past exam of the mathematics course of the University of Cambridge 2024 iii Paper 218 4 d Solution Created 2026-09-24 Updated 2026-09-25
A binary logistic regression setsand classifies by the sign of . Its unpenalized maximum-likelihood estimator minimizes the empirical logistic lossThe plotted data are complete separation data: there is a vector with every signed margin . For every finite , increasing strictly decreases each term of , and as . No finite parameter attains zero, so the unpenalized optimization has no solution.
Adding an penalty with , constraining , or using a finite stopping rule makes the problem attain a finite approximate solution. The penalized option is preferable because cross-validation can select the strength of regularization.