Many outcomes are yes or no: owns a house, joins the labour force, defaults on a loan. A regression of a 0/1 variable on income is a model of a probability, and a straight line is a poor model of one. This lesson shows what goes wrong with the line, builds the S-shaped alternatives (logit and probit), explains maximum likelihood, and teaches the three readings the exams ask for: the sign and significance of a coefficient, the odds, and the marginal effect on the probability.
The Ashanagar survey is invented. The statistics modules used one district of 60 households. Econometrics needs more households and more variables, so this is a new, larger survey of 600 households in the same imaginary district: income, spending, household size, whether the household is in the town or a village, the head’s schooling and earnings.
Because we wrote the data-generating process, we know the true answers, and every lab can show whether a regression recovers them. Household spending, in thousands of rupees a month, was generated as 1 + 0.45 × income + 0.9 × household size + 1.5 × town + an error with standard deviation 2.5. A real survey never tells you its true coefficients. This one does, so you can see how close an estimate comes.
It also holds a variable, the head’s ability, that a real survey could not observe. It is kept so that the lessons on omitted variables can show what happens when it is left out. Every figure here is illustrative, not official statistics.
Let y be 1 if the household owns a motorcycle and 0 if not. Since y takes only the values 0 and 1, E(y | x) is the probability that y = 1, and regressing y on x by OLS gives the linear probability model (LPM): P(y = 1 | x) = x′β. It is easy to estimate and its coefficients read directly: a coefficient of 0.04 on income means an extra ₹1 thousand raises the probability by 4 percentage points. But as a model of a probability it has built-in flaws:
The LPM is still used, often, for the average effect near the middle of the data, with robust standard errors. But for predicted probabilities and for outcomes that are rare or common, it is replaced by a model that keeps probabilities inside the band.
Keep a linear index z = x′β but pass it through an S-shaped function F that maps any real number into (0, 1): P(y = 1 | x) = F(x′β). Two choices are standard:
Move the marker along the income axis. The red line leaves the band at both ends, while the logit and probit curves bend to stay inside it, and are close to each other everywhere. Notice also how the slope of the S-curve, the effect on the probability of one more rupee of income, changes with income.
600 households: does the household own a motorcycle (1) or not (0)? Income is in ₹ thousand a month. Each dot is a household, nudged vertically so they do not overlap. The three curves are fitted to the same data.
Horizontal: household income (₹ thousand a month). Vertical: 1 if the household owns a motorcycle, 0 if not (dots), and the fitted probability (curves). The linear fit leaves the 0 to 1 band at both ends.
The three models agree closely in the middle (0.31, 0.21 and 0.22) and differ in the tails, where the line runs off. The linear model's marginal effect is the same 0.042 everywhere; the logit's is 0.05 here, because one more rupee of income changes the probability most near one half and hardly at all near 0 or 1. The logit and probit give nearly identical probabilities (the probit coefficient is smaller by roughly the factor 1.74), so the choice between them rarely matters.
Odds and log-odds. For the logit, p ÷ (1 − p) is the odds of the event (p = 0.8 means odds of 4 to 1), and the model says ln[p ÷ (1 − p)] = x′β: the log-odds is linear in x. A coefficient β therefore means: one more unit of x multiplies the odds by eβ (the odds ratio), whatever the starting value. The probit has no such simple reading, and its coefficients are about 1.6 to 1.8 times smaller than the logit’s (a difference of scale between the logistic and normal distributions, not a difference in fit).
OLS minimises squared residuals; it cannot be the right criterion for a 0/1 outcome. Logit and probit are estimated by maximum likelihood: choose the coefficients that make the observed pattern of 0s and 1s most probable. The likelihood multiplies p for each household that owns a motorcycle and 1 − p for each that does not.
Each household has y = 1 (probability p) or y = 0 (probability 1 − p). Written as one formula, and multiplied over independent households:
For the logistic pi = 1 ÷ (1 + e−xi′β), the derivative of p with respect to the index is p(1 − p), and it cancels with the denominators in the derivative of ln L:
With a constant in the model, the first equation says Σpi = Σyi: the model’s fitted probabilities add up to the number of observed ones. For the survey’s motorcycle data they add to 197, and 197 households own one.
These are 4 non-linear equations in β, with no closed-form solution. Newton’s method starts at β = 0 and repeats β ← β + (X′WX)⁻¹X′(y − p), with W = diag(p(1 − p)), which is a weighted least squares step each time. It converged in 6 iterations here. The final residual sums, Σ(y − p̂), Σ(y − p̂)·income, and so on, are 0, 0, 0, 0: zero to rounding.
Taking logs of p ÷ (1 − p) = ex′β gives ln(odds) = x′β: the coefficients are effects on the log-odds, and eβ is the odds ratio. An extra ₹1 thousand of income has a coefficient of 0.296, so the odds of owning a motorcycle are multiplied by e0.296 = 1.345, about 34% higher, whatever the starting point. The effect on the probability is p(1 − p)β, which depends on where you start.
Four things follow that the exams ask:
In the survey the households own a motorcycle when a logistic shock falls below an index we wrote: −5 + 0.3 × income + 0.8 × town − 0.25 × household size. 33% of the 600 households own one. The three models give:
| Term | True logit coefficient | Logit estimate (se) | Probit estimate (se) | LPM estimate (se) |
|---|---|---|---|---|
| Constant | −5 | −5.196 (0.559) | −2.927 (0.295) | −0.192 (0.053) |
| Income (₹ thousand) | 0.3 | 0.296 (0.029) | 0.168 (0.015) | 0.038 (0.003) |
| Town (1) or village (0) | 0.8 | 1.011 (0.262) | 0.575 (0.151) | 0.179 (0.037) |
| Household size | −0.25 | −0.243 (0.089) | −0.143 (0.05) | −0.032 (0.011) |
The logit recovers the truth within about one standard error. The probit coefficients are smaller by a factor of about 1.76, as expected, and the LPM coefficients are on yet another scale (probability points per unit). So the coefficients of different models cannot be compared directly; compare marginal effects:
| Effect on the probability of owning, per unit | Logit, at the means | Logit, averaged | Probit, at the means | Probit, averaged | LPM |
|---|---|---|---|---|---|
| Income (₹ thousand) | 0.0505 | 0.0362 | 0.0514 | 0.0361 | 0.0382 |
| Town (1) or village (0) | 0.1722 | 0.1233 | 0.1759 | 0.1235 | 0.1788 |
| Household size | −0.0413 | −0.0296 | −0.0438 | −0.0307 | −0.0322 |
A marginal effect for a logit is β × p(1 − p) at the chosen point (for the probit, β × φ(x′β)), so it is largest where p is near one half and shrinks towards the ends. It is reported either at the means of the regressors or, better, averaged over the sample (the “average marginal effect”). The three models agree: an extra ₹1 thousand of income raises the probability by about 3.6 to 3.8 percentage points. For a dummy such as town, the effect is better computed as the difference between the probability with the dummy at 1 and at 0.
The fit: the logit has a log-likelihood of −229.9 against −379.8 for the constant-only model, so LR = 299.8 with 3 degrees of freedom (p < 0.0001), McFadden’s pseudo R² = 0.395, and the count R² is 0.825 against 0.672 for always predicting “no”.
For a binary outcome the linear probability model can predict outside [0, 1] and has heteroscedastic errors. Logit and probit model P(y = 1) = F(x′β) with a logistic or normal F, estimated by maximum likelihood. Coefficients are effects on an index (the log-odds for the logit), not on the probability; the marginal effect is β times the density at that point. The likelihood-ratio test checks that all slopes are zero.
Restricted against unrestricted regressions, reading output, and statement questions, up to GATE and IIT JAM level.
These are questions from the TestStop bank. A free account answers 10 a day, each with its worked solution; All-Access opens every set with no daily limit.
The probit calculation, the logit formula, the statements about the linear probability model and the test for all the slopes are in the sets above. Explanations of the dummy-variable regressors in these models are in lesson 5.