---
title: "Likelihood and the Maximum Likelihood Estimate"
description: "Given data and a family of models, the likelihood is how probable the data would be under each candidate. Choosing the candidate that maximises it is where most fitting procedures come from, including"
canonical: https://lightmysky.com/learn/computing/likelihood-and-the-maximum-likelihood-estimate-mt_crcBnSqkTE
source: https://lightmysky.com/learn/computing/likelihood-and-the-maximum-likelihood-estimate-mt_crcBnSqkTE.md
retrieved: 2026-09-12
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# Likelihood and the Maximum Likelihood Estimate

Given data and a family of models, the likelihood is how probable the data would be under each candidate. Choosing the candidate that maximises it is where most fitting procedures come from, including the least squares line.

Subject: Computing · Area: Machine Learning · Ages 18 to 20
Page: https://lightmysky.com/learn/computing/likelihood-and-the-maximum-likelihood-estimate-mt_crcBnSqkTE

## Ready when they can

- Write the likelihood of a run of coin flips as a function of the bias
- Maximise a simple likelihood and check the answer against intuition
- Explain why the likelihood is a function of the parameter, not of the data

## Lesson: Picking the bias the data likes best

Fix the data, then score each candidate bias by how likely it makes those flips. That score is the likelihood. It varies the bias while the flips stay put, so it is a function of the parameter, not of the data.

**Example.** Seven heads in ten flips gives likelihood p to the 7 times (1 minus p) to the 3. Try p = 0.5 and the score is low. Try p = 0.7 and the score peaks. The maximizing bias is seven tenths, which matches your gut: seven out of ten.

Most fitting works this way. You write how likely the data looks under each setting, then pick the setting that maximizes it. The least squares line is one famous child of this rule.

**Tip.** Hold the data still and move the parameter. Any sentence that varies the flips while fixing the bias has the roles backwards.

**Recap.** Score each bias by the fixed data, then pick the bias with the top score.

## Practice

8 questions on this page, each with its working shown.

## Needs first

- [Optimisation with Calculus](https://lightmysky.com/learn/mathematics/optimisation-with-calculus-mt_9I0ql39Lzw)
- [The Binomial Distribution](https://lightmysky.com/learn/mathematics/the-binomial-distribution-mt_X2kVGK67Md)

## Opens up

- [Bayes' Rule and Updating a Belief](https://lightmysky.com/learn/computing/bayes-rule-and-updating-a-belief-mt_A4p5--f7Io)
- [Logistic Regression and the Decision Boundary](https://lightmysky.com/learn/computing/logistic-regression-and-the-decision-boundary-mt_FaVIaT7xl2)
- [Models of Sequence Evolution and Maximum Likelihood Trees](https://lightmysky.com/learn/science/models-of-sequence-evolution-and-maximum-likelihood-trees-mt_Ujtg0xul9N)
