Almost Surely¶
Definition¶
Fix a sample space with a probability function . An event happens almost surely (a.s.), or with probability one (w.p.1), if
Equivalently, its complement has probability zero. More generally, a statement about outcomes holds almost surely if the set of outcomes where it fails is contained in an event of probability zero.
Two random variables and on the same sample space are equal almost surely, written a.s., if
In the same way, a.s. means , and is almost surely constant if for some number .
Interpretation¶
"Almost" is there because the exceptional set need not be empty: it may contain outcomes that are perfectly possible, yet carry total probability zero. Probability one is therefore not the same as "for every outcome", and probability zero is not the same as "impossible".
The figure takes the sample space with probability equal to length, and , so . The variable from the Examples follows the same line as except at the single outcome , where it drops to . The outcome is perfectly possible, yet the event has probability zero, so almost surely. The dashed line shows the reverse situation: it has the same distribution as but meets it only at , so and are almost surely different.
For expectations, variances and distributions, what happens on an event of probability zero is invisible, so random variables that are equal almost surely can be treated as the same.
The phrase is essential for limit statements such as the strong law of large numbers, which concern the whole sequence at once. "The sample mean converges to almost surely" allows some outcomes on which it does not converge, as long as together they have probability zero.
Equality almost surely is much stronger than equality in distribution. Equal distributions only say that and take values with the same probabilities; almost-sure equality says that they take the same value on (almost) every outcome.
Key Results¶
- If each happen almost surely, then so does , because the union of countably many probability-zero events has probability zero. In particular, a.s. and a.s. give a.s.
- If a.s., then and have the same distribution, and whenever either side exists. The converse fails: the same distribution does not imply almost sure equality.
- If a.s. and both expectations exist, then (monotonicity of expectation).
- If and , then a.s. By the Markov inequality, for every , and is a countable union of null events.
- if and only if a.s. (variance). This is the previous result applied to , or equivalently the Chebyshev inequality with .
- A sequence converges almost surely when the event happens almost surely; the strong law of large numbers is a statement of this kind. Almost-sure convergence implies convergence in probability, which is the mode of the weak law.
Examples¶
- If is a continuous random variable, then for every fixed , so a.s., even though may be a possible value. Taking a countable union, a variable is irrational a.s., since .
- Toss a fair coin infinitely often. The first tosses are all tails with probability , so the event "never heads" has probability at most for every , hence probability . Heads appears eventually almost surely, even though the all-tails sequence is a possible outcome.
- For , the variables and have the same distribution, but : they are almost surely different.
- Let except that when . Then a.s., so and .
- On a finite sample space in which every outcome has positive probability, the only event of probability zero is , so "almost surely" there means "for every outcome". The distinction only matters when some outcomes carry probability zero.
Prerequisites¶
Related Concepts¶
- Almost-Sure Convergence
- Strong Law of Large Numbers
- Convergence in Probability
- Generalized Markov Inequality
- Chebyshev Inequality
- Variance and Standard Deviation
- Continuous Random Variable
- Monotonicity of Expectation
Sources¶
- Nicky van Foreest · Probability Distributions · Week 7
Aliases: almost sure, with probability one, a.s., with probability 1, almost certainly Keywords: w.p.1, null event, probability zero, equal almost surely, probability zero is not impossible, almost surely constant Symbols: element of, infinity, mu, rational numbers, real numbers, sigma, sum
Last updated: 17 October 2026 21:53
Almost SurelyAlmost-Sure ConvergenceEventProbability FunctionRandom VariableStrong Law of Large NumbersConvergence in ProbabilityGeneralized Markov InequalityChebyshev InequalityVariance and Standard DeviationContinuous Random VariableMonotonicity of Expectation