Often mathematicians use expressions such as "almost every positive integer is composite" or "almost all real numbers are irrational." In each case almost every or almost all means all but a "negligible" fraction, but how we define that fraction (and negligible) depends on the underlying set.
In the positive integers (the usual case in this glossary):
Let P(n) be a predicate (a statement about the integer n such as "n is prime"). Let #P(N) be the number of positive integers n less than N which satisfy P(n). For example, if P(n) = "n is even," then #P(N) is floor(N/2).In other sets:
In other sets the concept "almost every" is defined in different ways. For example, in the real numbers a common way to define "almost every" is to specify all but a set of measure zero (usually using the Lesbegue measure). These ideas are beyond the scope of this glossary.