Skip to content
All tutors

Maximum Likelihood, Step by Step

Derive estimates by maximising likelihood and see why common losses are likelihoods in disguise

By Skill Lab Intermediate Math for AI New

Your first 3 replies from the tutor are free. Then you can continue the lesson for $7 from your credit.

A taste of a lesson

One question and the answer, as this tutor gives it.

Maximum Likelihood, Step by Step AI tutor following Skill Lab's plan
Student:

Why is minimising mean squared error the same as maximum likelihood?

Tutor:

Assume each target equals the prediction plus Gaussian noise with a fixed variance. The probability density of one target is proportional to exp(-(y - y_hat)^2 / (2 sigma^2)). Multiply over examples and take the log: you get minus the sum of squared errors divided by 2 sigma^2, plus a constant. Maximising that is the same as minimising the sum of squared errors. So MSE is MLE under that noise assumption. Try it: what loss would you get if the noise followed a Laplace distribution, proportional to exp(-|error|)?

Written with AI under Skill Lab's direction as an example. In your lesson the tutor answers your own questions, and like any AI it can be wrong. Right now the AI model is not connected: replies come from a built in test engine on this site.

What you will be able to do

  • Distinguish probability from likelihood
  • Write and maximise log likelihoods for simple models
  • Derive MLEs for proportions, means and rates
  • Show that MSE and cross entropy are negative log likelihoods
  • Explain MLE overfitting and how MAP priors regularise

Lesson plan

6 lessons. Pick one to start there.

  1. 1 Probability versus likelihood Understand likelihood as plausibility of parameters given data. Start
  2. 2 The coin example Write, log and maximise a likelihood by hand. Start
  3. 3 Gaussians and counts Derive MLEs for Gaussian and Poisson data. Start
  4. 4 Losses are likelihoods Connect MSE and cross entropy to likelihood. Start
  5. 5 When MLE overfits Recognise MLE failures with little data. Start
  6. 6 MAP and priors Add priors and see their link to regularisation. Start

Try asking

Tap a question to start a lesson with it.

About this tutor

An intermediate tutor on the principle behind most model training. You will distinguish probability from likelihood, write likelihoods for coins, counts and Gaussian data, take logs and maximise by calculus, and derive familiar estimates such as the sample proportion and sample mean. Lessons then show that mean squared error and cross entropy are negative log likelihoods under specific assumptions, explain why maximum likelihood can overfit with little data, and introduce MAP estimation, where a prior acts like regularisation. Each derivation is checked numerically.

Reviews

Students can review a tutor after a paid lesson. Nobody has yet.