Problem 2
Medium Random Events

From a table of random numbers, two numbers are chosen at…

From a table of random numbers, two numbers are chosen at random. Let $A$ denote the event that (at least) one of these numbers is prime, and $B$ the event that (at least) one of them is even. What do the events $AB$ and $A+B$ represent?

Explanation of Method

The product $AB$ means "both $A$ and $B$ occur" and the sum $A+B$ means "at least one of $A$, $B$ occurs". We first sort all numbers into four types (prime or not, even or not); the number $2$ plays a special role because it is the only number that is both prime and even. Then we list exactly which pairs of numbers give $AB$, and we describe $A+B$ in the simplest way through its complement, using De Morgan's law $\overline{A+B}=\overline{A}\,\overline{B}$.

Step 1: Setup and the four types of numbers

Denote the two chosen numbers by $n_1$ and $n_2$. Numbers in a table of random numbers are non-negative integers $0,1,2,3,\dots$ Recall:

Every number belongs to exactly one of four types:

TypePrime?Even?Examples
even primeyesyes$2$ (the only one)
odd primeyesno$3,\ 5,\ 7,\ 11,\ 13,\dots$
even non-primenoyes$0,\ 4,\ 6,\ 8,\ 10,\dots$
odd non-primenono$1,\ 9,\ 15,\ 21,\ 25,\dots$

Why is $2$ the only even prime? Any even number greater than $2$ is divisible by $2$, so it has a divisor other than $1$ and itself and cannot be prime.

The events are

\[ A = \{\text{at least one of } n_1, n_2 \text{ is prime}\}, \qquad B = \{\text{at least one of } n_1, n_2 \text{ is even}\}. \]

Step 2: The event $AB$

Definition

$AB = A\cap B$ occurs when both $A$ and $B$ occur: among the two numbers there is at least one prime and at least one even number.

Which pairs give $AB$?

The prime and the even number may be the same number or two different numbers. This gives exactly two cases:

Why there are no other cases. Suppose $AB$ occurs. Take a prime $p$ among the two numbers.

So

\[ AB = \{\text{one of the numbers is } 2, \ \text{or one number is an odd prime and the other is even}\}. \]

Examples

Pair $(n_1,n_2)$Prime present?Even present?$AB$ occurs?
$(2,\ 9)$yes ($2$)yes ($2$)✓ case (a)
$(2,\ 7)$yesyes ($2$)✓ case (a)
$(3,\ 8)$yes ($3$)yes ($8$)✓ case (b)
$(3,\ 5)$yesno✗
$(4,\ 6)$noyes✗
$(1,\ 0)$no ($0$ and $1$ are not prime)yes ($0$)✗
$(9,\ 15)$nono✗

Step 3: The event $A+B$

Definition

$A+B = A\cup B$ occurs when at least one of the events occurs: there is a prime among the numbers, or there is an even number among them (or both).

"Some number is prime, or some number is even" is the same as "some number is prime or even". So

\[ A+B = \{\text{at least one of the two numbers is prime or even}\}. \]

Describing it through the complement

It is often easier to say when an event does not happen. By De Morgan's law,

\[ \overline{A+B} = \overline{A}\;\overline{B}. \]

Together: $\overline{A+B}$ = "both numbers are odd and non-prime", i.e. both come from the set $\{1, 9, 15, 21, 25, 27, \dots\}$. Hence

\[ A+B = \{\text{it is not true that both numbers are odd non-prime numbers}\}. \]

Examples

Pair $(n_1,n_2)$Both odd and non-prime?$A+B$ occurs?
$(3,\ 5)$no (both prime)✓
$(4,\ 6)$no (both even)✓
$(9,\ 4)$no ($4$ is even)✓
$(9,\ 15)$yes✗
$(1,\ 9)$yes ($1$ is not prime)✗

Note. Every pair in $AB$ is also in $A+B$, i.e. $AB\subseteq A+B$. This is always true: if both events occur, then certainly at least one of them occurs.


Result

EventMeaning
$AB$Among the two numbers there is a prime and an even number: one of the numbers is $2$, or one is an odd prime and the other is even.
$A+B$At least one of the two numbers is prime or even; equivalently, it is not true that both numbers are odd non-primes (such as $1, 9, 15, 21,\dots$).