Bayesian inference
Bayesian inference updates probability distributions over hypotheses or unknown quantities by combining prior information with observed evidence and a likelihood model.
Grokking Bayes
Bayesian statistics is a statistical framework that represents uncertainty with probabilities and updates beliefs using evidence.
- How it is used
- Supports predictions and decisions about unknown quantities by updating beliefs with observed evidence.
- How deep it goes
- Works through prior–likelihood multiplication and normalization, then introduces sampling when closed-form posterior calculations are unavailable.
- Examples
- Uses rain forecasts, rare-disease tests, and a tea-versus-coffee survey to make belief updates concrete.
- What you can do after
- Build it from scratch for small sets of hypotheses, and evaluate uncertainty rather than relying only on a point estimate.
Grokking Machine Learning
A probability identity that expresses a conditional probability in terms of a reversed conditional probability and the relevant prior probabilities.
- How it is used
- Updates a classification probability when new evidence arrives, especially for medical tests and spam detection.
- How deep it goes
- Develops priors and posteriors through counted examples and probability trees, then implements a naive Bayes email classifier.
- Examples
- Uses a rare-illness test, an email containing “lottery,” and predictions from a real email dataset.
- What you can do after
- Build it from scratch as a Python naive Bayes spam predictor that returns probabilities for new emails.
Read how Grokking Machine Learning explains Bayesian inference →
Math and Architectures of Deep Learning
A parameter-estimation approach that combines observed data with a prior distribution to produce a posterior distribution over unknown quantities.
- How it is used
- Estimates generative-model parameters and class probabilities when training data may be limited or unlabeled.
- How deep it goes
- Derives Gaussian, gamma, Wishart, and normal-gamma posterior updates, including multivariate estimation and PyTorch implementations.
- Examples
- Uses Gaussian height samples, Gaussian mixture classification, and univariate and multivariate Gaussian parameter estimation.
- What you can do after
- Apply it via PyTorch to update Gaussian-family posteriors and obtain MAP parameter estimates.
Read how Math and Architectures of Deep Learning explains Bayesian inference →
Timeless Algorithms, The Foundational Ideas
Bayesian inference updates prior probabilities or distributions about hypotheses or parameters with observed data.
- How it is used
- Frames learning and decision-making under uncertainty as updating beliefs from evidence.
- How deep it goes
- Derives posterior normalization, explains conjugate updating, and introduces sampling when exact solutions are impractical.
- Examples
- Works through a rare-disease test and an offender-matching algorithm to illustrate base rates and false positives.
- What you can do after
- Evaluate and understand posterior probabilities by combining prior information with evidence and recognizing common interpretation errors.
Read how Timeless Algorithms, The Foundational Ideas explains Bayesian inference →
Grokking Machine Learning, Second Edition
Bayes' theorem computes the conditional probability of an event from its prior probability, the probability of observed evidence, and the reverse conditional probability.
- How it is used
- Uses prior probabilities and observed events to estimate class probabilities for spam classification.
- How deep it goes
- Builds intuition through counts and trees, derives normalization, then implements multiword naive Bayes with an independence assumption.
- Examples
- Uses rare-disease testing and spam emails containing lottery, sale, and mom.
- What you can do after
- Build it from scratch as a Python naive Bayes spam predictor using word counts and posterior probabilities.
Read how Grokking Machine Learning, Second Edition explains Bayesian inference →
Fabulous Adventures in Data Structures and Algorithms
Bayesian inference updates probability distributions over hypotheses or parameters using observed evidence and Bayes' rule.
- How it is used
- Updates uncertainty about causes from observed effects so software can make evidence-based decisions.
- How deep it goes
- Works through discrete priors, likelihoods, joint distributions, and posteriors, then implements continuous posterior sampling with Metropolis.
- Examples
- Tests a rare medical condition, updates coin hypotheses after ten heads, and samples coin-fairness uncertainty after nine heads in ten flips.
- What you can do after
- Build it from scratch using distribution types to update beliefs, and apply Metropolis sampling to a continuous posterior.
Read how Fabulous Adventures in Data Structures and Algorithms explains Bayesian inference →
Bayesian Optimization in Action
A Bayesian update is the revision of a prior belief into a posterior belief using observed data and a likelihood.
- How it is used
- Uses observed evidence to revise beliefs about quantities such as house prices or competing explanations.
- How deep it goes
- Defines priors, likelihoods, and posteriors with toy examples but treats Bayes’ theorem only at a high level.
- Examples
- Illustrates updates through house-price comparisons and repeated number guesses by a supposed psychic.
- What you can do after
- Apply Bayesian reasoning to combine an initial belief with evidence and interpret the resulting posterior.
Read how Bayesian Optimization in Action explains Bayesian inference →
Causal AI
Bayesian inference is statistical inference that updates prior beliefs about unknown quantities using observed data and a likelihood model.
- How it is used
- Frames uncertainty for probabilistic modeling, causal inference, parameter estimation, and causal decision-making.
- How deep it goes
- Derives Bayes rule from probability axioms and connects it to factorization, marginalization, distributions, and subjective uncertainty.
- Examples
- Uses die rolls, coin flips, shuffled decks, speech production, and climate-driven ocean-current changes as uncertainty examples.
- What you can do after
- Evaluate uncertainty in probabilistic and causal models using Bayes rule, probability factorization, marginalization, and Bayesian estimation.
Sutskever's List
Bayes' rule updates the probability of a hypothesis from its prior probability and the likelihood of observed data under that hypothesis.
- How it is used
- Uses Bayesian updating to assign probabilities to candidate explanations during inductive inference for universal intelligence.
- How deep it goes
- Defines priors, likelihoods, and posteriors, notes prior controversy, and stops short of a formal derivation.
- Examples
- Uses a stream of coin flips to contrast fair, biased, and fixed-pattern hypotheses.
- What you can do after
- Evaluate competing hypotheses by reweighting prior plausibility according to fit with observed data.
Effective Data Analysis
Bayesian statistics is an approach to statistical inference that updates probability distributions for hypotheses or parameters using observed evidence.
- How it is used
- Frames hypotheses as numerical expectations about group differences for analytics and decision-oriented investigation.
- How deep it goes
- Defines probability as belief and demonstrates quantification, but defers broader probability and Bayesian-statistics treatment.
- Examples
- Uses simulated treatment and control distributions plotted as overlapping histograms.
- What you can do after
- Evaluate/understand hypotheses by estimating plausible group differences from research, organizational data, and stakeholder knowledge.
Read how Effective Data Analysis explains Bayesian inference →
Inside AI
Bayes' theorem is a probability formula for updating the probability of a hypothesis using new evidence and prior probabilities.
- How it is used
- Frames probabilistic reasoning as a way to understand how evidence changes beliefs and how events influence one another.
- How deep it goes
- Defines conditional-probability updating and illustrates network dependencies with a weather example.
- Examples
- Uses cloud cover and rain probabilities to illustrate conditional dependence.
- What you can do after
- Understand how evidence updates event probabilities and how variable dependencies can be represented.
Also covered in
- Build a Robo-Advisor with Python (From Scratch)
- Privacy-Preserving Machine Learning
- Machine Learning Algorithms in Depth
- LLMs in Production
- Data-Driven Cybersecurity
- Context EngineeringIn early access (MEAP)
- Statistics Every Programmer Needs
What to know first
- prior probabilityA prior probability or distribution is a probability or probability distribution assigned to an event, hypothesis, or unknown quantity before relevant evidence is incorporated.
- probability theoryProbability theory is the mathematical framework for quantifying and reasoning about uncertainty in events, variables, and outcomes.
- posterior probabilityA posterior probability or distribution represents the probability of an event, hypothesis, or unknown quantity conditional on observed evidence and prior information.
- accuracyAccuracy is the degree to which a result agrees with a specified truth, reference, or criterion, commonly measured as the proportion of evaluated predictions that are correct.
Related concepts
- posterior probabilityproduces · A posterior probability or distribution represents the probability of an event, hypothesis, or unknown quantity conditional on observed evidence and prior information.
- conditional probabilityuses · Conditional probability is the probability of an event or variable value given that specified information, an event, or another variable’s value is known.
- causationcontrasts with · Causation is a relationship in which a change in one event, factor, or condition produces or influences a change in another.
- prior probabilityuses · A prior probability or distribution is a probability or probability distribution assigned to an event, hypothesis, or unknown quantity before relevant evidence is incorporated.
- naive bayes classifierused by · A Naive Bayes classifier is a probabilistic classification model that applies Bayes’ theorem while assuming features are conditionally independent given the class.
- frequentist paradigmcontrasts with · The frequentist paradigm interprets probability through long-run relative frequencies in repeated trials under fixed conditions.
Questions about Bayesian inference
What is Bayesian inference?
Bayesian inference updates probability distributions over hypotheses or unknown quantities by combining prior information with observed evidence and a likelihood model.
Which Manning books explain Bayesian inference?
Grokking Bayes, Grokking Machine Learning, Math and Architectures of Deep Learning, Timeless Algorithms, The Foundational Ideas, Grokking Machine Learning, Second Edition, Fabulous Adventures in Data Structures and Algorithms, Bayesian Optimization in Action, Causal AI and 3 more.
What should I know before learning Bayesian inference?
Manning books that teach Bayesian inference usually introduce prior probability, probability theory, posterior probability and accuracy first.
What is the difference between Bayesian inference and causation?
Bayesian inference updates probability distributions over hypotheses or unknown quantities by combining prior information with observed evidence and a likelihood model. Causation is a relationship in which a change in one event, factor, or condition produces or influences a change in another.
What is Bayesian inference also called?
Bayesian inference is also called Bayesian analysis, Bayesian approach, Bayesian reasoning or bayesian statistics.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.










