Skip to main content
Statistics LibreTexts

5.4: Union and Intersection

  • Page ID
    44213
  • \( \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}\)

    When two events cannot happen at the same time, they are called mutually exclusive or disjoint events.

    clipboard_e306982b33cc40bebc698ed3749d8874c.png

    Figure 4-7

    clipboard_e26529b67451957588156906561119260.png

    Figure 4-8

    clipboard_e8c91af256592477c69ba2234318477d9.png

    Figure 4-9

    clipboard_eb02a8fd21a72cf90f0d75379d61f67ac.png

    Figure 4-10

    For example, a student cannot be a freshman and a sophomore at the same time, see Figure 4-9. These are mutually exclusive events. A student could be freshman and a business major at the same time so the event freshman and the event business major are not mutually exclusive see Figure 4-10.

    Intersection

    When we are finding the probability of both A and B happening at the same time we denote this as P(A ∩ B). This overlap is called the intersection.

    When two events, say A and B, occur at the same time, this is denoted as the intersection of A and B and is denoted as (A ∩ B). Think of the symbol ∩ as an A in “and.”

    If two events are mutually exclusive then A ∩ B = { } the empty set (also denoted as \(\varnothing\)) and the P(A ∩ B) = 0.

    Union

    When either event A, event B, or both occur then we call this the union of A or B, which is denoted as (A U B). When finding the probability of A or B we denote this as P(A U B). When we write “or” in statistics, we mean “and/or” unless we explicitly state otherwise. Thus, A or B occurs means A, B, or both A and B occur.

    Figure 4-11 is a Venn diagram for the union rule.

    clipboard_e7066678fb55d622323a569a8e2475995.png

    Figure 4-11

    The Union Rule: P(A U B) = P(A) + P(B) – P(A ∩ B).

    If two events are mutually exclusive, then the probability of them occurring at the same time is P(A ∩ B) = 0. So, if A and B are mutually exclusive then the P(A U B) = P(A) + P(B) as shown in Figure 4-7. It is best to write out the rule with the intersection so that you do not forget to subtract any overlapping intersection.

    The family college data set contains a sample of 792 cases with two variables, teen and parents. The teen variable is either college or not, where the college label means the teen went to college immediately after high school. The parent’s variable takes the value degree if at least one parent of the teenager completed a college degree. Make a Venn Diagram for the data.

    Example from OpenIntroStatistics.

    clipboard_ecb618199c79802d60baca7fc78e9e602.png

    Solution

    Find the relative frequencies.

    clipboard_e7cd3b4c36c58c3ce5bbabd056fe06c3e.png

    Figure 4-12 for completed Venn Diagram. Note that you do not need to use circles to represent the sets.

    clipboard_e941123bf5851172d0474eed29e843320.png

    Figure 4-12

    A random sample of 500 people was taken from the 2010 United States Census. Their marital status and race were recorded in the following contingency table using the census labels. A person is randomly chosen from the census data. Find the following.

      Race   Marital Status American Indian Black Asian White Two Major Races Total Divorced 0 6 1 30 1 38 Married 1 25 23 156 4 209 Single 2 33 21 155 11 222 Widowed 0 7 2 22 0 31 Total 3 71 47 363 16 500

    a) P (Single ∩ American Indian)

    b) P(Single U American Indian)

    c) Probability that the person is Asian or Married.

    d) P(Single ∩ Married)

    e) P(Single U Married)

    Solution

    a) The intersection for a contingency table is found by simply finding where the row or intersection meets. There are 2 Single American Indians, therefore the P(Single ∩ American Indian) = P(Single and American Indian) = 2/500 = 0.004.

    b) There are 222 Single people, there are 3 American Indians, but we do not want to count the 2 Single American Indians twice, therefore the P(Single U American Indian) = P(Single or American Indian) = 222/500 + 3/500 – 2/500 = 223/500 = 0.446.

    c) The union for a contingency table is found by either using the union formula or adding up all the numbers in the corresponding row and column. There are 47 Asian people, there are 209 Married people, but we do not want to count the 23 Married Asian people twice, therefore the P(Asian U Married) = P(Asian or Married) = 47/500 + 209/500 – 23/500 = 233/500 = 0.466.

    d) The events Single and Married are mutually exclusive so the P(Single ∩ Married) = 0. Alternatively, there is no place in the table where the Single row and Married row meet.

    e) The events single and married are mutually exclusive so the P(Single U Married) = P(Single) + P(Married) – P(Single ∩ Married) = 222/500 + 209/500 – 0 = 431/500 = 0.862.

    Use a random experiment consisting of rolling two dice and adding the numbers on the faces.

    a) Compute the probability of rolling a sum of 8.

    b) Compute the probability of rolling a sum of 8 or a sum of 5

    c) Compute the probability of rolling a sum of 8 or a double (each die has the same number).

    Solution

    a) There are 36 possible outcomes for rolling the two dice as shown in the following sum table. There are 5 pairs where the sum of the two dice is an 8, the (2,6), (3,5), (4,4), (5,3) and (6,2). Note that the events (2,6) and (6,2) are different outcomes since they numbers come from different dice.

    clipboard_e60cc0064502a06f179f2d222b15b270e.png

    Thus, the P(8) = 5/36 = 0.1389.

    b) Highlight all the places where a sum of 5 or a sum of 8 occurs. There are 9 pairs where the sum of the two dice is a 5 or an 8.

    clipboard_e41f3f0b224fcfdde61ff64083c746e33.png

    Thus, the P(5 U 8) = P(5) + P(8) – P(5 ∩ 8) = 4/36 + 5/36 – 0 = 9/36 = 0.25.

    Note that rolling a sum of 5 is mutually exclusive from rolling a sum of 8 so the probability is zero for the intersection of the two events.

    c) The events rolling an 8 and rolling doubles are not mutually exclusive since the pair of fours (4, 4) falls into both events.

    An easy way is to highlight all the places a sum 8 or doubles occur, count the highlighted values, and divide by the total 10/36 = 0.2778.

    clipboard_e950a5e80910a6f2419a3ec7dfb08629e.png

    When using the union rule, we subtract this overlap out one time to account for this. Using the union formula:

    P(8 U Doubles) = P(8) + P(Doubles) – P(8 ∩ Doubles) = 5/36 + 6/36 – 1/36 = 10/36 = 0.2778.

    “‘It's... well, it's a long story,’ he said, ‘but the Question I would like to know is the Ultimate Question of Life, the Universe and Everything. All we know is that the Answer is Forty-two, which is a little aggravating.’

    Prak nodded again.

    ‘Forty-two,’ he said. ‘Yes, that's right.’

    He paused. Shadows of thought and memory crossed his face like the shadows of clouds crossing the land.

    ‘I'm afraid,’ he said at last, ‘that the Question and the Answer are mutually exclusive. Knowledge of one logically precludes knowledge of the other. It is impossible that both can ever be known about the same universe.’”

    (Adams, 2002)

    Randomly pick a card from a standard deck. A standard deck of cards, not including jokers consists of 4 suits called clubs = ♣, spades = ♠, hearts = ♥, and diamonds = ♦. The clubs and spades are called the black cards. The hearts and diamonds are called the red cards. Each suit has 13 cards. The numbered cards shown in Figure 4-13, are Ace = 1 or A, 2, 3, 4, 5, 6, 7, 8, 9, 10. The face cards are the Jack = J, Queen = Q, and King = K.

    clipboard_ea16f4eb009465a3318ed73562ab02b41.png

    Figure 4-13

    a) Compute the probability of selecting a card that shows a club.

    b) Compute the probability of selecting a heart or a spade card.

    c) Compute the probability of selecting a spade or a face card.

    Solution

    a) There are 52 cards in a standard deck. There are 13 cards of each suit. The P(♣) = 13/52 = 0.25.

    b) There are 52 cards in a standard deck. There are 13 cards of each suit. P(♥ U ♠) = 26/52 = 0.5.

    c) There are 13 spades and 12 face cards. However, there are 3 cards that are both spades and face cards. P(♠ U FC) = P(♠) + P(FC) – P(♠ ∩ FC) = 13/52 + 12/52 – 3/52 = 22/52 = 0.4231. Since the sample space is small, you could just count how many spades and face cards there are.

    clipboard_ebd7bb43dd9e363666bf3538a30ca392a.png

    Words Are Important!

    When working with probability, words such as “more than” or “less than” can drastically change the answer. Figure 4-14 shows some of the common phrases you may run into while reading a problem. It will be essential later in the course that you can correctly match these phrases with their correct symbol.

    clipboard_e5653aba61c414ecd38e77173c6db50de.png

    Figure 4-14

    Use a random experiment consisting of rolling two dice and adding the numbers on the faces.

    a) Compute the probability of rolling a sum of less than 5.

    b) Compute the probability of rolling a sum of 5 or less.

    Solution

    a) Let X be the event rolling a sum less than 5. A sum less than 5 would not include the 5. For notation, we use P(X < 5), which is read as the “probability that X is less than five.” Shade in all the sums that are less than 5.

    clipboard_e7ef2834f51b9ea7bbd99a618f6d862d9.png

    Then the P(X < 5) = 6/36 = 0.1667.

    b) : Let X be the event rolling a sum of 5 or less. A sum of 5 or less includes the 5. For notation, we can use P(X ≤ 5), which is read as the “probability that X is less than or equal to five.” Shade in all the sums that are 5 or less.

    clipboard_e447a1bc541bfce5552fef12fe09e77a3.png

    Then the P(X ≤ 5) = 10/36 = 0.2778.


    This page titled 5.4: Union and Intersection is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by Rachel Webb via source content that was edited to the style and standards of the LibreTexts platform.