Likelihood
A likelihood is the probability of observed data under a model, viewed as a function of the model’s parameters or candidate hypotheses.
Grokking Bayes
A likelihood is a function that measures how compatible observed data are with candidate values of a model's unknown quantities.
- How it is used
- Quantifies how well each hypothesis explains observed data before prior probabilities are incorporated into a Bayesian update.
- How deep it goes
- Works from conditional probability through a counted binomial example, vectorized calculation, and posterior normalization; also identifies normal likelihoods.
- Examples
- Uses tea preferences, dark clouds, a rare-disease test, and house-price regression to distinguish observations under competing assumptions.
- What you can do after
- Apply it via NumPy and SciPy to calculate binomial likelihoods and update probabilities across proposed tea-preference rates.
Timeless Algorithms, The Foundational Ideas
A likelihood function measures how compatible observed data are with different parameter values of a statistical model.
- How it is used
- Uses likelihood to compare parameter values, estimate models, update beliefs, and interpret classification losses.
- How deep it goes
- Develops likelihood from probability models through log-likelihood optimization, including discrete and continuous worked examples.
- Examples
- Works through coin tosses, a rare-disease test, a normal mean, and binary classification.
- What you can do after
- Evaluate and understand parameter estimates and classification objectives in light of their probability models and assumptions.
Read how Timeless Algorithms, The Foundational Ideas explains likelihood →
Math and Architectures of Deep Learning
A function of model parameters measuring how probable observed data are under those parameters.
- How it is used
- Supports parameter estimation by scoring training data under candidate model parameters.
- How deep it goes
- Derives independent-data likelihoods, Gaussian forms, negative log-likelihood optimization, and Bayesian posterior roles.
- Examples
- Uses Gaussian mean and variance fitting, PyTorch gradient descent, and class selection in Gaussian mixture models.
- What you can do after
- Apply it via PyTorch to minimize Gaussian negative log-likelihood and estimate model parameters.
Read how Math and Architectures of Deep Learning explains likelihood →
Fabulous Adventures in Data Structures and Algorithms
A likelihood function expresses the plausibility of observed data as a function of a hypothesis or model parameter.
- How it is used
- Models observations conditional on a cause so a prior can produce joint and posterior distributions.
- How deep it goes
- Develops a C# conditional-distribution function, constructs integer-weight joint distributions, and derives posteriors by filtering and projection.
- Examples
- Uses cold-and-sneezing survey data, a rare-condition medical test, and two independent d20 rolls.
- What you can do after
- Build it from scratch with C# categorical distributions to combine priors and likelihoods and compute posteriors from observations.
Read how Fabulous Adventures in Data Structures and Algorithms explains likelihood →
Bayesian Optimization in Action
A likelihood function quantifies how compatible observed data are with different values of a model's parameters or latent quantities.
- How it is used
- Updates beliefs about quantities or hypotheses by combining prior beliefs with the compatibility of observed data.
- How deep it goes
- Explains likelihood through competing psychic hypotheses and repeated Bayesian updates, while treating Bayes’ theorem at a high level.
- Examples
- Uses nearby-house prices and repeated carnival guesses to contrast informative evidence, irrelevant evidence, and prior sensitivity.
- What you can do after
- Evaluate/understand how observed evidence changes beliefs under competing hypotheses and different prior probabilities.
Read how Bayesian Optimization in Action explains likelihood →
Build a Robo-Advisor with Python (From Scratch)
A likelihood is the probability of observed data conditional on a specified parameter value or hypothesis.
- How it is used
- Frames observed evidence as conditional probability for Bayesian updating.
- How deep it goes
- Defines likelihood through conditional probability and extends it to uncertain distribution parameters, without deriving posterior distributions.
- Examples
- Uses professional basketball membership and height, then generalizes to exponential-rate and normal-mean parameters.
- What you can do after
- Evaluate how observed evidence changes beliefs about hypotheses or uncertain distribution parameters.
Read how Build a Robo-Advisor with Python (From Scratch) explains likelihood →
Causal AI
Likelihood is the probability of observed data viewed as a function of a candidate model parameter value.
- How it is used
- Uses observed data to estimate parameters for statistical, machine-learning, and causal models.
- How deep it goes
- Explains likelihood, log-likelihood, negative log-likelihood, regularization, and optimization, without deriving general closed-form estimators.
- Examples
- Uses regression weights, linear regression, neural networks, and L2 regularization as estimation examples.
- What you can do after
- Apply it via likelihood-based objectives, numerical optimization, and regularized loss functions when fitting models.
Also covered in
- Machine Learning Algorithms in Depth
- Reinforcement Learning from Human Feedback
- Retrieval Augmented Generation, The Foundational IdeasIn early access (MEAP)
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.
- varianceVariance is the expected squared deviation of a random variable from its mean and measures the dispersion of its values.
- language modelA language model is a computational model that represents patterns in linguistic sequences to assign probabilities, predict, generate, or evaluate language.
- normal distributionA normal distribution is a continuous probability distribution with a symmetric, bell-shaped density determined by its mean and variance.
Related concepts
- maximum likelihood estimationused by · Maximum likelihood estimation is a statistical method that selects parameter values maximizing the likelihood of observed data under a specified probabilistic model.
- Bayesian modelused by · A Bayesian model is a probabilistic model that represents unknown quantities with prior distributions and updates them to posterior distributions using observed data and Bayes’ theorem.
- cross entropy lossequivalent to · Cross-entropy loss measures the expected negative log probability that a predicted distribution assigns to outcomes drawn from a target distribution.
- likelihood ratio testused by · A likelihood ratio test compares nested statistical models using their maximized likelihoods to assess whether the more complex model provides a significant improvement.
- probabilitycontrasts with · Probability is a mathematical measure, from zero to one, of the likelihood that an event or outcome occurs or is true.
- probability distributioncontrasts with · A probability distribution is a mathematical specification assigning probabilities or probability densities to the possible values or outcomes of a random variable.
Questions about likelihood
What is likelihood?
A likelihood is the probability of observed data under a model, viewed as a function of the model’s parameters or candidate hypotheses.
Which Manning books explain likelihood?
Grokking Bayes, Timeless Algorithms, The Foundational Ideas, Math and Architectures of Deep Learning, Fabulous Adventures in Data Structures and Algorithms, Bayesian Optimization in Action, Build a Robo-Advisor with Python (From Scratch) and Causal AI.
What should I know before learning likelihood?
Manning books that teach likelihood usually introduce prior probability, variance, language model and normal distribution first.
What is the difference between likelihood and probability?
A likelihood is the probability of observed data under a model, viewed as a function of the model’s parameters or candidate hypotheses. Probability is a mathematical measure, from zero to one, of the likelihood that an event or outcome occurs or is true.
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.






