Almost surely

In probability theory, one says that an event happens almost surely (sometimes abbreviated as a. s.) if it happens with probability one. In other words, the set of possible exceptions may be non-empty, but it has probability zero.

In probability experiments on a finite sample space, there is often no difference between almost surely and surely. However, the distinction becomes important when the sample space is an infinite set, because an infinite set can have non-empty subsets of probability zero.

An example of the use of this concept is the strong version of the law of large numbers.

Almost never describes the opposite of almost surely: an event that happens with probability zero happens almost never.

Definition
Let $$(\Omega,\mathcal{F},P)$$ be a probability space. An event $$E \in \mathcal{F}$$ happens almost surely if $$P(E)=1$$. Equivalently, $$E$$ happens almost surely if the probability of $$E$$ not occurring is zero: $$P(E^C) = 0$$. More generally, any event $$E \subseteq \Omega$$ (not necessarily in $$\mathcal{F}$$) happens almost surely if $$E^C$$ is contained in a null set: a subset of some $$N\in\mathcal F$$ such that $P(N)=0$. The notion of almost sureness depends on the probability measure $$P$$. If it is necessary to emphasize this dependence, it is customary to say that the event $$E$$ occurs P-almost surely, or almost surely (P).