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. Finally, it defines divisibility, primes and congruence, and the factorial of a non-negative integer.
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?
Observation indices start at \(1\), so we write \(i \in \mathopen{}\left\{1, \ldots, n\right\}\mathclose{}\) with \(n \in \mathbb{N}\).
A count outcome, such as the number of hospital visits in a year, can be \(0\), so the set of values it can take is \(\mathbb{N}_0\), not \(\mathbb{N}\).
NoteOther conventions for the natural numbers
Other sources may define \(\mathbb{N}\) differently, so check each source’s definition before reading its formulas:
Many sources include \(0\) in \(\mathbb{N}\). The international standard ISO 80000-2 defines \(\mathbb{N}\) to include \(0\), continuing the earlier standard ISO 31-11 (1978).
Other sources start \(\mathbb{N}\) at \(1\), as these notes do.
To remove the ambiguity, some sources write \(\mathbb{N}_1\) or \(\mathbb{Z}^+\) for \(\mathopen{}\left\{1, 2, 3, \ldots\right\}\mathclose{}\), and \(\mathbb{N}_0\) or \(\mathbb{Z}^{0+}\) for \(\mathopen{}\left\{0, 1, 2, \ldots\right\}\mathclose{}\).
The words vary too. “Positive integers” (\(\mathopen{}\left\{1, 2, 3, \ldots\right\}\mathclose{}\)) and “non-negative integers” (\(\mathopen{}\left\{0, 1, 2, \ldots\right\}\mathclose{}\)) are unambiguous. “Whole numbers” usually includes \(0\), but can also mean all of the integers, negative ones included. “Counting numbers” usually starts at \(1\), but some sources include \(0\).
Some older texts write \(J\) for the natural numbers.
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{}\).
Definition 8 (Factorial) For a non-negative integer\(n\), the factorial of \(n\)[4], written \({{n}!}\), is \(1 \cdot 2 \cdots n\), the natural numbers from 1 to \(n\) multiplied together. For \(n = 0\) there is nothing to multiply, and \({{0}!} = 1\).
Definition 9 (Divides) Let \(a\) and \(b\) each be an integer. We say that \(a\)divides\(b\), written \(a \mid b\), if \(b = a c\) for some integer \(c\). When \(a\) does not divide \(b\), we write \(a \nmid b\).
\(7\) is prime: none of \(2\), \(3\), \(4\), \(5\) and \(6\)divides\(7\), and no integer above \(7\) does, so its only positive divisors are \(1\) and \(7\).
\(9\) is not prime, because \(3\) divides \(9\).
\(1\) is not prime, because the definition requires \(n \ge 2\).
Definition 11 (Congruence modulo \(n\)) Let \(a\) and \(b\) be integers, and let \(n\) be a positive integer. We say that \(a\) is congruent to \(b\) modulo \(n\), written \(a \equiv b \pmod{n}\), if \(n\)divides\(a - b\), written \(n \mid (a - b)\), [6]. When \(a\) is not congruent to \(b\) modulo \(n\), we write \(a \not\equiv b \pmod{n}\).
\(17\) is congruent to \(5\) modulo \(12\), \(17 \equiv 5 \pmod{12}\), because \(17 - 5 = 12\) and \(12 \mid 12\). On a 12-hour clock, hour 17 is 5 o’clock.
\(17 \not\equiv 4 \pmod{12}\), because \(17 - 4 = 13\) and \(12 \nmid 13\).
Definition 12 (Rational numbers) A rational number[7] 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{}\]
Definition 13 (Real numbers) A real number[8] 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 13 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 [9], 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\).
Definition 14 (Floor) The floor\(\mathopen{}\left\lfloor x\right\rfloor\mathclose{}\) of a real number\(x\)[10] is the largest integer that is at most \(x\).
\(\mathopen{}\left\lfloor 2.7\right\rfloor\mathclose{} = 2\), by the definition of the floor.
\(\mathopen{}\left\lfloor 3\right\rfloor\mathclose{} = 3\), because \(3\) is already an integer.
\(\mathopen{}\left\lfloor-1.5\right\rfloor\mathclose{} = -2\), because \(-2 \le -1.5 < -1\).
The graph of \(\mathopen{}\left\lfloor x\right\rfloor\mathclose{}\) is a staircase: each step starts at an integer, with a filled dot, and stops before the next integer, at an open dot.
Show code
# one step per integer k, from x = k to x = k + 1 at height kk<--3:2steps<-tibble::tibble(x =k, xend =k+1, y =k)floor_plot<-ggplot2::ggplot(steps)+ggplot2::geom_segment(ggplot2::aes(x =x, xend =xend, y =y, yend =y))+ggplot2::geom_point(ggplot2::aes(x =x, y =y), size =2)+ggplot2::geom_point(ggplot2::aes(x =xend, y =y), size =2, shape =21, fill ="white")+ggplot2::labs(x ="x", y ="floor of x")floor_plot