The Maths You Actually NeedLesson 56 of 76

Module 6 · Estimation: from a sample to a number you can trust

Regularisation is a prior: L2, L1 and the diamond

In this lesson

  • 10 min read
  • 7 reading sections
  • Knowledge check
  • Lesson 8 of 9 in this chapter

This chapter’s goalCompute a standard error and a confidence interval for an accuracy figure by hand, say from the sample size and base rate whether the textbook interval can be trusted, bound a failure rate from a run with zero failures, derive an L2 or L1 penalty from a stated prior on the weights, and predict how much the best of k noisy candidates will fall back when re-measured.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 8Free · no account needed
Lesson steps

Where maximum likelihood goes wrong, and the repair

Module 5 derived every standard loss from maximum likelihood: choose the parameters that make the data most probable. It also noted the flaw. Given enough parameters and too little data, the parameters that make the training data most probable are ones that have memorised it. The likelihood is happy to set a weight to 40 if that fits one row.

The repair is to say what you believed about the parameters before seeing data. Bayes’ rule, from module 4, gives

Text
posterior ∝ likelihood × prior

and maximising the posterior instead of the likelihood is maximum a posteriori estimation, MAP. Take logs:

Text
log posterior = log likelihood + log prior + const

Minimising the negative of this gives

Text
loss = data loss + (−log prior)

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Stuck on something?Ask Funke, your AI tutor

How to cite: Addaly (2026) ‘Regularisation is a prior: L2, L1 and the diamond’, in The Maths You Actually Need. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/maths-you-need/maximum-a-posteriori-and-regularisation (Accessed: 29 November 2026).