liveBook · Manning

Probability theory

Probability theory is the mathematical framework for quantifying and reasoning about uncertainty in events, variables, and outcomes.

How 22 Manning books explain it

Grokking Machine Learning

A numerical measure of the likelihood that an event occurs.

How it is used
Uses probability to express uncertain classifications and measure how mixed the groups in a decision-tree split are.
How deep it goes
Develops conditional probability through examples and works probability into Gini calculations, without a general axiomatic treatment.
Examples
Uses animal clues, a red-sweater clerk, patient symptoms, spam email, and colored balls to make likelihoods concrete.
What you can do after
Practice/perform probability updates from new clues, estimate labels with naive Bayes, and compare decision-tree splits using Gini impurity.

Read how Grokking Machine Learning explains probability theory →

Statistics Every Programmer Needs

Probability is a mathematical framework for assigning and analyzing the likelihood of uncertain events.

How it is used
Quantifies uncertainty to support statistical inference, risk assessment, prediction, and decisions.
How deep it goes
Develops favorable-outcome calculations, odds, counting rules, and applied event problems, then extends to random variables, distributions, and conditional probability.
Examples
Works through coin flips, dice rolls, card selections, Python percentage calculations, and uncertain investment outcomes.
What you can do after
Apply it to count event outcomes, calculate and present probabilities, and assess uncertain decision paths.

Read how Statistics Every Programmer Needs explains probability theory →

Math and Architectures of Deep Learning

A measure of how likely an event or value is.

How it is used
Quantifies event likelihoods for distributions, sampling, classification outputs, and statistical prediction.
How deep it goes
Defines frequentist probability, rules, discrete and continuous variables, then works through binomial calculations and PyTorch distributions.
Examples
Uses Statsville heights, three celebrity-photo trials, binary success/failure variables, and four-class image classification.
What you can do after
Apply it to calculate event chances, combine independent outcomes, and interpret probability distributions used by PyTorch models.

Read how Math and Architectures of Deep Learning explains probability theory →

Quantum Programming in Depth

Probability is a numerical value between zero and one expressing the likelihood of a measurement outcome.

How it is used
Quantifies likely outcomes when quantum states are measured.
How deep it goes
Derives probabilities from squared amplitudes and connects them to computational-basis measurements, while deferring projection-operator formalism.
Examples
Uses single-qubit and two-qubit superpositions, basis states, and outcome distributions as concrete probability examples.
What you can do after
Evaluate measurement outcomes by squaring basis-state amplitudes and identify when an algorithm succeeds with high probability.

Read how Quantum Programming in Depth explains probability theory →

Building Quantum Software with Python

An outcome probability is the probability assigned to a particular measurement outcome or specified combination of outcomes.

How it is used
Connects quantum-state evolution to the measurement distributions used for sampling, analog encoding, optimization, and search.
How deep it goes
Derives probabilities from complex-amplitude magnitudes, implements state tables and sampling, and defers quantum postulates and amplitude-estimation details.
Examples
Uses variable-bias coins, single-qubit sampled counts, three-qubit uniform states, state tables, and Grover good-outcome amplification.
What you can do after
Apply it via Python state lists to calculate outcome weights, validate normalization, and sample simulated measurements.

Read how Building Quantum Software with Python explains probability theory →

Statistics Slam Dunk

Probability is a numerical measure of the likelihood that an event or outcome occurs.

How it is used
Uses numerical likelihoods to analyze NBA outcomes, simulate randomness, evaluate streaks, and support statistical models.
How deep it goes
Computes probabilities through simulations, Laplace smoothing, and expected values without developing formal probability theory or proofs.
Examples
Uses fair-coin simulations, free-throw streaks, Laplace curves, and NBA draft career outcomes.
What you can do after
Apply it via R to simulate trials, calculate smoothed probabilities, and compare probability-weighted NBA outcomes.

Read how Statistics Slam Dunk explains probability theory →

Grokking Machine Learning, Second Edition

Probability is a numerical measure of the likelihood that an event occurs.

How it is used
Guides classification by turning scores, test results, and email features into likelihoods.
How deep it goes
Builds intuition with numerical examples, then applies probability to sigmoid outputs and Bayes calculations.
Examples
Uses rain, medical testing, sigmoid tables, and spam words such as lottery and sale.
What you can do after
Apply it via Bayes’ theorem and simple counts to estimate disease or spam likelihoods.

Read how Grokking Machine Learning, Second Edition explains probability theory →

Grokking Statistics

Probability is the mathematical framework for quantifying the likelihood of possible outcomes under uncertainty.

How it is used
Frames uncertainty for data science, machine learning, hypothesis testing, and real-world decision models.
How deep it goes
Defines probabilities, complements, repeated trials, belief-based estimates, and odds conversion before surveying distributions and simulation.
Examples
Uses a water-damaged laptop, 1,000 coin flips, election forecasts, sports betting odds, and stock-market beliefs.
What you can do after
Evaluate/understand probability statements as numeric uncertainty grounded in data, beliefs, or both.

Read how Grokking Statistics explains probability theory →

Causal AI

Probability is a numerical measure between zero and one expressing the likelihood of an event or value under a specified model or evidence.

How it is used
Frames technical questions as probability quantities estimated from evidence, then applies them to prediction, decisions, and counterfactual reasoning.
How deep it goes
Defines random variables, discrete mass, continuous density, and physical interpretation, then stops short of broader probability axioms.
Examples
Uses three-sided dice, coin flips, Boston heights, MNIST digit classification, repeated rolls, and uncertain alternative decisions.
What you can do after
Apply probability by formulating quantities, representing uncertainty, estimating values from data, and comparing outcomes for decisions.

Read how Causal AI explains probability theory →

AI Model Evaluation

Probability is a numerical measure from zero to one representing the likelihood of an event or choice.

How it is used
Uses action probabilities to estimate how a new decision policy might perform on historical data.
How deep it goes
Explains probability logging, policy-weighted outcome aggregation, and checks for unstable estimates.
Examples
Calculates movie recommendation probabilities from ratings and genre preferences, then evaluates logged clicks or watches.
What you can do after
Evaluate a new policy using logged probabilities and weighted outcomes, while checking whether the estimate is trustworthy.

Read how AI Model Evaluation explains probability theory →

Grokking Bayes

How it is used
Represents uncertainty in predictions and decisions, from weather forecasts to medical risk and machine learning.
How deep it goes
Builds from intuitive forecasts to random variables and prior-data-posterior distributions.
Examples
Uses rain forecasts, rainfall amount ranges, noisy image predictions, and language-model next-word prediction.
What you can do after
Evaluate/understand uncertain predictions and use probability to make decisions that reflect risk and prior knowledge.

Read how Grokking Bayes explains probability theory →

Grokking AI Applications

Probability is a numerical value representing the likelihood of an event or candidate outcome.

How it is used
Frames probabilistic behavior as uncertainty to manage in AI and GenAI workflows.
How deep it goes
Defines likelihood through a purchase prediction and describes LLM nondeterminism, but does not develop probability calculations.
Examples
Uses a 72% purchase prediction and contrasts probabilistic model behavior with calculator-tool results.
What you can do after
Understand why AI outputs can vary and distinguish probabilistic model behavior from deterministic tool results.

Read how Grokking AI Applications explains probability theory →

How Large Language Models Work

A probability is a numerical value representing the likelihood assigned to a possible event or outcome.

How it is used
Guides next-token sampling, output variation, and reinforcement-learning judgments about generated text.
How deep it goes
Explains token scoring, weighted selection, randomness, and training intuition while deferring deeper mathematical reasons.
Examples
Uses “I love to eat,” food completions, unlikely tokens, weighted selection, and an end-of-sequence token.
What you can do after
Apply it via token sampling to understand and adjust the consistency or variety of generated text.

Read how How Large Language Models Work explains probability theory →

Coding with AI

A numerical measure expressing the likelihood of a possible outcome.

How it is used
Frames probability as the basis for generative AI’s text and code prediction, distinguishing generation from stored-answer retrieval.
How deep it goes
Explains learned likelihoods and next-word prediction, but gives no equations or calculation procedure.
Examples
Illustrates dog features, such as the likelihood of a tail, and prediction of the next word.
What you can do after
Understand why model outputs can vary or be confidently wrong, and verify generated code and factual claims.

Read how Coding with AI explains probability theory →

Learn AI-Assisted Python Programming, Second Edition

Probability is a numerical measure of the likelihood that an event will occur.

How it is used
Guides risk-and-reward decisions in dice games and supplies intuition for random events.
How deep it goes
Develops game-based intuition and basic random-number usage, stopping short of formal probability theory.
Examples
Uses Bogart dice rolls, escalating chances of rolling a 1, and Python random-number outputs.
What you can do after
Apply it via Python’s random module to generate dice-like integers and probability-like floating-point values.

Read how Learn AI-Assisted Python Programming, Second Edition explains probability theory →

Outlier Detection in Python

A numerical quantity representing the degree of likelihood assigned to an event or class prediction.

How it is used
Uses classifier probabilities to rank suspected outliers and support more tunable decisions than binary labels.
How deep it goes
Explains calibration, ranking, and classifier limitations without deriving probability theory or statistical-outlier detection.
Examples
Compares classifier scores of 0.89 and 0.6 for two records.
What you can do after
Apply it via classifier-based outlier detection to rank cases while avoiding literal interpretations of uncalibrated scores.

Read how Outlier Detection in Python explains probability theory →

Retrieval Augmented Generation, The Foundational Ideas

Probability is a numerical measure representing the likelihood of an event or outcome.

How it is used
Uses normalized probabilities and likelihoods to weight documents, combine retrieval with generation, and refine LLM evaluation scores.
How deep it goes
Explains normalization, multiplication, and probability-weighted scoring with worked values, but stops short of general probability theory.
Examples
Demonstrates document-score normalization, a subprime-mortgage retrieval example, and continuous G-Eval ratings.
What you can do after
Evaluate RAG outputs with probability-weighted ratings and combine retrieval relevance with answer-generation likelihood.

Read how Retrieval Augmented Generation, The Foundational Ideas explains probability theory →

The Art of AI Product Development

A probability is a numerical value between zero and one representing the likelihood of an event or outcome.

How it is used
Frames AI predictions as uncertain decision inputs that users must interpret alongside experience and operational context.
How deep it goes
Explains interpretation and application through forecasts and classification, but does not derive probability mathematically.
Examples
Uses demand forecasts, unexpected holiday sales, and user-segment predictions to make uncertainty concrete.
What you can do after
Evaluate AI probabilities with domain knowledge and choose interpretable outputs when stakeholders must act on predictions.

Read how The Art of AI Product Development explains probability theory →

Fabulous Adventures in Data Structures and Algorithms

Probability is the mathematical theory of quantifying uncertainty about possible outcomes.

How it is used
Frames randomness and statistical inference as programmable abstractions for decisions under uncertainty.
How deep it goes
Defines frequentist and Bayesian interpretations with examples, then stops short of developing Bayes’ theorem or sampling algorithms.
Examples
Uses die rolls, a coin toss, a football game, betting, and uncertainty about a distant digit of pi.
What you can do after
Evaluate uncertainty through frequentist frequencies or Bayesian confidence and prepare probabilistic abstractions for later decision-making.

Read how Fabulous Adventures in Data Structures and Algorithms explains probability theory →

Software Testing with Generative AI

Probability is a mathematical measure of the likelihood that an event or outcome occurs.

How it is used
Explains how keyboards and language models choose likely next words.
How deep it goes
Defines probability distributions and connects them to training, model weights, and prediction without mathematical derivation.
Examples
Uses phone-keyboard suggestions, including “I am” followed by “away” or “sandalwood.”
What you can do after
Understand how trained language models rank possible next words.

Read how Software Testing with Generative AI explains probability theory →

Effective Data Analysis

Probability is a mathematical measure of uncertainty about events or propositions.

How it is used
Guides analysts to quantify hypothesized group differences and connect them with evidence.
How deep it goes
Contrasts frequentist and Bayesian interpretations, then stops short of detailed probability or Bayesian statistics.
Examples
Uses simulated normal distributions, treatment-control histograms, and a two-standard-deviation treatment shift.
What you can do after
Apply it via Python to quantify expected differences and visualize simulated treatment and control distributions.

Read how Effective Data Analysis explains probability theory →

Machines that Think

Probability is a mathematical measure of the likelihood of events or outcomes.

How it is used
Uses probability to explain why language models can produce plausible but unsupported answers.
How deep it goes
Traces token-sequence probability from training objectives to hallucination without developing a formal mathematical account.
Examples
Uses a dolphin mislabeled as a fish when water-associated patterns dominate.
What you can do after
Evaluate why a likely continuation can sound plausible without being factually verified.

Read how Machines that Think explains probability theory →

Also covered in

What to know first

Related concepts

Questions about probability theory

What is probability theory?

Probability theory is the mathematical framework for quantifying and reasoning about uncertainty in events, variables, and outcomes.

Which Manning books explain probability theory?

Grokking Machine Learning, Statistics Every Programmer Needs, Math and Architectures of Deep Learning, Quantum Programming in Depth, Building Quantum Software with Python, Statistics Slam Dunk, Grokking Machine Learning, Second Edition, Grokking Statistics and 14 more.

What should I know before learning probability theory?

Manning books that teach probability theory usually introduce language model, Python, classifier and array first.

What is the difference between probability theory and probability density?

Probability theory is the mathematical framework for quantifying and reasoning about uncertainty in events, variables, and outcomes. A probability density is a nonnegative function describing the distribution of a continuous random variable, with probabilities over intervals or regions given by integrating the function.

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.