Probability axioms
概率公理
Why cannot probabilities be added arbitrarily? Build sample spaces, events, and consistent rules with an uneven spinner.
probability-axiomsThree colors need not have equal probabilities
Suppose a spinner lands on red, blue, and green with probabilities , , and . These are explicitly stipulated model assumptions. Knowing that three outcomes exist does not make them equally likely; sector sizes and the spinning mechanism can change their probabilities.
“Red or blue” is one event, and “blue or green” another. Adding their probabilities directly counts blue twice. Probability axioms provide consistent rules for deciding when addition is valid, when overlap must be removed, and which possible outcomes a model actually describes.
A sample space, events, and three rules
The sample space contains complete possible outcomes of a trial, here the three colors. An event is a collection of outcomes, such as “not green.” In finite examples every subset can be an event. A probability function assigns values to events, not merely to individual outcomes. MML, Section 6.1
The axioms require nonnegativity, normalization, and countable additivity for pairwise disjoint events:
“Countable” means the events can be listed in a sequence; the rule does not extend indiscriminately to uncountably many events. The rigorous theory also specifies a -algebra of events closed under complements and countable unions. Finite examples need little of this machinery, but continuous models use it to restrict probability assignments to measurable events. MIT lecture, pages 6 and 17–18
Consequences include probability zero for the empty event, the complement rule, and inclusion–exclusion for two events:
Why subtract the intersection? Partition the union into “only in ,” “only in ,” and “in both.” These pieces do not overlap, and the intersection must be counted once. For the spinner, let mean red or blue and blue or green. Their probabilities are and , their intersection has probability , and their union has probability 1.
A finite model can equivalently assign nonnegative weights summing to 1 to individual outcomes, then add weights inside an event. This probability-mass representation agrees with the event rules. Deep Learning, Section 3.3
Use exact fractions to isolate the reasoning
This complete program uses Python’s standard-library Fraction. Events are sets: writing blue twice does not increase its probability. Unknown colors are rejected rather than silently changing the sample space.
from fractions import Fraction as F
weights = {"red": F(1, 2), "blue": F(1, 3), "green": F(1, 6)}
assert all(p >= 0 for p in weights.values())
assert sum(weights.values()) == 1
def probability(event):
event = set(event)
if not event <= weights.keys():
raise ValueError("event contains unknown outcomes")
return sum((weights[x] for x in event), F(0))
a, b = {"red", "blue"}, {"blue", "green"}
assert probability(a) == F(5, 6)
assert probability(b) == F(1, 2)
assert probability(a | b) == probability(a) + probability(b) - probability(a & b)
assert probability([]) == 0
assert probability(["blue", "blue"]) == F(1, 3)
An event with distinct outcomes requires lookups and additions. Integer bit lengths can grow in exact-fraction arithmetic, so this operation count is not a complete bit-complexity analysis. When the finite state space is large, enumeration may already be impractical; distributional structure or approximation becomes necessary.
Consistency does not establish realism
Assigning red 0.9, blue 0.1, and green 0 also satisfies nonnegativity and normalization. The axioms enforce internal consistency without deciding whether this describes the actual spinner. Data, sampling procedures, and domain knowledge test correspondence with reality.
Specify what a complete outcome means. For two successive spins, a three-color sample space compresses the process. That can be intentional if only the second color matters, but the compressed representation cannot directly answer whether both colors matched.
In continuous models a nonempty event can have probability zero, such as an ideal continuous uniform variable taking one specified value. Probability zero therefore does not always mean logical impossibility. Intuition from finite equally likely outcomes must be reconsidered when the assumptions change.
Check overlap before adding
- What is the probability of not green? Answer: .
- Can red and blue both occur in one spin? Answer: not in this single-color-outcome model, so their probabilities can be added directly.
- What is wrong with assigning all three outcomes probability ? Answer: their total is , violating normalization.
- Does including a color in the sample space but assigning it zero weight violate the axioms? Answer: no. Whether it is reasonable is a model-validation question.
Conditioning changes the reference set
This article uses the entire sample space as the reference. Conditional probability restricts attention to an event after receiving information, then renormalizes. A random variable maps complete outcomes to numerical quantities of interest. Separating outcomes, events, and numerical representations makes it easier to distinguish event overlap, sampling selection, and probability denominators when studying Bayesian inference.
Make a prediction, then check
When can P(A)+P(B) directly give the union probability?
Learning objectives
- Derive complement and inclusion–exclusion calculations from outcomes and events.
- Distinguish internal probabilistic consistency from correspondence with reality.
Prerequisites & connections
This article can be used as an entry point.
Explore related knowledge →References
- Introduction to Probability — Lecture 1: Probability Models and Axioms
John Tsitsiklis; MIT OpenCourseWare · 2018 - Mathematics for Machine Learning — mathematical foundations (2024-01-15 draft)
Marc Peter Deisenroth; A. Aldo Faisal; Cheng Soon Ong · 2020 - Deep Learning — Chapter 3: Probability and Information Theory
Ian Goodfellow; Yoshua Bengio; Aaron Courville · 2016
Version1 · Editorial status: Recorded technical checks completed
View technical check record (AI)
Codex · 2026-09-05 · Codex technical check: cited-source comparison, re-derivation and recalculation, bilingual argument comparison, and executed Python assertions; no independent human peer review.
- Checked nonnegativity, normalization, and countable additivity; retained measurable-event and continuous zero-probability qualifications.
- Recomputed 5/6, 1/2, intersection 1/3, and union 1 with exact fractions; repeated elements are treated as a set.
- Compared the main arguments, numerical examples, exercises, and answers across languages; structural checks additionally compare display equations, source lists, and code.
- Reviewed the answer-label rendering fix: only Markdown emphasis markers changed to strong tags; normalized text and all code are identical.
Source locations checked:
Related topics