Probability distribution
A probability distribution is a mathematical specification assigning probabilities or probability densities to the possible values or outcomes of a random variable.
Math and Architectures of Deep Learning
A probability law over variable values.
- How it is used
- Models uncertain high-dimensional inputs, supports generative fitting, and exposes structure beyond direct classification.
- How deep it goes
- Defines discrete and joint distributions, then develops sampling, moments, parameter fitting, and latent-space uses.
- Examples
- Uses quantized adult weights, weight-height dependence, sampled point clouds, Gaussian fitting, and VAE latent-space maps.
- What you can do after
- Apply it via PyTorch distribution calls to evaluate probabilities, sample values, and compare theoretical and sample statistics.
Read how Math and Architectures of Deep Learning explains probability distribution →
Statistics Every Programmer Needs
A probability distribution specifies how probability is assigned across the possible values of a random variable.
- How it is used
- Quantifies uncertain outcomes for probability calculations, Monte Carlo simulations, risk assessment, and decisions.
- How deep it goes
- Develops distribution selection and parameters into CDF-based sampling and automated trials, with worked discrete probabilities and continuous-data applications.
- Examples
- Uses Poisson call-center absences, simulated stock prices, and uniform-versus-Benford leading-digit plots.
- What you can do after
- Apply it via SciPy and NumPy to calculate discrete probabilities, sample staffing scenarios, and interpret variation in simulated outcomes.
Read how Statistics Every Programmer Needs explains probability distribution →
Causal AI
A distribution specifies the probabilities or densities of the possible values of a random variable or set of variables.
- How it is used
- Models variation in populations and supplies probabilities for simulation, prediction, and causal decision questions.
- How deep it goes
- Defines outcome probabilities, works through tabular parameters and sampling, and distinguishes observed distributions from intervention effects.
- Examples
- Uses a three-outcome table, website engagement subpopulations, investors’ actions, and token-sequence probabilities.
- What you can do after
- Apply it via pgmpy DiscreteFactor to specify and sample a finite discrete distribution.
Statistics Slam Dunk
A distribution describes how the values of a variable are allocated across their possible range or categories.
- How it is used
- Uses distributions to explore NBA performance data and compare how observations are spread across values or groups.
- How deep it goes
- Explains histograms, bins, boxplots, summary statistics, and paired displays through executable R workflows rather than formal probability theory.
- Examples
- Illustrates win-share distributions for NBA draft selections and overlaid distributions of franchise games played and won.
- What you can do after
- Apply it via ggplot2 and ggpubr to plot, compare, and interpret distributions in NBA data.
Read how Statistics Slam Dunk explains probability distribution →
Outlier Detection in Python
A distribution describes how values or observations are apportioned across possible outcomes or regions of a data space.
- How it is used
- Uses distributions to establish normal patterns, generate synthetic data, and compare groups for unusual behavior.
- How deep it goes
- Explains empirical distributions through sampling, generation, plots, and distance comparisons rather than formal probability derivations.
- Examples
- Contrasts real and synthetic baseball features and compares purchasers’ supplier frequencies overall and on day 28.
- What you can do after
- Apply it via NumPy histograms and SciPy Jensen–Shannon distance to generate values or compare aligned group distributions.
Read how Outlier Detection in Python explains probability distribution →
The Well-Grounded Data Analyst
A statistical distribution describes the pattern of frequencies or probabilities across a variable's possible values.
- How it is used
- Uses distributions to inspect data, compare groups, identify patterns, and guide iterative analytical decisions.
- How deep it goes
- Explains practical inspection through summaries and charts, but stops short of formal probability theory or distribution fitting.
- Examples
- Shows coding-experience histograms, grouped boxenplots, time-series counts, and property-price summaries with investigated outliers.
- What you can do after
- Diagnose/debug with it by inspecting spread, skewness, gaps, group differences, and plausible explanations for extreme observations.
Read how The Well-Grounded Data Analyst explains probability distribution →
Learn C++ by Example
A random number distribution is a rule or library component that produces values according to a specified probability distribution.
- How it is used
- Generates controlled random values for games, simulations, guessing exercises, and varied object behavior.
- How deep it goes
- Explains engine-distribution setup, callable use, parameter meanings, templates, and testing, but defers exhaustive distribution details.
- Examples
- Uses a 1–100 guessing game, 0–4 blob steps, normal values with mean 2.0, and mocked generators for tests.
- What you can do after
- Build it from scratch with a seed, engine, distribution, and operator() call, then substitute distributions or test doubles.
Read how Learn C++ by Example explains probability distribution →
Starting Data Analytics with Generative AI and Python
The pattern of values and their frequencies for a variable or measurement.
- How it is used
- Uses score distributions to compare customer feedback and check positive-review extraction.
- How deep it goes
- Works through grouped counts and visual checks without formal probability calculations.
- Examples
- Uses product-category and seller review counts and a score plot for keyword-selected positive reviews.
- What you can do after
- Apply it via pandas and seaborn to count and visualize review scores.
Read how Starting Data Analytics with Generative AI and Python explains probability distribution →
LLMs in Production
A data distribution is the pattern of frequencies or probabilities with which data values or feature combinations occur.
- How it is used
- Uses distributions to judge whether prepared features suit an LLM’s intended outcome.
- How deep it goes
- Outlines preparation and validation steps while deferring detailed data-pipeline construction.
- Examples
- Suggests inspecting data for representativeness or using a human-in-the-loop workflow to validate model outputs.
- What you can do after
- Evaluate whether a dataset’s feature distributions represent the intended problem.
Read how LLMs in Production explains probability distribution →
Grokking Statistics
A probability function assigns a probability to an event or possible outcome.
- How it is used
- Models uncertain outcomes for data science, machine learning, hypothesis testing, and real-world decisions.
- How deep it goes
- Defines random variables and probability functions, then develops distribution selection through named families and a Bernoulli implementation.
- Examples
- Uses laptop water-damage recovery, die rolls, raindrops, adult heights, controller colors, and tornado widths.
- What you can do after
- Apply it by pairing problem cues such as trials, time, successes, and failures with an appropriate distribution.
Read how Grokking Statistics explains probability distribution →
Server-Side WebAssembly
A probability distribution assigns nonnegative likelihood values to possible outcomes with a total probability of one.
- How it is used
- Turns ML inference scores into interpretable class likelihoods or weighted next-token choices.
- How deep it goes
- Explains softmax procedurally through exponentiation, normalization, ranking, and weighted sampling, without formal probability theory.
- Examples
- Uses Persian-cat classification rankings and story continuation from the prompt “Once upon a time.”
- What you can do after
- Apply it via softmax and WeightedIndex to rank predictions or sample generated tokens.
Read how Server-Side WebAssembly explains probability distribution →
Deep Learning with R, Third Edition
A data distribution is the probability distribution governing the inputs, examples, or outcomes in a machine-learning task.
- How it is used
- Uses distributions to describe class and token predictions, latent representations, and the training examples a model encounters.
- How deep it goes
- Explains softmax probabilities and latent sampling through model components, without a formal derivation of probability distributions.
- Examples
- Illustrates distributions with a 46-class classifier and next-token sampling.
- What you can do after
- Apply probability distributions via R/Keras to produce class predictions and compare them with labels using categorical crossentropy.
Read how Deep Learning with R, Third Edition explains probability distribution →
Machine Learning System Design
A statistical pattern describing the frequencies or probabilities of values in a population or dataset.
- How it is used
- Guides dataset validation, feature maintenance, and production monitoring by checking whether data resembles intended deployment conditions.
- How deep it goes
- Explains representativeness, dataset splitting, separability, feature drift, and repeated validation, but stops short of mathematical derivation.
- Examples
- Uses train-validation-test splits, labeled-versus-unlabeled separation, synthetic image realism, and changing feature distributions.
- What you can do after
- Diagnose/debug with adversarial validation and repeated distribution checks before trusting offline metrics or production inputs.
Read how Machine Learning System Design explains probability distribution →
Build a DeepSeek Model (From Scratch)
A probability distribution assigns nonnegative probabilities to possible outcomes, with the probabilities summing to one.
- How it is used
- Represents model confidence over alternatives for distillation, next-token selection, and expert weighting.
- How deep it goes
- Computes softmax normalization and traces temperature effects with four-class logits.
- Examples
- Compares cat, dog, fox, and bird probabilities across temperatures, and shows probabilities selecting tokens and weighting experts.
- What you can do after
- Understand how distributions encode alternatives, guide token selection, and weight selected experts.
Read how Build a DeepSeek Model (From Scratch) explains probability distribution →
Applied Reinforcement Learning
A probability distribution specifies the probabilities assigned to the possible values of a random variable.
- How it is used
- Maps uncertain choices to probabilities for next-token generation and customer-state simulation.
- How deep it goes
- Explains logit conversion, token selection, and empirical frequency normalization, but gives no general mathematical treatment.
- Examples
- Uses next-token decoding and simulated Buy Pro customer-state transitions as examples.
- What you can do after
- Build it from scratch by simulating transitions and normalizing observed next-state counts into probabilities.
Read how Applied Reinforcement Learning explains probability distribution →
Timeless Algorithms, The Foundational Ideas
A probability distribution assigns nonnegative probabilities to possible outcomes so that the probabilities over the defined outcome space sum to one.
- How it is used
- Represents uncertainty over possible outcomes in classifiers and next-token prediction.
- How deep it goes
- Defines valid distributions through complete outcome sets summing to one and applies this condition, without developing a general probability formalism.
- Examples
- Uses spam classification and diagnosis to illustrate probabilities across mutually exclusive, exhaustive outcomes.
- What you can do after
- Evaluate whether a classifier's probabilities cover its complete set of outcomes and sum to one.
Read how Timeless Algorithms, The Foundational Ideas explains probability distribution →
Building Quantum Software with Python
A probability distribution is a function assigning probabilities to possible outcomes, with the probabilities summing to one.
- How it is used
- Uses measurement outcomes to support random sampling, search, and estimation in quantum computations.
- How deep it goes
- Defines normalization, connects probabilities to amplitudes, and demonstrates Python sampling with repeated-run counts.
- Examples
- Uses biased-coin measurement, outcome–probability tables, Python samples, and uniform, binomial, raised-cosine, and normal-approximation distributions.
- What you can do after
- Apply it via quantum measurement or Python sampling to generate outcomes and estimate probabilities from counts.
Read how Building Quantum Software with Python explains probability distribution →
Effective Data Analysis
A distribution describes how values of a variable are arranged across their possible range and frequencies.
- How it is used
- Supports exploratory data analysis, statistical-test selection, assumption checking, group comparison, and stakeholder reporting.
- How deep it goes
- Descends from plotting and summary measures to normality assumptions, transformations, sample-size analysis, and non-parametric alternatives.
- Examples
- Uses histograms, boxplots, bimodal data, synthetic assessment groups, and Boston–New York City weather comparisons.
- What you can do after
- Evaluate/understand data shape, summarize spread, check test assumptions, choose alternatives, and communicate inferential limits.
Read how Effective Data Analysis explains probability distribution →
Build a Reasoning Model (From Scratch)
A normalized set of values over tokens that sum to 1 and can be sampled from to choose the next token.
- How it is used
- Converts temperature-scaled next-token logits into sampling probabilities during generation.
- How deep it goes
- Defines normalization, verifies sums, visualizes scores, and demonstrates repeated sampling without deriving softmax internals.
- Examples
- Uses the Berlin token, probability plots, probability-sum checks, and repeated multinomial samples.
- What you can do after
- Apply it via PyTorch to normalize logits, inspect probabilities, and sample one or many candidate tokens.
Read how Build a Reasoning Model (From Scratch) explains probability distribution →
Delivering Machine Learning Projects: From design to deployment
A distribution is the pattern of values, frequencies, or probabilities across the possible values of a variable.
- How it is used
- Uses distributions to validate data during exploratory analysis and to test whether candidate models can express required outputs.
- How deep it goes
- Examines distributions through plausibility questions, range checks, and output-capability tests rather than mathematical derivations.
- Examples
- Uses customer transaction patterns, seasonal traffic, unexplained range gaps, and binary versus graduated control signals.
- What you can do after
- Evaluate data plausibility and reject modeling approaches unable to represent the required output distribution.
Fabulous Adventures in Data Structures and Algorithms
A probability distribution specifies the probabilities assigned to the possible values of a random quantity.
- How it is used
- Models random quantities in programs so games and simulations can sample outcomes with nonuniform odds.
- How deep it goes
- Defines support and PMFs, develops finite discrete sampling, and implements weighted Bernoulli distributions while deferring continuous distributions.
- Examples
- Uses dice, coins, colored marbles, card and song selection, and weighted Bernoulli coin flips.
- What you can do after
- Build it from scratch as a C# distribution abstraction and sample uniform or weighted discrete outcomes.
Read how Fabulous Adventures in Data Structures and Algorithms explains probability distribution →
D3.js in Action, Third Edition
A data distribution is the pattern of values and their frequencies or densities across a variable's possible range.
- How it is used
- Uses distributions to assess how frequently values occur within ranges and choose suitable visual comparisons.
- How deep it goes
- Explains binning and D3 implementation, then applies histograms, box plots, pyramid charts, and violin plots.
- Examples
- Uses 788 survey respondents’ salaries, salary brackets, and role-based earnings as distribution examples.
- What you can do after
- Build it from scratch with D3 by preprocessing values into bins and rendering distribution charts.
Read how D3.js in Action, Third Edition explains probability distribution →
Build Python Web Apps with Streamlit
A probability distribution assigns likelihoods to the possible values or events of a random variable.
- How it is used
- Explains how an LLM chooses the next token and how generation settings alter response variability.
- How deep it goes
- Defines the token-likelihood curve and works through temperature and top_p, without developing broader probability theory.
- Examples
- Uses five candidate tokens with explicit probabilities to demonstrate a top_p cutoff.
- What you can do after
- Operate/configure LLM generation by relating temperature and top_p settings to creativity and predictability.
Read how Build Python Web Apps with Streamlit explains probability distribution →
Data Without Labels
A probability distribution specifies the probabilities assigned to possible values or configurations of a random system.
- How it is used
- Frames generative modeling, synthetic-data creation, density estimation, and probabilistic neural-network training.
- How deep it goes
- Explains data, noise, model, and Boltzmann distributions, including normalization and distribution matching, but not detailed probability derivations.
- Examples
- Uses Gaussian or uniform noise for GAN input and Boltzmann distributions for modeling neural-network states.
- What you can do after
- Evaluate how generative and energy-based models use distributions to generate data or compare learned and observed behavior.
Read how Data Without Labels explains probability distribution →
Cyber Threat Hunting
A statistical distribution describes the frequencies, probabilities, or arrangement of values across possible observations.
- How it is used
- Uses distributions to uncover beaconing, anomalies, outliers, and possible data exfiltration during threat-hunting investigations.
- How deep it goes
- Explains filtering, grouping, charting, skew, concentration, and tails, but defers formal probability theory.
- Examples
- Demonstrates time-difference histograms and byte distributions for connections from two endpoints to 162.125 addresses.
- What you can do after
- Diagnose suspicious communication by plotting field values, recognizing distribution patterns, and comparing recurring values across related fields.
Read how Cyber Threat Hunting explains probability distribution →
Experimentation for Engineers
A mathematical description of the possible values of a random quantity and their probabilities.
- How it is used
- Frames distributions as uncertainty models for choosing between exchange execution strategies.
- How deep it goes
- Explains distributions through aggregate measurements, standard error, z scores, and a 5% decision rule.
- Examples
- Uses ASDAQ and BYSE execution costs, aggregate measurements, NumPy calculations, and z-score threshold diagrams.
- What you can do after
- Evaluate whether measured differences justify routing trades to one exchange while controlling an explicit error probability.
Read how Experimentation for Engineers explains probability distribution →
Hacking Cryptography
A probability distribution assigns probabilities to the possible outcomes of a random process.
- How it is used
- Quantifies unpredictability in random number generators by relating outcome probabilities to entropy.
- How deep it goes
- Calculates entropy with a binary-log equation and validated Go inputs, stopping at biased coin distributions.
- Examples
- Uses fair and biased coin tosses, an entropy equation, a flowchart, and a Go calculation program.
- What you can do after
- Apply it via a Go program to validate two-outcome probabilities and calculate their entropy.
Read how Hacking Cryptography explains probability distribution →
CUDA for LLMs
A probability distribution assigns nonnegative probabilities to possible outcomes such that their total is one.
- How it is used
- Maps neural-network logits and transformer attention scores to normalized probabilities.
- How deep it goes
- Explains stable normalization and compares naive, online, and fused implementations, while identifying parallelism and memory bottlenecks.
- Examples
- Works through a four-value softmax row and shows naive and online CUDA implementations.
- What you can do after
- Build a numerically stable softmax by shifting logits, exponentiating, summing, and normalizing each row.
Build a Text-to-Image Generator (from Scratch)
A probability distribution describes the possible values of a random variable and the probabilities associated with those values.
- How it is used
- Represents uncertainty in latent image representations and next-token predictions rather than single deterministic outputs.
- How deep it goes
- Traces parameterization, sampling, reconstruction, and vocabulary prediction, but defers a formal treatment of VAEs.
- Examples
- Uses normal latent distributions for images and target-vocabulary distributions for German-to-English token generation.
- What you can do after
- Evaluate how models encode uncertainty, sample representations, reconstruct images, and select tokens sequentially.
Read how Build a Text-to-Image Generator (from Scratch) explains probability distribution →
Software Testing with Generative AI
A mathematical representation assigning probabilities to the possible values or outcomes of a variable.
- How it is used
- Predicts likely next words in language-model and keyboard suggestions.
- How deep it goes
- Defines probability-based prediction and connects it to training, but stops short of mathematical formalization.
- Examples
- Uses phone-keyboard suggestions, the phrase “I am,” and candidate words such as “away” and “sandalwood.”
- What you can do after
- Understand how trained models rank possible next words using learned probabilities.
Read how Software Testing with Generative AI explains probability distribution →
Build AI Drug Discovery Pipelines
A probability distribution assigns probabilities to possible outcomes or values of a random variable.
- How it is used
- Connects probability distributions to generative modeling, where learned data-generation patterns support sampling new data.
- How deep it goes
- Explains learning and sampling from a distribution but stops short of mathematical, algorithmic, or implementation details.
- Examples
- Uses a dataset, a learned probabilistic model, and sampled new data as the central example.
- What you can do after
- Understand how generative models learn data-generation patterns and sample new data from them.
Read how Build AI Drug Discovery Pipelines explains probability distribution →
Grokking Bayes
A probability distribution is a mathematical specification of probabilities across the possible values or outcomes of a variable.
- How it is used
- Represents uncertainty about unknown quantities and supplies distributions for Bayesian beliefs, predictions, and model parameters.
- How deep it goes
- Defines distributions through possible outcomes and parameters, then explains priors and sampling; continuous distributions are deferred in the introductory proportion example.
- Examples
- Uses a rain forecast, coffee-versus-tea proportions, and histograms of samples from Beta and normal distributions.
- What you can do after
- Apply it via scipy.stats to draw possible values, and evaluate/understand uncertainty beyond a single estimate.
Sutskever's List
The probability distribution of examples and patterns from which a model learns during training.
- How it is used
- Explains why model capabilities and failures vary across tasks and may change after deployment.
- How deep it goes
- Traces data frequency to performance differences through examples, without formalizing the distribution mathematically.
- Examples
- Contrasts arithmetic limits, context-length failures, uneven reasoning, and two website-generation tasks.
- What you can do after
- Evaluate model behavior by considering how well relevant patterns are represented in training data.
Read how Sutskever's List explains probability distribution →
Also covered in
- Human-in-the-Loop Machine Learning: Active learning and annotation for human-centered AI
- Snowflake Data Engineering
- Build High Value Software SystemsIn early access (MEAP)
- Build an Advanced RAG Application (From Scratch)In early access (MEAP)
- Time Series Forecasting Using Foundation Models
- AI Agents in Action, Second Edition
- Software Engineering for Data ScientistsIn early access (MEAP)
- Build a Robo-Advisor with Python (From Scratch)
- LLM Evaluation and Alignment, The Foundational IdeasIn early access (MEAP)
- Data-Driven Cybersecurity
- Deep Learning with PyTorch, Second Edition
- Privacy-Preserving Machine Learning
What to know first
- language modelA language model is a computational model that represents patterns in linguistic sequences to assign probabilities, predict, generate, or evaluate language.
- meanThe mean is a measure of central location equal to the arithmetic average of numerical observations, or the probability-weighted average of a random variable’s possible values.
- normal distributionA normal distribution is a continuous probability distribution with a symmetric, bell-shaped density determined by its mean and variance.
- generationGeneration is the production of an output by a computational model from supplied input or context, often using patterns learned from data.
Related concepts
- softmaxproduced by · Softmax is a function that exponentiates each value in a score vector and normalizes the results to produce positive values summing to one, forming a probability distribution.
- normal distributionincludes · A normal distribution is a continuous probability distribution with a symmetric, bell-shaped density determined by its mean and variance.
- language modelproduced by · A language model is a computational model that represents patterns in linguistic sequences to assign probabilities, predict, generate, or evaluate language.
- cross entropy lossused by · Cross-entropy loss measures the expected negative log probability that a predicted distribution assigns to outcomes drawn from a target distribution.
- Poisson distributionincludes · The Poisson distribution is a discrete probability distribution that models the count of events occurring independently at a constant average rate within a fixed interval or exposure.
- uniform distributionincludes · A probability distribution that assigns equal probability to every outcome in a discrete support or constant probability density throughout a continuous support.
Questions about probability distribution
What is probability distribution?
A probability distribution is a mathematical specification assigning probabilities or probability densities to the possible values or outcomes of a random variable.
Which Manning books explain probability distribution?
Math and Architectures of Deep Learning, Statistics Every Programmer Needs, Causal AI, Statistics Slam Dunk, Outlier Detection in Python, The Well-Grounded Data Analyst, Learn C++ by Example, Starting Data Analytics with Generative AI and Python and 25 more.
What should I know before learning probability distribution?
Manning books that teach probability distribution usually introduce language model, mean, normal distribution and generation first.
What kinds of probability distribution are there?
Kinds of probability distribution include normal distribution, Poisson distribution and uniform distribution.
What is probability distribution also called?
Probability distribution is also called data distribution, probabilistic distributions, random distribution or statistical distribution.
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.
































