A simple example measure assigns to a subregion of the
rectangle the fraction of the geometrical
area it occupies. Then, the rectangle's
boundary has measure 0, while its interior has measure 1. The interior is almost everywhere in the rectangle, but yet has a nonempty
complement.
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. In the subject of probability, which is largely based in measure theory, the notion is referred to as almost surely.
More specifically, a property holds almost everywhere if the set of elements for which the property does not hold is a set of measure zero (Halmos 1974), 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 is contained within a set of measure zero. When discussing sets of real numbers, the Lebesgue measure is assumed unless otherwise stated.
The term almost everywhere is abbreviated a.e.; in older literature p.p. is used, to stand for the equivalent French language phrase presque partout.
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 sets with probability 1, which 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 also has other meanings).
Properties


\int_a^b f(x) \, dx \geq 0

for all real numbers a < b with equality iff f(x)=0 almost everywhere.


\int_a^b f(x) \, dx < \infty

for all real numbers a < b, then there exists a set E (depending on f) such that, if x is in E, the Lebesgue mean


\frac{1}{2\epsilon} \int_{x\epsilon}^{x+\epsilon} f(t)\,dt

converges to f(x) as \epsilon decreases to zero. The set E is called the Lebesgue set of f. Its complement can be proved to have measure zero. In other words, the Lebesgue mean of f converges to f almost everywhere.

If f(x,y) is Borel measurable on R^{2} then for almost every x, the function y→f(x,y) is Borel measurable.

As a curiosity, the decimal expansion of almost every real number in the interval [0, 1] contains the complete text of Shakespeare's plays, encoded in ASCII; similar for every other finite digit sequence, see Normal number.
Definition using ultrafilters
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:

If U ∈ F and U ⊆ V then V ∈ F

The intersection of any two sets in F is in F

The empty set is not in F
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 finitelyadditive measure taking only the values 0 and 1, where a set has measure 1 if and only if it is included in the ultrafilter.
References

Billingsley, Patrick (1995). Probability and measure (3rd ed.). New York: John Wiley & Sons.

This article was sourced from Creative Commons AttributionShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, EGovernment Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a nonprofit organization.