Maximum Likelihood
Estimating a model's parameters by choosing the values that make the observed data most probable.
Needs a step first: 18
Given data and a model with parameter , the likelihood says how probable the data are for each . Maximising it, usually through the log-likelihood so that products become sums, gives the estimate. For a normal model it gives the sample mean, and fitting by squared error is maximum likelihood under normal noise. Minimising cross-entropy when training a classifier or a language model is maximum likelihood too.
Where it shows up: A language model is trained by maximum likelihood: its loss is minus the log of the probability it gave to each actual next word.
How to hold it: In your head
See maximum likelihood as choosing the parameters that make the data least surprising, and see why the log turns the product into a sum and why squared error is a normal likelihood in disguise.
What knowing it looks like
- Write the log-likelihood of a sample under a given model and maximise it by differentiating.
- Check that the stationary point found is a maximum.
- Explain why minimising squared error and maximising a normal likelihood give the same fit.
Test yourself
Waiting times of , and minutes are observed, assumed independent and exponential with density for . Find the maximum-likelihood estimate of .
Show the worked answer
Needs a step first: 18
Learn it with an AI
Copy this prompt into any AI assistant. It will take you through step by step at your level and finish with the test above.
Be my maths tutor. I'm learning "Maximum Likelihood" (Undergraduate II tier): Estimating a model's parameters by choosing the values that make the observed data most probable.
I already know: Probability Densities, Rates of Change and Extremes.
Teach it Socratically: first ask what I already know; then explain the core idea with one concrete example and why it's true; then give me three problems, one at a time, easy to hard. Wait for my answer, check every step, and point out mistakes without giving the answer away.
Finish by testing me with this: Waiting times of $2$, $3$ and $5$ minutes are observed, assumed independent and exponential with density $\lambda e^{-\lambda t}$ for $t\ge0$. Find the maximum-likelihood estimate of $\lambda$.
Use LaTeX for formulas. When you say where it's used later (machine learning, quantum mechanics), be specific.Needs first
- Probability DensitiesProbability for quantities that vary continuously, described by a density whose area over an interval is the chance of landing there.Undergraduate I · Probability & Statistics
- Rates of Change and ExtremesUsing derivatives to find where a function is largest or smallest, how fast linked quantities change, and the shape of a graph.Core · Functions & Calculus
Leads to
On the way to
Recommended
- MIT 6.1200J Mathematics for Computer ScienceMIT OpenCourseWare · CourseMIT's 2024 course on proofs, number theory, graphs, counting and discrete probability, with lecture videos, notes and problem sets.
- Mathematics for Machine LearningDeisenroth, Faisal and Ong (Cambridge University Press) · BookA free book that gathers exactly the linear algebra, vector calculus, probability and optimisation machine learning uses, then applies them to regression, PCA and classification.
- Seeing TheoryBrown University · InteractiveA visual introduction to probability and statistics in which you flip coins, draw samples and fit lines in the browser; complete and ad-free, with a Chinese version.
- Harvard Stat 110: ProbabilityJoe Blitzstein, Harvard University · CourseJoe Blitzstein's Harvard probability course: lecture videos, about 250 practice problems with solutions and a free online textbook, strong on intuition and story proofs.
- Information Theory, Inference, and Learning AlgorithmsDavid MacKay · BookMacKay's book connecting entropy, coding, Bayesian inference and neural networks, free to read online and still the one recommended for information theory with intuition.
- 宋浩老师官方宋浩(山东财经大学) · Videos · 中文Full university courses in calculus, linear algebra and probability by a Shandong University of Finance and Economics lecturer, clear and good-humoured; a new calculus series came out in October 2026.