Back

Solution: 2013 Fall Midterm - 16

Author: Pat Morin

Question

If you choose an element $ x $ uniformly at random from the set $ {1, 2, ..., 100} $, what is the probability that $ x $ is divisible by 4 or 5?
(a)
$2/5$
(b)
$9/100$
(c)
$1/5$
(d)
$45/100$

Solution

Let’s break this down into two cases.

  1. Determine A

    A = divisible by 4

    $A = { 4,8,12,…,96,100 }$

    $ |A| = 25 $

  2. Determine B

    B = divisible by 5

    $B = { 5,10,15,…,95,100 }$

    $ |B| = 20 $

  3. Determine the Intersection

    $ |A \cap B| = 5 $

  4. Profit

    $ |A \cup B| = |A| + |B| - |A \cap B| $

    $ |A \cup B| = 25 + 20 - 5 $

    $ |A \cup B| = 40 $

    Pr($A \cup B$) = $ \frac{40}{100} $

    Pr($A \cup B$) = $ \frac{2}{5} $