Probability
Probability is the mathematics of uncertainty, and inference is its applied face: a sample is one draw from a population, and the question “could this result plausibly be chance?” is a question about probability. This page defines events and their combinations, the rules for computing probabilities, and the machinery of conditioning that underlies p-values and Bayes’ theorem.
What probability is
The probability of an event is a number between 0 and 1 expressing how likely the event is. Values 0 and 1 assign no probability and certainty in the probability model, respectively; in continuous models, however, a probability-zero event is not necessarily logically impossible. Three interpretations give the number its meaning.
-
Long-run relative frequency. The probability of an outcome is the proportion of times it would occur in a long series of independent repetitions of a random process. A single coin toss is unpredictable; the proportion of heads over repeated tosses of a fair coin tends toward 0.5 as the number of repetitions grows. This frequentist reading is the foundation of sampling-based inference.
-
Theoretical (classical) probability. When a process has finitely many equally likely outcomes, probabilities follow by counting:
The numerator counts outcomes, not events, and the formula is only as good as the equally-likely assumption. The outcomes “0, 1, 2 heads in two tosses,” for example, are not equally likely — there are two ways to get one head but one way each to get zero or two.
-
Empirical probability. When the process cannot be assumed uniform, probability is estimated from observed frequencies: the proportion of occurrences of in past data. Empirical probabilities are estimates; theoretical and long-run probabilities are what they estimate.
Sample spaces and events
The sample space is the set of all possible outcomes of a random process; it may be finite ( for one coin toss) or infinite (any number in an interval). An event is a subset of — one or more outcomes viewed as a single proposition. The complement of an event consists of all outcomes not in , and
Combining events
For two events and :
- The union (” or ”) contains outcomes in either event or both.
- The intersection (” and ”) contains outcomes in both.
- Events are mutually exclusive (disjoint) if : they cannot occur together, so .
Addition rule
The probability that at least one of two events occurs is
The intersection is subtracted because it is counted in both and — a Venn diagram makes the double counting visible. For mutually exclusive events the rule reduces to .
Conditional probability
A conditional probability is the probability of one event within the restricted world where another event is known to have occurred:
Conditioning renormalizes the sample space to : only the outcomes in remain possible, and their probabilities are rescaled to sum to 1. For example, on a fair die with (even) and (above 3), — two of the three outcomes in are even.
The order of conditioning matters
In general
With the same die, let and . Then — a 6 is certainly even — but : only one of the three even faces is a 6. The two conditionals describe different restrictions of the sample space and coincide only in special cases. This asymmetry is not a technicality: a p-value is , not the probability of the null given the data. Keeping the condition and the target in their proper roles is the subject of P-Values.
Marginal, joint, and conditional
In a two-way classification, the joint probability is the probability of both events together; a marginal probability such as is the overall probability of across all groups; a conditional probability such as is the probability of within one group. The three are linked by the conditional-probability definition above.
Multiplication rule
Rearranging the definition of conditional probability yields the general multiplication rule for joint probability:
Either factorization is valid; choose the one that matches what is known. The rule chains to more events:
Independence
Events and are independent when knowing one occurred changes nothing about the other: , equivalently . For independent events the multiplication rule simplifies to
extended to any number of independent events by multiplying their marginal probabilities. Independence is an assumption about how the world generates data (separate trials, unrelated mechanisms); it cannot be manufactured by wishing, and it should be stated when it is used.
Independence is not mutual exclusivity
The two simplifying conditions are easily confused and are almost opposite in force. Mutual exclusivity is a property of the events: they share no outcomes. Independence is a property of the probabilities: knowing one occurred leaves the other’s probability unchanged. If and are mutually exclusive and both have positive probability, they cannot be independent — conditioning on drives the probability of to zero. Disjointness shrinks the joint to nothing; independence leaves the joint as the product of the marginals.
Law of total probability
An event can usually occur through several mutually exclusive routes. If partition the sample space (mutually exclusive and exhaustive), then
The marginal probability of is a weighted average of its conditional probabilities across the groups, weighted by the groups’ probabilities. For a binary partition this reads .
Screening example. Suppose a condition affects 1% of a population, , and a test has sensitivity and false positive rate . Then
so about 8.8% of all tests are positive even though only 1% of the population has the condition.
Bayes’ theorem
The multiplication rule gives two expressions for the same joint probability, . Equating them and dividing yields Bayes’ theorem:
where the denominator uses the law of total probability when is one member of the partition . Bayes’ theorem reverses the conditioning: it converts the probability of evidence given a hypothesis into the probability of the hypothesis given the evidence.
Continuing the screening example, the probability that a person with a positive test actually has the condition is
Despite 90% sensitivity, only about one in ten positive results is a true case, because the condition is rare and false positives are many in absolute terms. Base rates drive this result; neglecting them is the most common error in conditional-probability reasoning, and the reason a low-prevalence screening program needs confirmatory testing.
Random variables and distributions
A random variable assigns a numerical value to each outcome of a random process. It is discrete when its possible values form a finite or countable set (counts, correct responses, numbers of events) and continuous when it can take any value in an interval (reaction times, heights, blood pressure).
Probability mass functions
For a discrete random variable, the probability mass function (PMF) gives the probability of each value:
Point probabilities are meaningful for discrete variables: is well defined and generally positive. Named families of PMFs model common counting processes; the binomial family in particular underlies the exact tail probabilities of the Sign Test.
Probability density functions
For a continuous random variable, individual points carry no probability:
because no point occupies any share of an interval’s infinitely many possibilities. Probability attaches to ranges instead, through the probability density function (PDF) :
The total area under a density curve is 1, and probability is area over an interval. The height of the curve is not a probability — it is a density, probability per unit of , and can exceed 1. A density curve is therefore read by area, never by height; this area interpretation is exactly what makes tail probabilities and p-values geometrically meaningful once a sampling distribution is specified in Sampling Distributions.
Connections
The rules on this page — conditioning, total probability, Bayes’ theorem — are general-purpose reasoning tools that appear wherever uncertainty is inverted: diagnostic testing, classification, and evidence evaluation. In the inferential chain of this collection they are prerequisites for Sampling Distributions, Hypothesis Testing, and P-Values; the Sign Test applies them to a concrete binomial question.