Basic Set Theory

In order to effectively talk about statistics, we will need to discuss probability, and in order to discuss probability effectively, we will need to start at the beginning, with basic set theory.

Definition : A set is a collection of objects. the members of a set are called elements.

Usually, we define a set by which elements it contains and write the set as a collection of elements, or a rule for membership inside curly braces. For example, $A = \{a,b,c\}$ is a set called $A$ that contains elements $a,b,$ and $c$. If an element $x$ is a member of a set $A$, then we write $x\in A$.

Examples of Sets:

  • Students in MTHE 224: $A = \{\text{people in this class}\}$
  • The Natural : $\mathbb{N} = \{0,1,2,3,...\} $
  • The Integers: $\mathbb{Z} = \{0,-1,1,2,-2,...\}$
  • The Rational Numbers: $\mathbb{Q} = \{x = \frac{m}{n} ~|~ n,m \in \mathbb{Z} \}$
  • The Real Numbers: $\mathbb{R} = \{x ~|~ x\in(-\infty,\infty)\}$

Note: There are several ways to write some of these sets. The real numbers can be more rigorously written as the set of all numbers that exist as a limit of Rational numbers.

Definition: The intersection of two sets $A$ and $B$ is the set of elements that are in both $A$ and $B$. We write $$A \cap B = \{x\in A ~|~ x \in B \} = \{ x \in B ~|~ x \in A\}.$$

Definition: The union of two sets $A$ and $B$ is the set that are in either $A$ or in $B$ or in both. We write $$A \cup B = \{x ~|~ x\in B~ or~ x \in B \} $$

If $A$ and $B$ have no elements in common, we call them disjoint. The intersection of two disjoint sets $A$ and $B$ is called the empty set, and we write $A\cap B = \varnothing = \{~\}.$ When we're talking about sets in the abstract sense, we'll usually use Venn diagrams to represent them.

Intersection

Definition: Let $A$ be a set. A set $B$ is a subset of $A$ if $A\cap B = B$. That is, every element of $B$ is also an element of $A$. If $B$ is a subset of $A$ we write $B\subseteq A$.

Definition: Let $A$ and $B$ be sets. The complement of $B$ in $A$ is the set of elements in $A$ that are not in $B$. We write $A \setminus B = \{x\in A~|~x\notin B\}$

Often we will be talking about sets relative to one specific larger set $\mathcal{S}$. If there is no chance for confusion, we often write the complement of $B$ as $\mathcal{S}\setminus B = B^c$.

Example: Let $A = \{1,2,3,4,...,10\}$, $B = \{2,4,6,8,10\}$, and $C = \{1,3,5,7,9\}$.

  • What is $B\cap C$?
  • Is $B$ a subset of $A$?
  • Is $A$ a subset of $A$?
  • Is $\varnothing$ a subset of $A$?
  • What is the complement of $B$ in $A$?

Demorgan's Laws: Let $\mathcal{S}$ be a set, let $A\subseteq\mathcal{S}$, and let $B\subseteq\mathcal{S}$. Then

  • $\mathcal{S}\setminus(A\cup B) = (\mathcal{S}\setminus A)\cap (\mathcal{S}\setminus B)$ Demorgan's First Law
  • $\mathcal{S}\setminus(A\cap B) = (\mathcal{S}\setminus A)\cup (\mathcal{S}\setminus B)$ Demorgan's Second Law

Exercises

  • Let $\mathcal{S}$ be a set and suppose $A\subset \mathcal{S}$. Explain why $(A^c)^c = A$.
  • Use DeMorgan's laws to show $$(A\cap B)^c \cup C = (A\cap C)^c \cup (B\cap C)^c.$$ Confirm this with a Venn Diagram.
  • Let $\mathcal{S} = \mathbb{Z}$, $A = \mathbb{N}$, and $B=2\mathbb{Z} = \{2x~|~x\in\mathbb{Z}\}$. Find an expression for each of the following:
    • $A^c$
    • $\mathcal{S}$
    • $(A\cup B)^c$
    • $(A\cap B)^c$
    • $\varnothing^c$