Last modified: 2026-10-28 13:13:09 (PDT)
Remark. Probability and statistics count with the integers and natural numbers and measure with the real numbers. This page defines those number systems. It also defines the words that sort their members: even and odd integers, and rational and irrational real numbers.
Exercise 1 (Which numbers are natural?) List the elements of the set \(\mathopen{}\left\{n \in \mathbb{N}: n < 3\right\}\mathclose{}\). Is your answer the same in every textbook?
Solution 1. The answer depends on whether the source counts \(0\) as a natural number:
Both conventions are in common use, so the answer is not the same in every textbook.
Definition 1 (Integers) The integers [1] are the whole numbers, together with their negatives and \(0\):
\[\mathbb{Z} \stackrel{\text{def}}{=}\mathopen{}\left\{\ldots, -3, -2, -1, 0, 1, 2, 3, \ldots\right\}\mathclose{}\]
An integer is an element of \(\mathbb{Z}\).
Definition 2 (Positive integers) The integers (Definition 1) greater than \(0\) are the positive integers.
Definition 3 (Negative integers) The integers (Definition 1) less than \(0\) are the negative integers.
Example 1 (Integers and non-integers)
Definition 4 (Even integer) An integer (Definition 1) \(n\) is even [2] if \(n = 2k\) for some integer \(k\).
Definition 5 (Odd integer) An integer (Definition 1) \(n\) is odd [2] if \(n = 2k + 1\) for some integer \(k\).
Example 2 (Even and odd integers)
Definition 6 (Natural numbers (our convention)) In these notes, the natural numbers [3] are the positive integers (Definition 2):
\[\mathbb{N}\stackrel{\text{def}}{=}\mathopen{}\left\{1, 2, 3, \ldots\right\}\mathclose{}\]
Definition 7 (Non-negative integers) The non-negative integers are the natural numbers (Definition 6) together with \(0\):
\[\mathbb{N}_0 \stackrel{\text{def}}{=}\mathopen{}\left\{0, 1, 2, 3, \ldots\right\}\mathclose{} = \mathbb{N}\cup \mathopen{}\left\{0\right\}\mathclose{}\]
Example 3 (Natural numbers in a data analysis)
Other conventions for the natural numbers
Other sources may define \(\mathbb{N}\) differently, so check each source’s definition before reading its formulas:
When a formula’s meaning depends on whether \(0\) is included, we write the set out explicitly, for example \(\mathopen{}\left\{0, 1, 2, \ldots\right\}\mathclose{}\) or \(\mathopen{}\left\{1, \ldots, n\right\}\mathclose{}\).
Source: Wikipedia, “Natural number”, “Terminology and notation” and “Zero as natural number”, which cites ISO 80000-2:2019 and the textbooks using each notation.
Definition 8 (Rational numbers) A rational number [4] is a number that can be written as a fraction \(\frac{a}{b}\), where \(a\) and \(b\) are integers (Definition 1) and \(b \ne 0\). The set of rational numbers is written \(\mathbb{Q}\):
\[\mathbb{Q} \stackrel{\text{def}}{=}\mathopen{}\left\{\frac{a}{b} : a \in \mathbb{Z},\ b \in \mathbb{Z},\ b \ne 0\right\}\mathclose{}\]
Example 4 (Rational numbers)
Definition 9 (Real numbers) A real number [5] is a number that can be written as a decimal expansion: an integer part, followed by a decimal point and a finite or infinite list of decimal places after it. Equivalently, the real numbers are the points on the number line. The set of real numbers is written \(\mathbb{R}\).
Remark 1 (A working definition). Definition 9 is a working definition, not a construction: it does not say what an infinite decimal expansion is, or how to add or multiply two of them. Rudin [6], Appendix to Chapter 1 constructs the real numbers rigorously. Some real numbers have two decimal expansions: for example, \(0.999\ldots\) and \(1.000\ldots\) are the same real number, \(1\).
Example 5 (Real numbers)
Definition 10 (Irrational numbers) An irrational number [7] is a real number (Definition 9) that is not rational (Definition 8).
Example 6 (Irrational numbers)