Skip to main content
Statistics LibreTexts

4.3: The Union and Intersection of Two Sets

  • Page ID
    24837
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    Learning Outcomes

    1. Find the union of two sets.
    2. Find the intersection of two sets.
    3. Combine unions intersections and complements.

    All statistics classes include questions about probabilities involving the union and intersections of sets. In English, we use the words "Or", and "And" to describe these concepts. For example, "Find the probability that a student is taking a mathematics class or a science class." That is expressing the union of the two sets in words. "What is the probability that a nurse has a bachelor's degree and more than five years of experience working in a hospital." That is expressing the intersection of two sets. In this section we will learn how to decipher these types of sentences and will learn about the meaning of unions and intersections.

    Unions

    An element is in the union of two sets if it is in the first set, the second set, or both. The symbol we use for the union is \(\cup\). The word that you will often see that indicates a union is "or".

    Example \(\PageIndex{1}\): Union of Two sets

    Let:

    \[A=\left\{2,5,7,8\right\} \nonumber\]

    and

    \[B=\lbrace1,4,5,7,9\rbrace \nonumber \]

    Find \(A\cup B\)

    Solution

    We include in the union every number that is in A or is in B:

    \[A\cup B=\left\{1,2,4,5,7,8,9\right\} \nonumber \]

    Example \(\PageIndex{2}\): Union of Two sets

    Consider the following sentence, "Find the probability that a household has fewer than 6 windows or has a dozen windows." Write this in set notation as the union of two sets and then write out this union.

    Solution

    First, let A be the set of the number of windows that represents "fewer than 6 windows". This set includes all the numbers from 0 through 5:

    \[A=\left\{0,1,2,3,4,5\right\} \nonumber \]

    Next, let B be the set of the number of windows that represents "has a dozen windows". This is just the set that contains the single number 12:

    \[B=\left\{12\right\} \nonumber \]

    We can now find the union of these two sets:

    \[A\cup B=\left\{0,1,2,3,4,5,12\right\} \nonumber \]

    Intersections

    An element is in the intersection of two sets if it is in the first set and it is in the second set. The symbol we use for the intersection is \(\cap\). The word that you will often see that indicates an intersection is "and".

    Example \(\PageIndex{3}\): Intersection of Two sets

    Let:

    \[A=\left\{3,4,5,8,9,10,11,12\right\} \nonumber \]

    and

    \[B=\lbrace5,6,7,8,9\rbrace \nonumber \]

    Find \(A\cap B\).

    Solution

    We only include in the intersection that numbers that are in both A and B:

    \[A\cap B=\left\{5,8,9\right\} \nonumber \]

    Example \(\PageIndex{4}\): Intersection of Two sets

    Consider the following sentence, "Find the probability that the number of units that a student is taking is more than 12 units and less than 18 units." Assuming that students only take a whole number of units, write this in set notation as the intersection of two sets and then write out this intersection.

    Solution

    First, let A be the set of numbers of units that represents "more than 12 units". This set includes all the numbers starting at 13 and continuing forever:

    \[A=\left\{13,\:14,\:15,\:...\right\} \nonumber \]

    Next, let B be the set of the number of units that represents "less than 18 units". This is the set that contains the numbers from 1 through 17:

    \[B=\left\{1,\:2,\:3,\:...,\:17\right\} \nonumber \]

    We can now find the intersection of these two sets:

    \[A\cap B=\left\{13,\:14,\:15,\:16,\:17\right\} \nonumber \]

    Combining Unions, Intersections, and Complements

    One of the biggest challenges in statistics is deciphering a sentence and turning it into symbols. This can be particularly difficult when there is a sentence that does not have the words "union", "intersection", or "complement", but it does implicitly refer to these words. The best way to become proficient in this skill is to practice, practice, and practice more.

    Example \(\PageIndex{5}\)

    Consider the following sentence, "If you roll a six sided die, find the probability that it is not even and it is not a 3." Write this in set notation.

    Solution

    First, let A be the set of even numbers and B be the set that contains just 3. We can write:

    \[A=\left\{2,4,6\right\},\:\:\:B\:=\:\left\{3\right\} \nonumber \]

    Next, since we want "not even" we need to consider the complement of A:

    \[A^c=\left\{1,3,5\right\} \nonumber \]

    Similarly since we want "not a 3", we need to consider the complement of B:

    \[B^c=\left\{1,2,4,5,6\right\} \nonumber \]

    Finally, we notice the key word "and". Thus, we are asked to find:

    \[A^c\cap B^c=\:\left\{1,3,5\right\}\cap\left\{1,2,4,5,6\right\}=\left\{1,5\right\} \nonumber \]

    Example \(\PageIndex{6}\)

    Consider the following sentence, "If you randomly select a person, find the probability that the person is older than 8 or is both younger than 6 and is not younger than 3." Write this in set notation.

    Solution

    First, let A be the set of people older than 8, B be the set of people younger than 6, and C be the set of people younger than 3. We can write:

    \[A=\left\{x\mid x>8\right\},\:\:\:B\:=\:\left\{x\mid x<6\right\},\:C=\left\{x\mid x<3\right\} \nonumber \]

    We are asked to find

    \[A\cup\left(B\cap C^c\right) \nonumber \]

    Notice that the complement of "\(< \)" is "\(\ge\)". Thus:

    \[C^c=\left\{x\mid x\ge3\right\} \nonumber \]

    Next we find:

    \[B\cap C^c=\left\{x\mid x<6\right\}\cap\left\{x\mid x\ge3\right\}=\left\{x\mid3\le x<6\right\} \nonumber \]

    Finally, we find:

    \[A\cup\left(B\cap C^c\right)=\:\left\{x\mid x>8\right\}\cup\left\{x\mid3\le x<6\right\} \nonumber \]

    The clearest way to display this union is on a number line. The number line below displays the answer:

    number line 3 to 6 including 3 not 6 and also 8 and up not including 8

    Exercise

    Suppose that we pick a person at random and are interested in finding the probability that the person's birth month came after July and did not come after September. Write this event using set notation.


    This page titled 4.3: The Union and Intersection of Two Sets is shared under a CC BY license and was authored, remixed, and/or curated by Larry Green.

    • Was this article helpful?