Artificial Intelligence 🤖
Basic Set Theory

Basic Set Theory

Events (commonly referred to as A,BA, B, and CC ) themselves are sets, so we can use tools from set theory to manipulate them. The main operations we will use are union, intersection, and complement.

The union of AA and BB, denoted ABA \cup B, is the set of those outcomes which belong to AA or BB (or both). ABA \cup B occurs if AA occurs or BB occurs (or they both occur).

The intersection of AA and BB, denoted ABA \cap B, is the set of those outcomes which belong to both AA and BB. ABA \cap B occurs if AA occurs and BB occurs.

The complement of AA, denoted Aˉ\bar{A}, is the set of those outcomes which do not belong to AA. Aˉ\bar{A} occurs if AA does not occur.

For two events AA and BB, we can illustrate these concepts with the help of Venn diagrams.

From these diagrams we can see, for example, that A=(AB)(ABˉ)A=(A \cap B) \cup(A \cap \bar{B}).

General Properties

Intersection is associative, which means that, whenever we need to perform a series of intersections, the order does not matter,

A(BC)=(AB)C=ABCA \cap(B \cap C)=(A \cap B) \cap C=A \cap B \cap C

Union is also associative, so

A(BC)=(AB)C=ABCA \cup(B \cup C)=(A \cup B) \cup C=A \cup B \cup C

Additionally, union is distributive over intersection (and vice versa):

A(BC)=(AB)(AC)A(BC)=(AB)(AC)A \cup(B \cap C)=(A \cup B) \cap(A \cup C) A \cap(B \cup C)=(A \cap B) \cup(A \cap C)

We can think of Ω\Omega as the certain event, in the sense that it always occurs, as it contains all the possible outcomes of the experiment. Conversely, the impossible or null event, can be represented by an empty set, which is denoted by \emptyset.

For any event AΩA \subseteq \Omega we have the following properties:

AΩ=ΩAΩ=AA=AA=AAˉ=ΩAAˉ=\begin{aligned} & A \cup \Omega=\Omega \quad A \cap \Omega=A \\ & A \cup \emptyset=A \quad A \cap \emptyset=\emptyset \\ & A \cup \bar{A}=\Omega \quad A \cap \bar{A}=\emptyset \end{aligned}

Furthermore, taking complements converts a union into an intersection, and vice versa:

(AB)=AˉBˉ(AB)=AˉBˉ\overline{(A \cup B)}=\bar{A} \cap \bar{B} \quad \overline{(A \cap B)}=\bar{A} \cup \bar{B}

Disjoint and Exhaustive Events

The events A,BA, B are disjoint or mutually exclusive iff AB=A \cap B=\emptyset, that is, if they have no outcomes in common. Disjoint events cannot both occur simultaneously - one excludes the other.

The events A,BA, B are exhaustive if AB=ΩA \cup B=\Omega, that is, if between them they contain all possible outcomes. If two events are exhaustive, at least one of them must occur.

We can extend the concepts of disjointness and exhaustiveness to situations where we have more than two events. A collection of events, A1,A2,,AnA_{1}, A_{2}, \ldots, A_{n} is

  • pairwise disjoint if AiAj=A_{i} \cap A_{j}=\emptyset, for all i,j=1,,n,iji, j=1, \ldots, n, i \neq j. If a collection of events is pairwise disjoint, at most one of them can occur.
  • collectively exhaustive if A1A2An=ΩA_{1} \cup A_{2} \cup \ldots \cup A_{n}=\Omega. If a collection of events is collectively exhaustive, at least one of them will occur.

If a collection of events has both these properties, then we can say that exactly one of the events will occur. We will encounter such collections of events in the context of the Law of Total Probability (section 1.5)1.5).

Example: Events for Dice

We have already established that the sample space for a dice roll contains six outcomes, i.e. Ωdice =\Omega_{\text {dice }}= {1,2,3,4,5,6}\{1,2,3,4,5,6\}. We can describe three events A,BA, B and CC as follows:

  • Event AA - the rolled number is equal to six;
  • Event BB - the rolled number is odd;
  • Event CC - the rolled number is greater than three.

Each of these events would then correspond to one or more outcomes in Ωdice \Omega_{\text {dice }}. Namely:

A={6}B={1,3,5}C={4,5,6}A=\{6\} \quad B=\{1,3,5\} \quad C=\{4,5,6\}

The event ABA \cup B creates an event containing all the outcomes from event AA and event BB. In this case, the event contains all the outcomes where the rolled number is six or is odd, namely, AB={1,3,5,6}A \cup B=\{1,3,5,6\}. Similarly, BCB \cup C would contain all outcomes that are odd or greater than three, i.e. BC={1,3,4,5,6}B \cup C=\{1,3,4,5,6\}.

Conversely, the event ABA \cap B would contain all outcomes from event AA that are also in event BB. Since no such outcomes exist (as the number of dots cannot be both equal to six and odd at the same time), we denote this with an empty set: AB=A \cap B=\emptyset. In this case, events AA and BB are said to be disjoint. Following a similar reasoning:

AC={6}BC={5}\begin{aligned} & A \cap C=\{6\} \\ & B \cap C=\{5\} \end{aligned}

The complements for the three sets are fairly intuitive in this case, e.g. Aˉ={1,2,3,4,5}\bar{A}=\{1,2,3,4,5\} contains all outcomes that are not equal to six, whereas Bˉ={2,4,6}\bar{B}=\{2,4,6\} contains all outcomes that are even. Note that these two complements, Aˉ\bar{A} and Bˉ\bar{B}, are exhaustive, i.e. AˉBˉ={1,2,3,4,5}{2,4,6}=Ωdice. \bar{A} \cup \bar{B}=\{1,2,3,4,5\} \cup\{2,4,6\}=\Omega_{\text {dice. }}. This also follows from the properties of union and intersection, as AˉBˉ=AB=ˉ=Ωdice. \bar{A} \cup \bar{B}=\overline{A \cap B}=\bar{\emptyset}=\Omega_{\text {dice. }}.

ASIDE: At this point, we are going to adopt another notation for the intersection of two sets. (AB)(A \cap B) is frequently used in the set theory calculations described above. However, in applications of probability theory, this is more commonly represented as (A,B)(A, B), which corresponds to a multivariate distribution of two random variables (a subject of importance that will be further explored in subsequent chapters, but for now just note the change in notation).