| name | probability-theory |
| description | Mathematical foundations of uncertainty and random phenomena. Covers sample spaces, events, axioms, conditional probability, Bayes' theorem, independence, random variables, distributions (discrete and continuous), expected value, variance, the law of large numbers, and the central limit theorem. Use when computing probabilities, reasoning about random events, working with probability distributions, or building the foundation for statistical inference. |
| type | skill |
| category | statistics |
| status | stable |
| origin | tibsfox |
| modified | false |
| first_seen | "2026-04-11T00:00:00.000Z" |
| first_path | examples/skills/statistics/probability-theory/SKILL.md |
| superseded_by | null |
Probability Theory
Probability is the mathematical language of uncertainty. It provides the axiomatic foundation on which all of statistical inference rests: without probability, there is no hypothesis testing, no confidence intervals, no Bayesian updating, no regression. This skill covers the core machinery from sample spaces through the central limit theorem.
Agent affinity: bayes (conditional probability, Bayes' theorem), pearson (distributional theory), efron (computational probability)
Concept IDs: stat-probability-foundations, stat-experimental-theoretical, stat-expected-value, stat-conditional-probability
Axioms and Sample Spaces
Kolmogorov's axioms
A probability function P on a sample space S satisfies:
- Non-negativity: P(A) >= 0 for every event A.
- Normalization: P(S) = 1.
- Countable additivity: For mutually exclusive events A_1, A_2, ..., P(A_1 union A_2 union ...) = P(A_1) + P(A_2) + ...
Everything in probability follows from these three axioms plus set theory.
Sample space and events
- Sample space (S): The set of all possible outcomes of a random experiment.
- Event (A): A subset of S. "The die shows an even number" = {2, 4, 6}.
- Complement (A^c): Everything in S not in A. P(A^c) = 1 - P(A).
- Empty event: P(empty set) = 0.
Counting and equally likely outcomes
When all outcomes are equally likely: P(A) = |A| / |S|.
This requires the fundamental counting tools:
- Multiplication principle: If task 1 has n_1 outcomes and task 2 has n_2 outcomes, the sequence has n_1 * n_2 outcomes.
- Permutations: n! / (n-k)! ordered arrangements of k items from n.
- Combinations: C(n,k) = n! / (k!(n-k)!) unordered selections.
Conditional Probability
Definition
P(A | B) = P(A intersect B) / P(B), provided P(B) > 0.
Read as "the probability of A given B." Conditioning restricts the sample space to the event B.
The multiplication rule
P(A intersect B) = P(A | B) * P(B) = P(B | A) * P(A).
For three events: P(A intersect B intersect C) = P(A) * P(B | A) * P(C | A intersect B).
The law of total probability
If B_1, B_2, ..., B_n partition S (mutually exclusive and exhaustive):
P(A) = sum over i of P(A | B_i) * P(B_i).
This is essential for "breaking a problem into cases" in probability.