Skip to content
We use only essential cookies to keep you signed in and remember your preferences. See our Cookie Policy.
TestStop
MocksPracticeResourcesIndiaBlogPricing
Sign in
Resources › Econometrics › 14. Logit and probit
Econometrics · Lesson 14 of 18

The linear probability model, logit and probit

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.

← Econometrics moduleLesson 14 of 18 · about 50 minutes
1Multiple regression2Matrix form and Gauss-Markov3t and F tests4R² and adjusted R²5Dummies and interactions6Functional forms7Misspecification8Multicollinearity9Heteroscedasticity10Autocorrelation11Instrumental variables12Simultaneous equations13Panel data14Logit and probit15Unit roots16ARMA, VAR and cointegration17Test Atlas18Hard problems
A question to hold on to
Let x and y be two dummy variables taking the values 0 or 1, with this frequency distribution: when x = 0, six observations have y = 0 and six have y = 1; when x = 1, eleven have y = 0 and seven have y = 1 (30 observations in all). If a logit regression is estimated with y as the dependent variable and x as the independent variable, the estimated coefficient of x is ______ (rounded to two decimal places).
GATE Economics (XH-C1) 2024Solved at the end ↓
New here?What is the Ashanagar survey?The invented household survey behind this page's examples: 600 households, generated from a model whose true coefficients we publish.

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.

Households
600
Share in the town
41%
Mean monthly income
₹15.4 thousand
Mean monthly spending
₹12.6 thousand
Mean schooling of the head
8.2 years

How the module uses it →

In this guide
Lesson · about 50 minutes
  1. A straight line for a yes/no outcome
  2. The logit and the probit
  3. Maximum likelihood
  4. Reading the output: odds and marginal effects
  5. The opening question, solved
  6. The lesson on one screen
  7. Check yourself
  8. Past papers, by level
01
The problem

A straight line for a yes/no outcome

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:

  • Predictions outside [0, 1]. A line eventually leaves the band. In the survey, the LPM of ownership on income, town and household size predicts a probability below 0 or above 1 for 93 of the 600 households, as low as −0.3 and as high as 1.06.
  • Heteroscedastic errors. y is 0 or 1, so the error can take only two values and its variance is p(1 − p), which depends on x. The usual standard errors are therefore wrong (lesson 9), and the errors cannot be normal.
  • A constant effect. A one-unit rise in x changes the probability by the same amount everywhere. Near 0 or 1 that cannot hold: it must run out of room.
  • R² is not a good measure of fit. y cannot follow a straight line, so even a perfect model has an R² well below 1.

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.

02
Interactive

The logit and the probit

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:

The two link functions
logit: P(y=1∣x)=Λ(x′β)=1+e−x′β1​probit: P(y=1∣x)=Φ(x′β)
Λ is the logistic cumulative distribution function and Φ the standard normal one. Both are S-shaped, symmetric and nearly identical in the middle; the logistic has slightly heavier tails.

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.

5101520253035−0.20.20.40.60.811.2IncomeOwns

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.

Linear probability modelLogitProbit
Linear probability: predicted probability0.31
Logit: predicted probability0.21
Probit: predicted probability0.224
Logit odds at this income, p ÷ (1 − p)0.266
Marginal effect of ₹1 thousand more: linear, logit, probit0.0422, 0.0495, 0.0512
Logit coefficient and odds ratio per ₹1 thousand0.298, 1.348
What it shows

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

Pause and predict
In a logit model P(y = 1) = 1 ÷ (1 + e^(−Z)) with Z = B₁ + B₂X. Which expression is the odds that y = 1?
03
Estimation

Maximum likelihood

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.

Derive it

Maximum likelihood for a logit: the score equations look like the normal equations

We want to show
For a yes/no outcome with P(y = 1) = p = 1 ÷ (1 + e−x′β), the coefficients that maximise the likelihood satisfy Σ(yi − pi)xi = 0: the residuals y − p are orthogonal to every regressor, just as in OLS, but the equations are non-linear in β and are solved by iteration.
  1. 1
    Write the probability of what was observed.

    Each household has y = 1 (probability p) or y = 0 (probability 1 − p). Written as one formula, and multiplied over independent households:

    L(β)=i∏​piyi​​(1−pi​)1−yi​,lnL=i∑​[yi​lnpi​+(1−yi​)ln(1−pi​)]
  2. 2
    Differentiate with respect to β.

    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:

    ∂β∂lnL​=i∑​(yi​−pi​)xi​=0

    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.

  3. 3
    Solve by iteration.

    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.

  4. 4
    Read the coefficients as log-odds.

    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.

Step 1 of 4
So
The maximum-likelihood logit chooses the coefficients that make the observed 0s and 1s most probable. Its standard errors come from the inverse of the information matrix X′WX, and the likelihood-ratio test of all the slopes being zero is 2(ln L − ln L₀) = 299.8 here, chi-square with 3 degrees of freedom.

Four things follow that the exams ask:

  • There is no formula for the estimates: the equations are non-linear, so software iterates. (With a single 0/1 regressor there is one, the log of the ratio of the odds in the two groups: the puzzle.)
  • Tests use the likelihood. The overall test that all the slope coefficients are zero is the likelihood-ratio test: LR = 2(ln L − ln L₀), where L₀ is the likelihood of a model with only a constant, chi-square with one degree of freedom per slope. It plays the part of the F test in OLS. Individual coefficients use z (normal) statistics, not t.
  • R² has no direct analogue. McFadden’s pseudo R² = 1 − ln L ÷ ln L₀ compares the log-likelihoods. The count R² is the share of observations whose outcome the model predicts correctly with a cutoff of one half. Beware the count R²: a model that predicts “no” for everyone gets the share of 0s, here 0.672.
  • Large samples. The standard errors and tests are justified for large n, not exact in small samples.
04
Reading the output

Reading the output: odds and marginal effects

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:

TermTrue logit coefficientLogit 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.30.296 (0.029)0.168 (0.015)0.038 (0.003)
Town (1) or village (0)0.81.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 unitLogit, at the meansLogit, averagedProbit, at the meansProbit, averagedLPM
Income (₹ thousand)0.05050.03620.05140.03610.0382
Town (1) or village (0)0.17220.12330.17590.12350.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”.

Watch out for

The mistakes examiners are fishing for

  • Reading a logit coefficient as a change in probability. It is a change in the log-odds. Multiply by p(1 − p) for the effect on the probability.
  • Comparing a logit coefficient with a probit or LPM coefficient. They are on different scales. Compare marginal effects.
In economics

Logit and probit assume the shock’s distribution (logistic or normal) and that the index is correctly specified. If the outcome depends on a variable you omit, the estimates are not just imprecise but inconsistent for the original coefficients even if the omitted variable is unrelated to the others, a difference from OLS. That is one reason the linear probability model survives in applied work.

What to say in an exam

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.

05
Solving the opening question

The opening question, solved

GATE Economics (XH-C1) 2024 · hard
x and y are dummies. x = 0: 6 with y = 0, 6 with y = 1. x = 1: 11 with y = 0, 7 with y = 1. A logit of y on x is estimated. Find the coefficient on x.
  1. 1
    With one dummy regressor, the logit fits the two group proportions exactly.
    The model has two parameters (the constant and the slope) and there are two groups, so the fitted probabilities equal the observed proportions: P(y = 1 | x = 0) = 6 ÷ 12 = 0.5 and P(y = 1 | x = 1) = 7 ÷ 18 = 0.389.
  2. 2
    Read the coefficients as log-odds.
    The constant is the log-odds when x = 0: ln(6 ÷ 6) = ln 1 = 0. The coefficient on x is the difference in log-odds, ln(7 ÷ 11) − ln(6 ÷ 6).
  3. 3
    Compute.
    ln(7 ÷ 11) = ln 0.6364 = −0.452. So the coefficient is −0.45.
Answer
About −0.45 (accepted range −0.49 to −0.40). Equivalently, the odds ratio is 0.636: for x = 1 the odds of y = 1 are about 64% of those for x = 0.
06
Revise

The lesson on one screen

The lesson on one screen
LPM
OLS on a 0/1 outcome. Coefficient: change in probability. Flaws: predictions outside [0, 1], heteroscedastic errors (Var = p(1 − p)), constant effect, poor R².
Logit
P = 1 ÷ (1 + e^(−x′β)). ln[p ÷ (1 − p)] = x′β. e^β is the odds ratio.
Probit
P = Φ(x′β), the normal CDF. Coefficients about 1.6 to 1.8 times smaller than the logit's. Very similar probabilities.
Estimation
Maximum likelihood, by iteration. Score equations Σ(y − p)x = 0. Standard errors from the information matrix.
Tests
Overall: likelihood ratio 2(ln L − ln L₀), chi-square with the number of slopes. Single coefficients: z.
Fit
McFadden pseudo R² = 1 − ln L ÷ ln L₀. Count R²: share correctly predicted at cutoff 0.5.
Marginal effect
Logit: β p (1 − p). Probit: β φ(x′β). Depends on x. Report at the means or averaged.
Comparing models
Coefficients are on different scales. Compare marginal effects or predicted probabilities.
07
Practice

Check yourself

0 of 13 correct so far

Compute

A logit probability
A logit has index Z = −1 + 0.5x. Find P(y = 1) at x = 4.
Odds from a probability
The probability of an event is 0.8. Find the odds.
An odds ratio
A logit coefficient on a dummy is 0.69. By what factor does the dummy multiply the odds of the event? (e^0.69 ≈ 1.99.)
A probit probability
A probit has index Z = −0.5 + 0.04x. Find P(y = 1) at x = 20. (Φ(0.3) = 0.6179.)
A logit marginal effect
A logit coefficient is 0.8. Find the marginal effect on the probability at a point where p = 0.5.
The likelihood-ratio statistic
A logit has log-likelihood −120. The model with only a constant has −140. Find the LR statistic. (With 2 slopes, the 5% chi-square critical value is 5.99.)
McFadden's R²
Using the same log-likelihoods (−120 and −140), find McFadden’s pseudo R².
A linear probability prediction
An LPM gives P̂ = −0.2 + 0.04x. Find the predicted probability at x = 35. Is it a valid probability?

Quick questions

1Which of these is a problem of the linear probability model?
2A logit coefficient of 0.5 on a regressor means
3The hypothesis that all slope coefficients of a logit are zero is tested by
4Logit and probit coefficients typically differ in scale because
5In a probit model, the marginal effect of x on P(y = 1) is
08
Real questions

Past papers, by level

Standard

Restricted against unrestricted regressions, reading output, and statement questions, up to GATE and IIT JAM level.

5 questionsPractise →
All 5 past-paper questions for this lesson, easiest first: practise the full set →

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

← Lesson 13Panel data: fixed and random effectsLesson 15 →Stationarity, unit roots and spurious regression

Read next

All resources →
EconometricsEconometrics 15: stationarity, unit roots, Dickey-Fuller and spurious regressionWeak stationarity and white noise, the random walk with and without drift, I(0) and I(1), the Dickey-Fuller and augmented Dickey-Fuller tests (null: unit root) against KPSS (null: stationary), spurious regression and the Granger-Newbold rule, with labs and real Indian GDP data.Complete guide · 55 minEconometricsEconometrics 5: dummy variables, the dummy trap and interaction termsA dummy shifts the intercept and an interaction shifts the slope, a regression on a dummy returns the group averages, m categories and the dummy-variable trap as perfect collinearity, changing the base group, recoding 0 and 1 as minus one and plus one, and a kinked line, with two labs.Complete guide · 55 minEconometricsEconometrics for economics students, from multiple regression to time seriesA module in eighteen lessons, built on data where the truth is known: multiple regression, OLS in matrix form and the Gauss-Markov theorem, t and F tests, R squared, dummies, functional form and specification error, multicollinearity, heteroscedasticity and autocorrelation, endogeneity and instruments, simultaneous equations, panel data, binary outcomes, unit roots, ARMA, VAR and cointegration, then a test atlas that says which test fits which problem and the Delhi School's hardest questions, with graded past papers from every exam.Module · 935 min