STAT6135 Chap.6 Binary Logistic Regression
Binary Logistic Regression
Binary Logistic Regression models a probability through its log odds. The response is Bernoulli, the canonical link is the logit, and the inverse link turns the linear predictor back into a probability between zero and one. A coefficient is a change in log odds, its exponential is an odds ratio, and a fitted probability requires every covariate to be set to a value.
The worksheet on GP visits from the British Household Panel Survey reads the female coefficient on all three scales and attaches a Wald interval to the odds ratio. Model building uses likelihood ratio tests between nested models, especially for factors with several dummies, and AIC for models that are not nested, such as health status coded as a numeric score against the same variable coded as dummies.
With ungrouped data the residual deviance is not a goodness-of-fit test, but grouped data with covariate patterns restore that use. Predictive performance is summarised with pseudo R squared measures, the ROC curve and its area, sensitivity and specificity at a chosen cut-off.
The chapter also covers grouped binomial responses with totals, interactions between predictors and the probit and linear probability links, noting that with one binary covariate the logit and probit fits give the same fitted probabilities.
What this chapter covers
- 01
Logit link and inverse logit
- 02
Reading coefficients as log odds and odds ratios
- 03
Fitted probabilities at stated covariate values
- 04
Wald intervals and likelihood ratio tests
- 05
Ungrouped versus grouped binary data
- 06
Pseudo R squared, ROC curves and classification
- 07
Probit and linear probability links
Worked example · free
Test a factor and interpret one of its levels
- 2The factor adds two dummies, so the likelihood ratio statistic 412.6 − 398.1 = 14.5 has 2 degrees of freedom.
- 1The 5% critical value of chi-squared on 2 df is 5.99; 14.5 exceeds it, so the factor is kept.
- 2The odds ratio for level 3 against level 1 is e^−0.70 = 0.50.
- 1Holding the other predictors fixed, level 3 has about half the odds of the outcome compared with level 1.
Key terms
- Logit
- The logarithm of the odds, log[π/(1 − π)], used as the canonical link for binary data.
- Wald interval
- An interval formed as the estimate plus or minus 1.96 standard errors, then transformed if needed.
- Probit link
- A binary link that equates the inverse standard normal distribution function of the probability with the linear predictor.
- Sensitivity
- The proportion of true positive cases that a classification rule correctly identifies at a chosen cut-off.
Binary Logistic Regression FAQ
What is the difference between an odds ratio and a relative probability?
An odds ratio compares odds, π/(1 − π), between two groups. A probability ratio compares the probabilities themselves. They are close only when the outcome is rare, so an odds ratio of 2.3 can correspond to a much smaller ratio of probabilities.
Why can the residual deviance not test fit with ungrouped data?
With one binary observation per row the number of parameters in the saturated model grows with the sample size, so the chi-squared approximation does not hold. Differences in deviance between nested models remain valid, and grouping the data by covariate pattern restores a usable goodness-of-fit test.
When would I choose a probit model instead of a logit?
Both links give S-shaped curves and usually similar fitted probabilities. The logit is preferred when you want coefficients that are log odds ratios. A probit may be used when a latent normal variable motivates the model, and the two can be compared by AIC because they are not nested.
Exam move
Drill the conversion from fitted logit to probability until it is automatic, and practise it for several covariate profiles from one model. For each coefficient in the binary logistic worksheet output, write the log-odds, odds and probability readings. Then practise model selection: likelihood ratio tests for factors and interactions, AIC for competing codings, and the grouped-data version of the deviance test.
Finish by computing sensitivity and specificity at two different cut-offs to see the trade-off. For every interpretation you write, state the covariate profile used, because a probability quoted without one cannot be checked by a marker.
Working through Binary Logistic Regression in STAT6135? Sia is AskSia’s AI Statistics tutor — ask any STAT6135 Binary Logistic Regression question and get a clear, step-by-step explanation grounded in how STAT6135 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.