Welcome to the final lesson of our first module on the mathematical foundations of probability. Over the past three lessons, we've built up a powerful toolkit, moving from summation notation and single-variable calculus to the more complex world of double integrals. These tools are essential for the calculations you'll perform throughout this course.
Today, we shift our focus from calculation to a fundamental concept that underpins the entire structure of probability theory: the "size" of infinite sets. It might seem abstract, but understanding this concept is what allows us to properly define the domains for discrete and continuous random variables. Our goal is to distinguish between two types of infinity: countable and uncountable. This distinction will explain why we use sums for some probability problems and integrals for others.
The Idea of "Counting" a Set
At its heart, "counting" a set means establishing a one-to-one correspondence between its elements and the set of natural numbers . If we can "list" every element of a set, even if that list goes on forever, we consider the set to be countable. The total number of elements in a set is called its cardinality.
Let's begin by exploring this idea, starting with finite sets and then extending it to infinite ones.
Countable and uncountable sets - GraphicMaths
This article from GraphicMaths provides an intuitive introduction to the concept of countability.
Please read the first few sections of the article. Start with the brief introduction to counting finite sets. Then, focus on the main idea presented in the section "Can an infinite set be countable?". This part explains the core concept: a set is countable if you can assign a unique natural number to each element, effectively creating an ordered list. Notice the introduction of the term aleph 0 (\aleph_0) for the cardinality of the natural numbers.
As you've just read, any finite set is, by definition, countable. More interestingly, an infinite set can also be countable if its elements can be systematically listed. The set of natural numbers () is the canonical example of a countably infinite set.
Examples of Countable Sets
It's easy to see that is countable, but what about other familiar sets of numbers? It turns out that many infinite sets that might seem "larger" than the natural numbers are also countable.
A classic example is the set of all integers, . How can we list them? We can't just start from one end. However, we can create an ordered list by alternating between positive and negative numbers:
In this list, every integer will eventually appear. The first element is 0, the second is 1, the third is -1, and so on. We have successfully put into a one-to-one correspondence with , proving that is countable.
This leads to a counter-intuitive but crucial property of infinite sets: a proper subset of an infinite set can have the same cardinality as the entire set. For example, the set of even numbers is a subset of the natural numbers, but both are countably infinite and have cardinality .
Let's explore this and other surprising examples.
Countable and uncountable sets - GraphicMaths
This part of the article provides excellent visual and intuitive explanations for why several seemingly "larger" sets are still countable.
Please read the section titled "Other infinite countable sets." Pay close attention to these key examples: The set of even numbers: Understand the one-to-one mapping that shows it has the same cardinality as \mathbb{N}. The set of all integers (\mathbb{Z}): This reinforces the listing method we just discussed. The set of all pairs of integers: The spiral visualization is a brilliant way to see how a 2D grid of points can be "flattened" into a single, countable list. This same logic is what proves that the set of rational numbers (\mathbb{Q}) is also countable.
Uncountable Sets: A Different Kind of Infinity
So far, every infinite set we've encountered has been countable. This might lead you to wonder if all infinite sets are countable. In the late 19th century, Georg Cantor proved that the answer is no. There exists another, "larger" kind of infinity: uncountable infinity.
An uncountable set is an infinite set whose elements cannot be put into a one-to-one correspondence with the natural numbers. No matter how you try to list them, you will always miss some elements.
The most famous example is the set of real numbers ().

Why are the real numbers uncountable? Intuitively, it's because the real number line is "dense." Between any two distinct real numbers, no matter how close, you can always find another real number. This property prevents us from creating a discrete list where one number "follows" another.
To prove this formally, Cantor developed a beautiful and ingenious proof-by-contradiction known as the diagonal argument.
Cantor's Diagonal Argument
The logic of the diagonal argument is as follows:
- Assume, for the sake of contradiction, that the set of real numbers is countable. Let's just focus on the real numbers between 0 and 1.
- If they are countable, we can create an exhaustive, infinite list that contains every single real number between 0 and 1.
- Then, we construct a new number that is guaranteed not to be on our list.
- This contradiction proves that our initial assumption was wrong, and therefore the set must be uncountable.
The following video provides an exceptionally clear and engaging walkthrough of this argument.
Countable & Uncountable Infinities
In this video, Eddie Woo masterfully explains the difference between countable and uncountable infinities using Cantor's diagonal argument.
Please watch the following segments: Setting up the problem (0:00 - 2:06): The video begins by posing the question of whether the real numbers can be "matched up" with the integers like other sets can. The Diagonal Argument (2:07 - 5:25): This is the core of the lesson. Follow carefully as a new number is constructed by changing the diagonal digits of a supposed complete list of real numbers. Understand why this new number cannot be on the original list. Implications and Definitions (5:26 - 7:21): This part discusses the mind-bending result—that there are "more" numbers between 0 and 1 than there are counting numbers in total—and formally introduces the terms countable infinity and uncountable infinity.
To reinforce the argument, here is a textual summary. You can refer to it if any part of the video was unclear.
Countable and uncountable sets - GraphicMaths
This section of the GraphicMaths article provides a step-by-step textual breakdown of the diagonal argument you just saw in the video.
Read through the section that starts with the paragraph "It will make things a little easier...". This will solidify your understanding of how the new, unlisted number is constructed and why it proves the set of real numbers is uncountable. Note the introduction of aleph 1 (\aleph_1) as the cardinality of the continuum.
Summary and Connection to Probability
We have now established the fundamental distinction between two types of sets, which is crucial for probability theory.
-
Countable Sets: These are sets whose elements can be listed. They can be finite (e.g., the outcomes of a die roll: ) or countably infinite (e.g., the number of coin flips until the first heads: ).
- When the sample space of an experiment is countable, we are in the realm of discrete probability. We calculate the probability of an event by summing the probabilities of the individual outcomes. This is why we studied summation notation.
-
Uncountable Sets: These are sets whose elements cannot be listed, such as any interval of real numbers (e.g., the height of a random person: meters).
- When the sample space of an experiment is uncountable, we are dealing with continuous probability. The probability of any single outcome is zero. Instead, we calculate the probability of an event occurring within a certain range by integrating a probability density function. This is why we studied calculus and integration.
This distinction is the very reason our mathematical toolkit is split between summation-based methods and integration-based methods.
Conclusion
In this lesson, we ventured into the abstract nature of infinity and emerged with a critical distinction. You learned that not all infinities are the same size.
Here are the key takeaways:
- A set is countable if it is finite or its elements can be put into a one-to-one correspondence with the natural numbers. Examples include the integers () and rational numbers ().
- A set is uncountable if it is infinite and cannot be listed. The set of real numbers () is the primary example.
- Cantor's diagonal argument is a powerful proof that demonstrates the uncountability of the real numbers.
- This distinction forms the basis for the difference between discrete probability (using sums on countable sample spaces) and continuous probability (using integrals on uncountable sample spaces).
This concludes our first module on the mathematical foundations. You now have the necessary calculus and set theory concepts to begin your formal study of probability.
In our next lesson, we will begin Module 2, "Fundamentals of Probability." We will formally define what constitutes a random experiment and introduce the core concepts of sample spaces and events, where you will immediately apply your new understanding of countable and uncountable sets.