Almost always, almost everywhere

There are two precise mathematical terms with names that sound delightfully imprecise: almost always, and almost everywhere.

Almost always means with probability 1. An event with probability 1 does not mean that it has to happen always. For example if you have to pick a random number between 0 and 1 the probability that you pick any particular number is 0. The probability that you don’t pick 0.5 is 1, but that doesn’t mean you can’t pick 0.5.

Here’s another different example: suppose you have to pick one of three letters A, B, or C, with equal probability, by tossing coins. An easy solution is to toss the coin twice: pick A if you get two heads (HH), B if you get HT, C if you get TH, and start over if you get two tails. Now, it’s possible to get an endless sequence of tails and you never stop the process. The probability of this happening is 0. The algorithm terminates “almost always” which is good enough for practical purposes.

The term almost everywhere comes from measure theory, where a “measure” function is defined to give a size for subset. For example length serves as measure on a 1D line, or area on a 2D plane. “Almost everywhere” means everywhere except in a set with measure zero: for example 1/x is defined almost everywhere because the only place where it’s not defined is the isolated point x=0, which has length 0.

Another example: the rational numbers as a subset of the reals have measure zero, so you can give a precise meaning for statements like “almost all real numbers are irrational.”