Bayesian Inference
Treating an unknown parameter as uncertain: give it a prior distribution and update it with data by Bayes' theorem.
Needs a step first: 18
This is Bayes' theorem for a whole range of values: the posterior is proportional to likelihood times prior, . The result is not one number but a distribution that says how sure you should be, and it can be updated again as more data arrive. Some priors keep their form under updating, such as the beta prior for a probability, which makes the calculation exact. With little data the prior matters; with a lot, the posterior closes in on the maximum-likelihood estimate.
Where it shows up: Regularisation is a prior in disguise, and Bayesian neural networks and Gaussian processes report how unsure their predictions are.
How to hold it: In your head
See the posterior as likelihood times prior, a whole distribution of belief that sharpens as data arrive, and know how what it claims differs from what a confidence interval claims.
What knowing it looks like
- Write a posterior, up to a constant, as likelihood times prior.
- Update a beta prior with coin-toss data and give the posterior mean and the most likely value.
- Explain how what a posterior claims differs from what a confidence interval claims.
Test yourself
A coin's chance of heads has a uniform prior on . It lands heads times in tosses. Find the posterior density up to a constant, its most likely value, and the probability that the next toss is heads. You may use .
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 "Bayesian Inference" (Undergraduate II tier): Treating an unknown parameter as uncertain: give it a prior distribution and update it with data by Bayes' theorem.
I already know: Bayes' Theorem, Probability Densities.
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: A coin's chance of heads $p$ has a uniform prior on $[0,1]$. It lands heads $7$ times in $10$ tosses. Find the posterior density up to a constant, its most likely value, and the probability that the next toss is heads. You may use $\int_0^1p^a(1-p)^b\,dp=\frac{a!\,b!}{(a+b+1)!}$.
Use LaTeX for formulas. When you say where it's used later (machine learning, quantum mechanics), be specific.Needs first
- Bayes' TheoremTurns the chance of the evidence given a cause into the chance of the cause given the evidence, weighing how common the cause is.Core · Probability & Statistics
- 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
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.