liveBook · Manning

Randomness

Also called stochasticity

Randomness is the property of a process or outcome involving chance or probabilistic variation rather than being fully determined by available conditions.

How 6 Manning books explain it

Learn AI-Assisted Python Programming, Second Edition

Randomness is the property of an outcome or event being determined by chance rather than being fully predictable from the available information.

How it is used
Uses chance to add variety, surprise, risk, and uncertainty to games and to explain variable large-language-model outputs.
How deep it goes
Explains Python integer and floating-point generation with examples, then applies it to games without developing randomness internals.
Examples
Demonstrates random digits, dice rolls, floating-point values, secret codes, enemy behavior, puzzle orientation, and attack damage.
What you can do after
Apply it via Python's random module to generate inclusive integers and floating-point values for simple games.

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

Agent Design Patterns

The property of involving chance or probabilistic variation rather than fully deterministic behavior.

How it is used
Frames model variability as both a code–AI interface risk and a resource for repeated-sampling agent patterns.
How deep it goes
Explains variability through probabilistic token sampling, then develops bounded retry and assessment behavior without formal probability mathematics.
Examples
Uses mathematics agents, repeated answers to a difficult problem, and a generic Python Resampler to make variation concrete.
What you can do after
Apply it via a bounded Resampler or Voter to handle variable model outputs through acceptance criteria or reconciliation.

Read how Agent Design Patterns explains randomness →

Statistics Slam Dunk

Randomness is the absence of a deterministic pattern in the occurrence of outcomes, subject to probabilistic regularities.

How it is used
Frames sports analysis around distinguishing random streaks from genuine order, causality, and hot-hand claims.
How deep it goes
Explains simulation, independent trials, streak calculations, and player-level interpretation, but stops short of formal probability proofs.
Examples
Uses fair-coin simulations and 2019–20 NBA free-throw streaks from Giannis Antetokounmpo and James Harden.
What you can do after
Apply it via R simulations and streak analysis to evaluate whether apparent success patterns exceed random variation.

Read how Statistics Slam Dunk explains randomness →

Real-World Cryptography

Randomness is the property of outcomes or data being difficult to predict and lacking a discernible deterministic pattern.

How it is used
Supplies unpredictable values for cryptographic keys, nonces, IVs, challenges, and prime numbers.
How deep it goes
Explains unpredictability, uniform distributions, physical sources, PRNG failures, and conservative sourcing, without implementation-level generation details.
Examples
Uses dice, lottery numbers, calculator sequences, chaotic physical phenomena, and the Debian-era OpenSSL PRNG failure.
What you can do after
Apply it by choosing operating-system or trusted-library randomness and avoiding predictable or noncryptographic PRNGs.

Read how Real-World Cryptography explains randomness →

Hacking Cryptography

Randomness is the absence of a predictable pattern in an outcome or sequence according to a specified model of probability.

How it is used
Frames randomness as a foundational security input for cryptographic confidentiality, integrity, authenticity, and secret generation.
How deep it goes
Explains unpredictability, contrasts RNG types, traces entropy sourcing, and identifies weak randomness as an algorithm-breaking failure.
Examples
Uses calculator RAND, magician-selected numbers, cryptographic keys and salts, and predictable ECDSA nonces as concrete examples.
What you can do after
Evaluate cryptographic implementations for randomness dependencies and diagnose how poor-quality random input can nullify algorithmic security.

Read how Hacking Cryptography explains randomness →

Causal AI

Randomness is the absence of a deterministic specification of an outcome, represented in a model by stochastic variation or random variables.

How it is used
Frames stochastic variation for probabilistic generative modeling, causal modeling, inference, and decision-making.
How deep it goes
Defines random variables, probability interpretations, deterministic data-generating processes, and computational sampling, but defers detailed inference algorithms.
Examples
Uses repeated die rolls, three-sided dice, coin flips, and Pyro random-process models.
What you can do after
Evaluate/understand how models represent variation through random variables, distributions, probability interpretations, and generated samples.

Read how Causal AI explains randomness →

Also covered in

What to know first

Related concepts

Questions about randomness

What is randomness?

Randomness is the property of a process or outcome involving chance or probabilistic variation rather than being fully determined by available conditions.

Which Manning books explain randomness?

Learn AI-Assisted Python Programming, Second Edition, Agent Design Patterns, Statistics Slam Dunk, Real-World Cryptography, Hacking Cryptography and Causal AI.

What should I know before learning randomness?

Manning books that teach randomness usually introduce language model, probability theory, digital twin and ECDSA first.

What is randomness part of?

Randomness is part of probabilistic model. A probabilistic model is a mathematical representation of uncertain variables, relationships, or outcomes using probability distributions.

What is randomness also called?

Randomness is also called stochasticity.

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.