University of Sydney · FACULTY OF STATISTICS

DATA4207 · Data Analysis in the Social Sciences

- one subject, every graph, every model, every mark
Statistics14 Chapters9-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 4 of 13 · DATA4207

Surveys, Probability and Logistic Regression

Week 4 covers the design and hazards of surveys — question wording, self-report bias, population weights and Likert scales — then introduces probability, likelihood and logistic regression for discrete outcomes such as vote choice. The key move is the leap from a linear to a logistic model and estimating predicted probabilities. Logistic regression is one of the most common models students choose for the group projects and the individual Research Project.

In this chapter

What this chapter covers

  • 01Survey design pipeline: define the population / sampling frame, sample randomly, ensure question quality
  • 02Probability sampling: simple random, stratified, cluster; non-response and selection bias; population weights
  • 03Likert scales and treating ordered categories as ordinal
  • 04When linear regression is inappropriate: discrete/binary/count outcomes, or predictions outside 0-1
  • 05Logistic regression: logit(p) = ln(p/(1 − p)) = β₀ + β₁X, an S-curve bounded in [0,1]
  • 06Inverse-logit for predicted probabilities: p = exp(η)/(1 + exp(η)); odds ratio OR = exp(β)
  • 07Fitting with glm(y ~ x, family = binomial(link = 'logit')); reading residual vs null deviance
  • 08Assumptions of logistic regression: linearity in the log-odds, independence, no multicollinearity, large sample
Worked example · free

Predicted probabilities from a logistic model

Q [4 marks]. A binary logistic regression predicts whether a respondent turns out to vote (1 = voted). The fitted intercept is 0.40 and the coefficient on standardised income (z.income, centred and divided by two SDs) is 0.68. Give the predicted probability of voting at z.income = −1, 0 and +1, and the odds ratio for income. (4 marks; invented numbers.)
  • +1Form the linear predictor on the log-odds scale: η = β₀ + β₁·z.income = 0.40 + 0.68·z.income.
  • +1At z.income = −1: η = 0.40 − 0.68 = −0.28, so p = exp(−0.28)/(1 + exp(−0.28)) = 0.756/1.756 ≈ 0.43.
  • +1At z.income = 0: η = 0.40, p = exp(0.40)/(1 + exp(0.40)) = 1.492/2.492 ≈ 0.60. At z.income = +1: η = 1.08, p = exp(1.08)/(1 + exp(1.08)) = 2.945/3.945 ≈ 0.75.
  • +1Odds ratio: OR = exp(β₁) = exp(0.68) ≈ 1.97, so the odds of voting almost double per one-unit (two-SD) rise in income. Note the fixed log-odds coefficient maps to a non-linear change in probability (0.43 → 0.60 → 0.75).
Predicted probabilities ≈ 0.43, 0.60, 0.75 at z.income = −1, 0, +1; odds ratio ≈ 1.97. The teaching point is that a single log-odds coefficient produces non-linear jumps in probability, so always convert to predicted probabilities (or an odds ratio) before writing about the effect.
Sia tip — Report probabilities or odds ratios in a write-up, not raw log-odds — readers cannot interpret log-odds directly. Bring your own glm output and ask Sia to check your inverse-logit and odds-ratio arithmetic, step by step; it explains the method and does not do your graded assessment.
Glossary

Key terms

Logistic regression
A generalised linear model for a binary or categorical outcome, fit with glm(..., family = binomial(link = 'logit')). It models the log-odds as linear in the predictors and bounds the fitted probability within [0,1] via an S-curve.
Logit / log-odds
The link function logit(p) = ln(p/(1 − p)), which maps a probability in (0,1) onto the whole real line. Logistic coefficients live on this scale, so they are read for sign and relative size, not as probabilities.
Inverse-logit
The back-transform p = exp(η)/(1 + exp(η)) that turns a log-odds linear predictor η into a predicted probability. In R, arm::invlogit().
Odds ratio
OR = exp(β): the multiplicative change in the odds of the outcome per one-unit increase in the predictor, all else equal. For example exp(0.68) ≈ 1.97 means odds about 1.97 times higher.
Deviance (null vs residual)
The logistic analogue of unexplained variation. If the null deviance minus the residual deviance exceeds roughly the number of parameters, the predictors are adding real signal.
Population weight
A per-respondent weight that corrects a survey sample toward known population demographics (e.g. Census counts), reducing non-response and selection bias when you compute shares or fit models.
FAQ

Surveys, Probability and Logistic Regression FAQ

When should I use logistic instead of linear regression?

Use logistic regression when the outcome is binary (yes/no, 0/1) or categorical — for example whether someone voted, reoffended, or bought a product. Linear regression on a binary outcome can predict impossible values outside 0-1 and misstates the relationship; the logistic S-curve keeps predictions in [0,1] and models the log-odds instead.

Why can't I read logistic coefficients directly?

Because they are on the log-odds scale, where a fixed coefficient corresponds to a non-linear change in probability. To interpret them, either exponentiate to an odds ratio (exp(β)) or use the inverse-logit to compute predicted probabilities at chosen predictor values, which is what a reader can actually understand.

What makes a survey question or sample biased?

Leading or confusing wording introduces measurement error; non-response bias arises when respondents differ systematically from non-respondents; and selection bias arises when some people are more likely to be sampled at all (phone/internet access, mobility). Even a rigorous probability sample is rarely perfectly representative, which is why population weights are used to correct toward the known population.

Can AI help me with logistic regression in DATA4207?

Yes, as a study aid. Sia can explain the logit link, the inverse-logit, odds ratios and deviance, and check your predicted-probability calculations from glm output step by step. It teaches the method and checks your reasoning; it does not complete graded work, and University of Sydney academic-integrity rules apply — confirm on Canvas whether AI is allowed for a task.

Study strategy

Assessment move

Drill the linear-to-logistic translation until it is automatic: given glm output, form the linear predictor, apply the inverse-logit at a few predictor values, and convert coefficients to odds ratios. Practise saying why linear regression fails for a binary outcome and how the logit link fixes it. On the survey side, learn to name the sampling method, the likely biases, and how weights correct them — the group projects and the individual report often use survey data where these judgements earn marks. Fit a logistic model in R on a real binary outcome and read residual-vs-null deviance to see whether your predictors help. Rehearse writing effects as probabilities or odds ratios, never raw log-odds, and confirm assessment details on Canvas.

Working through Surveys, Probability and Logistic Regression in DATA4207? Sia is AskSia’s AI Statistics tutor — ask any DATA4207 Surveys, Probability and Logistic Regression question and get a clear, step-by-step explanation grounded in how DATA4207 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 14 of your University of Sydney subjects - and 1,000+ Bibles across every Australian university.
Sia - your DATA4207 tutor, unlimited, worked the way the exam marks it
The full 9-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
$25/ month
30-day money-back · cancel in one tap · how it works
Unlock the full DATA4207 Bible + 14 University of Sydney subjects解锁完整 DATA4207 Bible + University of Sydney 14 门科目
$25/mo