---
tag: 0R46A1XY60
kind: definition
name: Almost surely
msc: [60A05]
defines: 0ST21PGDAP
uses: [0ZYBZ34RT2, 00SQGJNRTB]
sources:
  - url: https://en.wikipedia.org/wiki/Almost_surely
    locator: Formal definition
---

## Definition

Let $(\Omega, \mathcal{F}, P)$ be a [[probability space|0ZYBZ34RT2]].
An [[event|00SQGJNRTB]] $E \in \mathcal{F}$ happens almost surely if $P(E) = 1$.
More generally, a property of outcomes holds almost surely (a.s.) if an event of probability $0$ contains all outcomes where it fails.

## Remarks

The property need not hold for all outcomes. In this sense, "almost surely" is weaker than "surely".
Two random variables $X$ and $Y$ are equal almost surely if $P(X = Y) = 1$. They then have the same law.
A countable intersection of events that happen almost surely also happens almost surely.
It is the probability form of "almost everywhere" in measure theory.

## Explanations

### L1 human

If you choose a uniform random number in $[0, 1]$, it is almost surely irrational. Rational outcomes are possible, but together they have probability $0$.
If you toss a fair coin forever, you get heads at least once almost surely.
