NeuroGenesys.
Probability & InferenceAcademy • Foundations • Lesson 1 of 4

Probability as the arithmetic of uncertainty

7 min read • By Will Schulz • NeuroGenesys AI Academy

Every modern AI system that outputs a prediction, from a spam filter to a large language model, is in the business of assigning numbers to uncertain outcomes. Probability is the small set of rules those numbers must obey to stay consistent, and nearly everything else in machine learning is built on top of that arithmetic.

Outcomes, events and three axioms

Start with a sample space Ω\Omega: the set of everything that could happen. Roll a die and Ω={1,2,3,4,5,6}\Omega = \{1,2,3,4,5,6\}. Ask a language model for the next token and Ω\Omega is its vocabulary, perhaps 100,000 strings. An event is a subset of Ω\Omega: "the roll is even" is {2,4,6}\{2,4,6\}; "the next token is a digit" is the set of digit tokens.

A probability PP assigns each event a number. In 1933 Andrey Kolmogorov showed that the whole theory could be derived from three axioms:[1]

  1. P(A)≥0P(A) \ge 0 for every event AA.
  2. P(Ω)=1P(\Omega) = 1: something happens.
  3. If AA and BB cannot both happen (they are disjoint), P(A∪B)=P(A)+P(B)P(A \cup B) = P(A) + P(B) (and likewise for countably many disjoint events).

Everything else is a consequence. The complement rule, P(not A)=1−P(A)P(\text{not } A) = 1 - P(A), follows because AA and its complement are disjoint and together make up Ω\Omega. For events that can overlap, inclusion–exclusion corrects the double count:

P(A∪B)=P(A)+P(B)−P(A∩B).P(A \cup B) = P(A) + P(B) - P(A \cap B).

Why should degrees of belief, rather than long-run frequencies, obey these same rules? Richard Cox argued in 1946 that any system for reasoning about plausibility that satisfies two consistency requirements (the plausibility of "not A" is determined by that of A, and the plausibility of "A and B" is determined by that of B and of A given B) must, up to rescaling, be isomorphic to probability theory.[2] This is the formal version of Laplace's description of probability as common sense reduced to calculation.[3] It means the rules are not just a convention for dice: they apply to a model's belief about the next word, or your belief that a benchmark result will replicate.

Conditioning: updating the denominator

The conditional probability of AA given that BB has happened is

P(A∣B)=P(A∩B)P(B),P(B)>0.P(A \mid B) = \frac{P(A \cap B)}{P(B)}, \qquad P(B) > 0.

Conditioning shrinks the sample space to BB and renormalises. If a fair die shows an even number, the probability it is a 6 rises from 1/61/6 to 1/61/2=1/3\frac{1/6}{1/2} = 1/3.

Rearranged, the definition becomes the product rule: P(A∩B)=P(B) P(A∣B)P(A \cap B) = P(B)\,P(A \mid B). Applied repeatedly to a sequence of outcomes x1,…,xTx_1, \dots, x_T, it gives the chain rule of probability:

P(x1,x2,…,xT)=∏t=1TP(xt∣x1,…,xt−1).P(x_1, x_2, \dots, x_T) = \prod_{t=1}^{T} P(x_t \mid x_1, \dots, x_{t-1}).

This identity is exact, with no modelling assumptions, and it is the blueprint for every autoregressive language model. Rather than modelling the astronomically large joint distribution over whole texts, a model learns the conditional distribution of each next token given what came before, and the chain rule stitches the pieces back together. Bengio and colleagues' 2003 neural language model was framed in exactly these terms: learn a function that outputs P(xt∣context)P(x_t \mid \text{context}) and multiply.[4] The model's final layer turns arbitrary scores ziz_i into a valid distribution with the softmax, pi=ezi/∑jezjp_i = e^{z_i} / \sum_j e^{z_j}, which is non-negative and sums to one by construction, so axioms 1 and 2 hold automatically. See Next-token prediction for where this leads.

Why we work in logarithms

The chain rule multiplies many numbers below one. If a model gives each of 100 tokens probability 0.9, the whole sequence has probability 0.9100≈2.7×10−50.9^{100} \approx 2.7 \times 10^{-5}; for a 2,000-token document with typical per-token probabilities, the product underflows standard floating-point formats. Taking logarithms turns the product into a sum,

log⁡P(x1:T)=∑t=1Tlog⁡P(xt∣x<t),\log P(x_{1:T}) = \sum_{t=1}^{T} \log P(x_t \mid x_{<t}),

which is numerically stable and is the quantity training actually optimises (see Maximum likelihood).

Independence, and what it buys

Events AA and BB are independent when P(A∩B)=P(A) P(B)P(A \cap B) = P(A)\,P(B), equivalently P(A∣B)=P(A)P(A \mid B) = P(A): learning BB tells you nothing about AA. Independence is what lets small probabilities compound into large ones.

Worked example: coverage from repeated sampling

Suppose a model solves a hard problem on a single attempt with probability p=0.1p = 0.1. Draw NN independent attempts. What is the probability that at least one is correct?

"At least one success" is awkward to count directly, but its complement, "every attempt fails", is a single product:

P(at least one correct)=1−P(all wrong)=1−(1−p)N.P(\text{at least one correct}) = 1 - P(\text{all wrong}) = 1 - (1-p)^N.
NN(0.9)N(0.9)^Ncoverage 1−(0.9)N1-(0.9)^N
10.9000.100
100.3490.651
640.00120.9988

Brown and colleagues measured exactly this quantity, which they call coverage, for language models given many attempts, and found it kept rising across four orders of magnitude of samples.[5] The arithmetic explains why: the failure probability decays geometrically.

Check your understanding

A model answers a question correctly with probability 0.3 per attempt, and attempts are independent. What is the probability that at least one of two attempts is correct? What if the two attempts were perfectly correlated (always identical)?

Show answer +

Independent: 1−0.72=1−0.49=0.511 - 0.7^2 = 1 - 0.49 = 0.51. Perfectly correlated: the second attempt adds nothing, so the probability stays 0.30.3. Independence is what turns repeated tries into higher coverage.

Two warnings follow directly from the axioms.

Coverage is not accuracy. At least one of 64 attempts being right does not mean you can tell which one. Picking the winner requires a verifier, and the verifier's errors compound with NN as well. The NeuroGenesys paper Thurstone bounds Best-of-N works through a reference case (p=0.10p = 0.10) in which coverage at N=64N = 64 is 0.9988 while selected accuracy peaks near 0.70 and then falls as NN grows further.[6] The course on test-time compute develops this in detail.

Independence is an assumption, not a default. Samples from one model share its blind spots, and judges that read the same context share its errors. The lab's note A critic that shares the generator's prompt shares its errors measured a same-context critic that missed 12 of 12 planted errors that fresh critics all caught.[7] When events are positively correlated, 1−(1−p)N1-(1-p)^N overstates what repetition buys; in the extreme it buys nothing.

Check your understanding

A three-token continuation has conditional probabilities P(x1)=0.5P(x_1) = 0.5, P(x2∣x1)=0.4P(x_2 \mid x_1) = 0.4, P(x3∣x1,x2)=0.9P(x_3 \mid x_1, x_2) = 0.9. What is the probability of the continuation, and its natural-log probability?

Show answer +

By the chain rule, 0.5×0.4×0.9=0.180.5 \times 0.4 \times 0.9 = 0.18. The log probability is ln⁡0.5+ln⁡0.4+ln⁡0.9≈−0.693−0.916−0.105=−1.715\ln 0.5 + \ln 0.4 + \ln 0.9 \approx -0.693 - 0.916 - 0.105 = -1.715, and e−1.715≈0.18e^{-1.715} \approx 0.18.

Marginalisation

The last basic tool is the law of total probability. If events B1,…,BkB_1, \dots, B_k partition Ω\Omega (exactly one of them happens), then

P(A)=∑i=1kP(A∣Bi) P(Bi).P(A) = \sum_{i=1}^{k} P(A \mid B_i)\,P(B_i).

This is how you compute a probability you cannot observe directly by averaging over hidden cases. If 70% of a model's traffic is easy queries answered correctly 95% of the time and 30% is hard queries answered correctly 60% of the time, overall accuracy is 0.7×0.95+0.3×0.6=0.8450.7 \times 0.95 + 0.3 \times 0.6 = 0.845. A reported average hides that split, which is why a change in the query mix can move "accuracy" with no change in the model. Combined with the product rule, total probability gives Bayes' rule, the subject of the next lesson.

Key takeaways

  • Probability is defined by three axioms (non-negativity, normalisation, additivity for disjoint events); complements, inclusion–exclusion and everything else follow.
  • Conditioning restricts the sample space and renormalises. Chained together, conditionals give the exact factorisation P(x1:T)=∏tP(xt∣x<t)P(x_{1:T}) = \prod_t P(x_t \mid x_{<t}) that autoregressive language models implement.
  • Products of many probabilities underflow; work with summed log-probabilities.
  • Independence makes failure probabilities multiply, which is why repeated sampling raises coverage as 1−(1−p)N1-(1-p)^N. Correlation erodes that gain, and coverage is not the same as being able to pick the right answer.

Sources

  1. A. N. Kolmogorov (1933). Grundbegriffe der Wahrscheinlichkeitsrechnung. Ergebnisse der Mathematik, Springer, Berlin. https://doi.org/10.1007/978-3-642-49888-6 ↩

  2. R. T. Cox (1946). "Probability, Frequency and Reasonable Expectation." American Journal of Physics 14(1): 1–13. https://doi.org/10.1119/1.1990764 ↩

  3. P.-S. Laplace (1814). Essai philosophique sur les probabilités. Paris: Courcier. Digitised copy, Kyoto University Rare Materials Digital Archive: https://rmda.kulib.kyoto-u.ac.jp/en/item/rb00028954 ↩

  4. Y. Bengio, R. Ducharme, P. Vincent, C. Jauvin (2003). "A Neural Probabilistic Language Model." Journal of Machine Learning Research 3: 1137–1155. https://www.jmlr.org/papers/v3/bengio03a.html ↩

  5. B. Brown et al. (2024). "Large Language Monkeys: Scaling Inference Compute with Repeated Sampling." arXiv:2407.21787. https://arxiv.org/abs/2407.21787 ↩

  6. NeuroGenesys (2026). "Thurstone bounds Best-of-N: a 1927 identity, calibrated for modern verifiers." /research/thurstone-bounds-best-of-n ↩

  7. NeuroGenesys (2026). "A critic that shares the generator's prompt shares its errors: measured self-critique correlation." /research/correlated-critique ↩

Leadership

A word from the founder — on why the brain is the blueprint, and why the next decade of intelligence will be built here.

"The brain is the universe's only proof that general intelligence is possible. We treat it as the blueprint."

From cortical interfaces to photonic silicon, every program at NeuroGenesys exists to answer one question: how does intelligence arise — and how do we build it safely.

Will Schulz

Will Schulz

Founder, NeuroGenesys • AW3 Technology