ECON 410 · Econometrics II: Causal Methods and Time Series
Maximum Likelihood in Plain English
Pick the parameter values that make the data you actually saw the most probable, the idea behind many modern estimators.
Key takeaways
- The likelihood of a parameter value is the probability of the observed data if that value were true.
- Maximum likelihood picks the value that makes the observed data most probable.
- We usually work with the logarithm of the likelihood because sums are easier than products and the peak stays in the same place.
- In a regression with normally distributed errors, maximum likelihood gives the same line as ordinary least squares.
- Likelihood ratio tests compare two models by how much the best-fitting one improves the log-likelihood.
You find a coin on the sidewalk and flip it ten times. It lands heads seven times. Is it a fair coin? Maybe. Fair coins give seven heads fairly often by luck. But if you had to name one number for the chance of heads, which would you pick? Most people say 0.7, and they say it without thinking.
That instinct is correct, and it is the whole idea of maximum likelihood. Among all the possible settings of an unknown quantity, choose the setting that makes your observed data the most probable. It is like being a detective with a stack of suspects. For each suspect story, you ask how likely it would be to produce exactly the clues on the table. You then pick the story that fits best.
This lesson shows the idea with coins, then with ordinary numbers, and then explains why economists lean on it for so many models, from the time-series models in earlier lessons to the yes-or-no models that come later.
Probability looks forward; likelihood looks back
These two words are close cousins, but they point in opposite directions. Probability starts with a known setting and asks about the data. If a coin has a 0.5 chance of heads, what is the chance of seeing seven heads in ten flips? Likelihood starts with data you already have and asks about the setting. Given that I saw seven heads in ten flips, how believable is a heads chance of 0.5? Of 0.7? Of 0.9?
The formula is the same; what changes is which part you hold fixed. For the coin, if the heads chance is p and the flips are independent, the probability of one particular sequence with 7 heads and 3 tails is:
The order of the flips is a detail that does not change which p wins, so we ignore the count of orderings. Now try values.
A worked example: finding the best coin
Compute L(p) for several guesses of p. Each is p to the seventh power times (1 − p) cubed.
p = 0.3: 0.3⁷ × 0.7³ = 0.0002187 × 0.343 = 0.000075
p = 0.5: 0.5⁷ × 0.5³ = 0.5¹⁰ = 0.000977
p = 0.6: 0.6⁷ × 0.4³ = 0.0279936 × 0.064 = 0.001792
p = 0.7: 0.7⁷ × 0.3³ = 0.0823543 × 0.027 = 0.002224
p = 0.8: 0.8⁷ × 0.2³ = 0.2097152 × 0.008 = 0.001678
p = 0.9: 0.9⁷ × 0.1³ = 0.4782969 × 0.001 = 0.000478 The likelihood rises, peaks at p = 0.7 with 0.002224, and falls. So 0.7 is the maximum likelihood estimate (MLE), which is simply the share of heads: 7 ÷ 10. The method has told us something intuitive, and that is a good sign. It earns its keep when the answer is not obvious.
A calculus student can confirm the peak. Taking the logarithm, ln L = 7 × ln p + 3 × ln(1 − p). Setting the slope to zero gives 7 ÷ p − 3 ÷ (1 − p) = 0, which solves to p = 7 ÷ 10 = 0.7. No need to do that by hand each time; software searches for the peak numerically.
Why we use the log
The likelihood of many observations is a product of many small numbers. With 1,000 flips, you would multiply a thousand fractions, and the result is so tiny a computer may round it to zero. Logarithms turn products into sums: ln(a × b) = ln a + ln b. Sums are easy and stable.
Because the logarithm always rises when its input rises, the peak of ln L sits at the same p as the peak of L. So we maximize the log-likelihood instead. Here are the log-likelihood values for our flips:
p = 0.5: 7 × ln 0.5 + 3 × ln 0.5 = −6.9315
p = 0.6: 7 × ln 0.6 + 3 × ln 0.4 = −3.5758 − 2.7489 = −6.3247
p = 0.7: 7 × ln 0.7 + 3 × ln 0.3 = −2.4967 − 3.6119 = −6.1086
p = 0.8: 7 × ln 0.8 + 3 × ln 0.2 = −1.5620 − 4.8283 = −6.3903 The highest (closest to zero) is at 0.7 again, at −6.1086. All the values are negative, because the probabilities are below 1, and a higher log-likelihood is a better fit.
Likelihood for ordinary measurements
The same recipe works for measurements, not just coin flips. Suppose Maya records her daily smoothie sales for three days: 4, 6 and 8 (in dozens). She assumes sales are drawn from a normal distribution, the familiar bell curve, with an unknown average μ and unknown variance σ², the squared typical spread.
Maximizing the likelihood gives clean answers:
MLE of the mean = the sample average = (4 + 6 + 8) ÷ 3 = 6
MLE of the variance = average squared gap = ((4−6)² + (6−6)² + (8−6)²) ÷ 3
= (4 + 0 + 4) ÷ 3 = 2.667 Notice something small but real. The usual "sample variance" divides by n − 1, which is 2 here, giving (4 + 0 + 4) ÷ 2 = 4. The maximum likelihood version divides by n and gives 2.667. The MLE for the variance is slightly too small on average, a known bias that disappears when n is large. This is an honest feature of the method: it has good properties in big samples, but it is not always perfect in small ones.
Why economists love it
Maximum likelihood is a general engine. Once you can write the probability of your data given some parameters, you can estimate them. That includes models where ordinary least squares does not apply.
- Regression with normal errors. If the errors are normal, the line that maximizes the likelihood is exactly the least-squares line. So the method nests the tool you already know.
- Yes-or-no outcomes. Did a person take a job, or did a firm default? Logit and probit models estimate the chance of a yes using likelihood.
- Time series. The AR and MA models in the earlier lesson are usually fit by likelihood. The same holds for the models of cointegration and VARs.
- Counts. How many patents a firm files in a year, or how many trades happen in a minute.
How sure are we? The sharpness of the peak
A peak tells you the best value. The shape of the peak tells you how sure to be. Look back at the likelihood picture. If the curve were a narrow spike around 0.7, only values very near 0.7 would explain the data, and you could be confident. If it were a wide, flat hill, many values would explain the data nearly as well, and you could not be sure.
Statisticians measure the sharpness by the curvature of the log-likelihood at its top, and from it they get a standard error, the typical size of the estimate's wobble from sample to sample. For the coin, the large-sample formula is:
Standard error = √( p × (1 − p) ÷ n ) = √( 0.7 × 0.3 ÷ 10 ) = √0.021 ≈ 0.145 A rough 95% range is the estimate plus or minus about 1.96 standard errors: 0.7 ± 1.96 × 0.145 = 0.7 ± 0.284, which runs from about 0.42 to 0.98. That is a wide range. Ten flips just cannot pin the coin down. With 1,000 flips and the same 70% heads, the standard error would be √(0.21 ÷ 1,000) ≈ 0.0145, ten times smaller, and the range would be about 0.67 to 0.73. (This formula leans on large samples, so the ten-flip range is only a rough guide.)
A second example: a yes-or-no model
Likelihood shines when the outcome is yes or no. Say we model whether a person takes a job offer. A logit model says the chance of yes is:
chance = 1 ÷ (1 + e^(−z)), where z = −1 + 0.5 × x Here x is the offered wage in some unit, and the numbers −1 and 0.5 are made-up parameters. Take two people. Person 1 has x = 4 and said yes. Person 2 has x = 0 and said no.
Person 1: z = −1 + 0.5 × 4 = 1 → chance of yes = 1 ÷ (1 + 0.3679) = 0.7311
Person 2: z = −1 + 0.5 × 0 = −1 → chance of yes = 1 ÷ (1 + 2.7183) = 0.2689
→ chance of the "no" they gave = 1 − 0.2689 = 0.7311 The likelihood of both answers together is 0.7311 × 0.7311 = 0.5345, and the log-likelihood is ln 0.7311 + ln 0.7311 = −0.3133 − 0.3133 = −0.6266. A computer would try many pairs of parameters in place of −1 and 0.5, and keep the pair with the highest log-likelihood across all the people in the real data. Least squares has no natural way to do this, because a straight line can predict chances below 0 or above 1. Likelihood handles it with ease.
Comparing models: the likelihood ratio test
Likelihood also gives a way to test ideas. Suppose someone claims the coin is fair, p = 0.5. Compare the best log-likelihood (at 0.7, which is −6.1086) with the one under the claim (at 0.5, which is −6.9315). The likelihood ratio statistic is:
LR = 2 × (best log-likelihood − restricted log-likelihood)
= 2 × (−6.1086 − (−6.9315)) = 2 × 0.8229 = 1.646 When the claim is true and the sample is large, this statistic follows a chi-square distribution. With one restriction, a value above about 3.84 is surprising at the usual 5% level. Our 1.646 is below that, so with only ten flips we cannot reject a fair coin. That is a good lesson: seven heads in ten is not strong evidence of an unfair coin.
A common mistake: trusting the model's assumptions
Maximum likelihood is only as good as the story you tell about the data. If you assume normal errors but the real ones have fat tails, with occasional huge surprises, the estimates can mislead. This is why careful researchers check their assumptions and report how results change when the model changes.
A second mistake is treating the likelihood as the probability that a value is true. The likelihood of p = 0.7 being 0.002224 does not say there is a 0.2% chance the coin is 0.7. Likelihoods do not add up to 1 across p, and they describe the data given p, not p given the data. Turning that around needs extra ingredients, which is the job of Bayesian methods, a topic for a different course.
Finally, with small samples, the MLE can be biased, as the variance example showed. Large samples are where the method shines.
Words to know
Likelihood the probability of the observed data viewed as a function of the unknown parameter values.
Maximum likelihood estimate (MLE) the parameter value that makes the observed data most probable.
Log-likelihood the natural logarithm of the likelihood, which turns products into sums.
Parameter an unknown number in a model that we want to estimate, such as a mean or a heads chance.
Likelihood ratio test a test that compares the log-likelihood of a restricted model with that of a fuller one.
Normal distribution the bell-shaped distribution described by a mean and a variance.
Bias a tendency for an estimator to be off in one direction on average.
Check yourself
- In plain words, what is the difference between probability and likelihood?
- In 20 flips, a coin shows 12 heads. What is the maximum likelihood estimate of the heads chance?
- Compute 7 × ln 0.7 + 3 × ln 0.3 using ln 0.7 = −0.3567 and ln 0.3 = −1.2040, rounded to two decimals.
- Why do statisticians maximize the log-likelihood instead of the likelihood?
- Three observations are 2, 4 and 9. What are the MLE of the mean and the MLE of the variance for a normal model?
- Explain why a likelihood of 0.002224 for p = 0.7 does not mean there is a 0.2% chance that p = 0.7.
Show the answers
- Probability starts from a known setting and asks how likely various data are; likelihood starts from the data you have and asks how believable various settings are.
- The MLE is the share of heads: 12 ÷ 20 = 0.6.
- 7 × (−0.3567) + 3 × (−1.2040) = −2.4969 − 3.6120 = −6.11 (rounded to two decimals).
- Products of many small numbers become tiny and hard to compute, while logs turn them into sums and leave the peak in the same place.
- Mean = (2 + 4 + 9) ÷ 3 = 5; variance = ((2−5)² + (4−5)² + (9−5)²) ÷ 3 = (9 + 1 + 16) ÷ 3 = 26 ÷ 3 ≈ 8.67.
- Likelihood is the chance of the data given p, not the chance of p given the data, and likelihood values across p do not sum to 1.