University of Southampton · FACULTY OF STATISTICS

STAT6135 Chap.6 Binary Logistic Regression

- one subject, every graph, every model, every mark
7 Chapters4-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 6 of 9 · STAT6135

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.

In this chapter

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

Q [6 marks]. Adding a three-level factor to a logistic model lowers the deviance from 412.6 to 398.1. The coefficient for level 3 against level 1 is −0.70. Test the factor at the 5% level and interpret the level 3 coefficient. The marks shown are an AskSia practice allocation, not a published university marking scheme.
Two fitted curves from an illustrative model with logit −3.2 + 0.04x + 0.9d: the binary predictor shifts the whole S-curve sideways, which moves the probabilityTwo fitted curves from an illustrative model with logit −3.2 + 0.04x + 0.9d: the binary predictor shifts the whole S-curve sideways, which moves the probability at x = 50 from 0.231 to 0.426.0.2310.426d = 1d = 00.51continuous predictor xfitted probability π
Two fitted curves from an illustrative model with logit −3.2 + 0.04x + 0.9d: the binary predictor shifts the whole S-curve sideways, which moves the probability at x = 50 from 0.231 to 0.426.
  • 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.
The factor is significant (14.5 on 2 df), and level 3 roughly halves the odds relative to level 1. The weighting shown is an AskSia practice allocation only.
Sia tip — Count the degrees of freedom from the number of dummies the factor adds, not from the number of levels it has.
Glossary

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.
FAQ

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.

Study strategy

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.

A+Everything unlocked
Unlocks this Bible + all 8 of your subjects at University of Southampton, plus 1,000+ more Bibles across the AskSia library.
Sia - your STAT6135 tutor, unlimited, worked the way the exam marks it
The full 4-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works