liveBook · Manning

Probability theory

Probability theory is the branch of mathematics that formalizes uncertainty and analyzes random events and outcomes using probability measures.

How 16 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 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 →

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 mechanism behind generative AI’s pattern-based creation of text and code.
How deep it goes
Explains pattern learning and next-token prediction, stopping short of formal equations or detailed model internals.
Examples
Uses dog images, musicians learning patterns, variable LLM answers, and generated code to illustrate probabilistic prediction.
What you can do after
Evaluate generated text and code as probabilistic predictions that require human verification rather than guaranteed answers.

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 →

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 →

Related concepts

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.