In measure theory (a branch of mathematical analysis), a property holds almost everywhere if, in a technical sense, the set for which the property holds takes up nearly all possibilities. The notion of "almost everywhere" is a companion notion to the concept of measure zero, and is analogous to the notion of almost surely in probability theory.
More specifically, a property holds almost everywhere if it holds for all elements in a set except a subset of measure zero,[1] [2] or equivalently, if the set of elements for which the property holds is conull. In cases where the measure is not complete, it is sufficient that the set be contained within a set of measure zero. When discussing sets of real numbers, the Lebesgue measure is usually assumed unless otherwise stated.
The term almost everywhere is abbreviated a.e.;[3] in older literature p.p. is used, to stand for the equivalent French language phrase presque partout.[4]
A set with full measure is one whose complement is of measure zero. In probability theory, the terms almost surely, almost certain and almost always refer to events with probability 1 not necessarily including all of the outcomes. These are exactly the sets of full measure in a probability space.
Occasionally, instead of saying that a property holds almost everywhere, it is said that the property holds for almost all elements (though the term almost all can also have other meanings).
If
(X,\Sigma,\mu)
P
X
N\in\Sigma
\mu(N)=0
x\inX\setminusN
P
P
x
P(x)
It is not required that the set
\{x\inX:\negP(x)\}
\{x\inX:\negP(x)\}
N
X
N
\{x\inX:\negP(x)\}
P
Q
Q
(Pn)
\forallnPn
(Px)x\in
\forallxPx
\mu
X=R
Px
x
Px(y)
y ≠ x
Px
\forallxPx
As a consequence of the first two properties, it is often possible to reason about "almost every point" of a measure space as though it were an ordinary point rather than an abstraction. This is often done implicitly in informal mathematical arguments. However, one must be careful with this mode of reasoning because of the third bullet above: universal quantification over uncountable families of statements is valid for ordinary points but not for "almost every point".
f(x)\ge0
a<b
f(x)=0
a<b
\epsilon
Outside of the context of real analysis, the notion of a property true almost everywhere is sometimes defined in terms of an ultrafilter. An ultrafilter on a set X is a maximal collection F of subsets of X such that:
A property P of points in X holds almost everywhere, relative to an ultrafilter F, if the set of points for which P holds is in F.
For example, one construction of the hyperreal number system defines a hyperreal number as an equivalence class of sequences that are equal almost everywhere as defined by an ultrafilter.
The definition of almost everywhere in terms of ultrafilters is closely related to the definition in terms of measures, because each ultrafilter defines a finitely-additive measure taking only the values 0 and 1, where a set has measure 1 if and only if it is included in the ultrafilter.