Probability of two events

1. Mutually exclusive events

If the probability distribution of an experiment/process is given, finding the probability of any event is really simple due to the law of mutually exclusive events.

The law of mutually exclusive events. If the events $A$ and $B$ are mutually exclusive, then the probability that happens either $A$ or $B$ (denoted: $\text{Pr}[A\dot{\cup} B]$) is equal to the sum of $\text{Pr}[A]$ and $\text{Pr}[B]$, i.e.

$$\text{Pr}[A\dot{\cup} B]=\text{Pr}[A]+\text{Pr}[B].$$

Events $A$ and $B$ are called mutually exclusive, if their simultaneous occurrence is impossible (these events exclude each other).

It can be denoted also $A\cap B=\emptyset$, i.e. $A$ and $B$ do not intersect as sets.

Recall that an event is defined as a subset, thus, the usage of set-theoretic notation is quite natural.

Notation Graphical meaning Intuitive meaning
$A\dot{\cup} B$ Either the event $A$ happens or the event $B$ happens, and the events $A$ and $B$ exclude each other.
$A{\cup} B$ Either the event $A$ happens or the event $B$ happens, and the events $A$ and $B$ do not exclude each other.
$A{\cap} B$ Both the events $A$ and $B$ happen simultaneously.

For example, the event $C:=\text{"we roll a even number"}$ means $\text{"we roll a two"}$, or $\text{"we roll a four"}$, or $\text{"we roll a six"}$, i.e. $C=\{2\}\dot{\cup} \{4\} \dot{\cup} \{6\}=\{2, 4, 6\}$. Or, $\text{"we roll a six"}=\text{"the result in multiple of three"}\cap\text{"the result in multiple of two"}$.

Represent the event $\text{"we roll a five"}$ by two events. Answer

Let us have an algorithm, where $x$ is evaluated by rolling a dice:
$x\leftarrow\{1,2,3,4,5,6\}$
if $2$ divides $x$ return $0$
if $3$ divides $x$ return $0$
return $1$

and let $A=\text{"2 divides}\ x \text{"}$ and $B=\text{"3 divides}\ x \text{"}$. Are $A$ and $B$ mutually exclusive? If not, then what is $A\cap B$.

As we know, all the elementary events of an experiment/process are mutually exclusive events. And since every event consist of elementary events, calculating probability, according to the law of mutually exclusive events, of any event means just summing probabilities of all the elementary events of which the event consists of. For example, for calculating $\text{Pr}[\text{"we roll an even number"}]$ we can just sum $\text{Pr}[\text{"we roll a two"}]$, $\text{Pr}[\text{"we roll a four"}]$, and $\text{Pr}[\text{"we roll a six"}]$, i.e.

$$\text{Pr}[\text{"we roll an even number"}]=\frac{1}{6}+\frac{1}{6}+\frac{1}{6}=\frac{1}{2}$$

for a normal six-faced dice. For the dice with two fives,

$$\text{Pr}[\text{"we roll an even number"}]=\text{Pr}[\text{"we roll a two"}]+\text{Pr}[\text{"we roll a four"}]=\frac{1}{6}+\frac{1}{6}=\frac{1}{3}.$$

Another natural example of mutually exclusive events is an event $A$ and its complement $A^c$. That is, the occurrence of the event $A^c$ means that the event $A$ does not occur. Mostly $A^c$ is state just as negation of the event $A$, but not always.

Some examples: if $A:=\text{"tomorrow it rains"}$, then $A^c:= \text{“tomorrow it does not rain”}$. Or, if $A:=\text{“we roll a result smaller then 3”}$ for a dice roll, then $A^c=\text{"we roll a result greater then or equal to 3"}$, i.e. $A^c=\text{"we roll a result 3, 4, 5, or 6"}$. Clearly we can also say that $A^c:=\text{"we do not roll a result smaller then 3"}$, however, the first and second formulations are more informative.

Note, that $A\dot{\cup} A^c=\Omega$. Hence,

$$1=\text{Pr}[\Omega]=\text{Pr}[A\dot{\cup} A^c]=\text{Pr}[A]+\text{Pr}[A^c],$$

providing us with formula

$$\text{Pr}[A]=1-\text{Pr}[A^c].$$

Which of the following events are mutually exclusive, which are not, and for which is it unknown? (Here $x,y$ are the results of two fair dice rolls.)

  1. Tomorrow's temperature is below zero.
  2. $x>4$.
  3. $y>6$.
  4. $x<4$.
  5. Tomorrow, the sun is shining.
  6. Tomorrow's temperature is above the melting point of water.

The wheel of fortune

gives you a free ticket to cinema if it stops on red or on orange. What is the probability that you win the ticket? Answer

Let us have an algorithm, where $x$ is evaluated by rolling a dice:
$x\leftarrow\{1,2,3,4,5,6\}$
if $x=3$ then $y=x+3$
if $x\geq 5$ then $y=8-x$.

Calculate $\text{Pr}[y=6]$. Answer

2. Mutually non exclusive events

If $A$ and $B$ are NOT mutually exclusive, then $$\text{Pr}[A\cup B]=\text{Pr}[A]+\text{Pr}[B]-\text{Pr}[A\cap B].$$

For example, viewing again the dice, if $A=\text{"the result is a prime"}$ and $B=\text{"the result is multiple of 3"}$ we have

Clearly

$\text{Pr}[A]=\text{Pr}[\text{“we roll 1”}]+\text{Pr}[\text{“we roll 2”}]+ \text{Pr}[\color{red}{\text{“we roll 3”}}]+\text{Pr}[\text{“we roll 5”}]=\frac{1}{6}+\frac{1}{6} +\frac{1}{6}+\frac{1}{6}= \frac{4}{6}$

and

$\text{Pr}[B]=\text{Pr}[\color{blue}{\text{“we roll 3”}}]+\text{Pr}[\text{“we roll 6”}]= \frac{1}{6}+\frac{1}{6}= \frac{2}{6}$.

If we add

$\text{Pr}[A]+\text{Pr}[B]=$

$\text{Pr}[\text{“we roll 1”}]+\text{Pr}[\text{“we roll 2”}]+ \text{Pr}[\color{red}{\text{“we roll 3”}}]+\text{Pr}[\text{“we roll 5”}]+ \text{Pr}[\color{blue}{\text{“we roll 3”}}]+\text{Pr}[\text{“we roll 6”}]=$

$\frac{4}{6}+\frac{2}{6}=1$,

we take $3$ into account two times, however, $A\cup B=\{1, 2, 3, 5, 6\}$ contains only one $3$. Thus,

$\text{Pr}[A\cup B]=\text{Pr}[A]+\text{Pr}[B]-\text{Pr}[\text{“we roll 3”}]=\text{Pr}[A]+\text{Pr}[B]- \text{Pr}[A\cap B]=1-\frac{1}{6}=\frac{5}{6}$.

What is the probability of drawing a red card or a six in a deck of cards?

Answer

On Midsummer's Day, a probability of a person having a car accident is $0,08$. The probability of a person driving intoxicated is $0,35$ and probability that a person has a car accident while intoxicated is $0,02$. What is the probability of a person driving while intoxicated or having a car accident?

Answer

Let us have an algorithm, where $x$ is evaluated by picking randomly a number from $1$ to $11$:
$x\leftarrow\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11\}$
if $2$ divides $x$ return $0$
if $5$ divides $x$ return $0$
return $1$.

What is the probability that the algorithm returns $0$? What is the probability that the algorithm returns $1$?

Answer

Two events $A$ and $B$ have probabilities given below:

$\text{Pr}[A]=\frac{1}{3} \qquad \text{Pr}[B]=\frac{1}{2}\qquad \text{Pr}[A\cup B]=\frac{5}{6}$

Are events $A$ and $B$ mutually exclusive or not?

Answer

In general,

if we do not know anything about the events $A$ and $B$. It is always correct to estimate $$\text{Pr}[A\cup B]\leq\text{Pr}[A]+\text{Pr}[B].$$

3. Independent events

Now, let us roll the dice two times in the row.

First roll:

Second roll:

The event consist of $2$ events: $A:=\text{"the result of the first roll"}$ and $B:=\text{"the result of the second roll"}$. Moreover, the events $A$ and $B$ can be viewed as results of two different random processes.

Note, that we can obtain by first roll a one and also by the second roll a one, actually, the result of the first roll does not influence the result of the second roll - these events are independent. So, how to calculated the probability now?

For answering the question, let us list up all the possible results:

Thus, $\text{Pr}[\text{"the first result is a one and the second result is a three"}]=\frac{1}{36}$, but also $\text{Pr}[\text{"the first result is a five and the second result is a four"}]=\frac{1}{36}$, and so on.

We can note a rule

$$\text{Pr}[\text{"the first result is x and the second result is y"}]= \text{Pr}[\text{"the first result is x"}]\cdot\text{Pr}[\text{"the second result is y"}].$$

Actually, it is a general rule.

Two events $A$ and $B$ are independent if and only if $$\text{Pr}[A\cap B]=\text{Pr}[A]\cdot\text{Pr}[B].$$

Note, that in case of an event which consists of results of two different random processes (e.g. $\text{"user logs into some computer system"}\cap\text{"the system has a failure"}$), there is no set-theoretic intersection between the events. However, $A\cap B$ means that the events $A$ and $B$ happen simultaneously (as one event), and this is precisely the case.

Thus, by tossing a coin two times in a row, the probability

$\text{Pr}[\text{"we obtain two tails in a row"}]=$

$\text{Pr}[\text{"1st throw gives tails"}\cap\text{"2nd throw gives tails"}]=$

$\text{Pr}[\text{“1st throw gives tails”}]\cdot\text{Pr}[\text{“2nd throw gives tails”}]= \frac{1}{2}\cdot\frac{1}{2}= \frac{1}{4}.$

Or, by tossing a coin and rolling a six-faced normal dice, the probability

$\text{Pr}[\text{"we land on heads"}\cap\text{"we roll a six"}]=$ $\text{Pr}[\text{“we land on heads”}]\cdot\text{Pr}[\text{“we roll a six”}]=\frac{1}{2}\cdot\frac{1}{6}= \frac{1}{12}.$

It can be very useful to represent such events as tree diagram. For example, a card is chosen blindly from a pack of $52$ playing cards, and then replaced. Then also a second card is drawn at random. What is the probability that both of the cards are Diamonds? Or, at least one card is a Diamond? Or, exactly one card is a Diamond?

First note, that for a single card
$\text{Pr}[\text{"we obtain a Diamond"}]=\frac{13}{52}=\frac{1}{4}$ and
$\text{Pr}[\text{“we do not obtain a Diamond”}]=1-\text{Pr}[\text{“we obtain a Diamond”}]=1-\frac{1}{4} =\frac{3}{4}$.

Let us put these probabilities on the branches of the tree diagram:

The probabilities are calculated by multiplying along the branches.

Clearly,
$\text{Pr}[\text{"both cards are Diamonds"}]=\frac{1}{16}$,
$\text{Pr}[\text{"at least one card is a Diamond"}]=\frac{1}{16}+\frac{3}{16}+\frac{3}{16}=\frac{7}{16}$,
$\text{Pr}[\text{"exactly one card is a Diamond"}]=\frac{3}{16}+\frac{3}{16}=\frac{3}{8}$.

A useful property of independent events is the following.

If $A$ and $B$ are independent, then also $A$ and $B^c$ are independent.

Thus, showing that $A$ and $B$ are independent can be replaced by showing that $A$ and $B^c$ are independent or $A^c$ and $B$ are independent ($(B^c)^c=B$ and $(A^c)^c=A$), if calculation of $B^c$ or $A^c$ is more easy.

A natural observation concerning independent events is:

if $A$ holds always (or holds never), then $A$ and $B$ are independent.

Which of the following events are independent, which are not? Explain your answer. (Here $x,y$ are the results of two fair dice rolls.)

  1. Tomorrow's temperature is below zero.
  2. $x>4$.
  3. $y>6$.
  4. $x<4$.
  5. Tomorrow, the sun is shining.
  6. Tomorrow's temperature is above the melting point of water.

Let $x,\ y$ be random bits, each chosen using a coin flip, and let $A:=\text{"$x=0$"}$ and $B:=\text{"$x=y$"}$. Are $A$ and $B$ independent?

Answer

Let us have the following algorithm:

x = 0, y = 0
while (x = 0)
  x <- {0,1,2}
  y = y+1
where x is evaluated randomly with one of the values $0$, $1$, $2$. Calculate $\text{Pr}[y=3]$.

Let us have the following algorithm, where $x$ is evaluated by picking randomly a number from $1$ to $12$:
$x\leftarrow\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12\}$
if $2$ divides $x$ return “boy”
if $4$ divides $x$ return “girl”

Are the events of obtain “boy” and obtaining “girl” independent?

What is the answer to the same question in the following case:
$x\leftarrow\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12\}$
if $6$ divides $x$ return “boy”
if $4$ divides $x$ return “girl”

4. Additional exercises

Assume the following game of chance: two random numbers $x,y$ are picked from $1,\dots,100$. We win if $x\neq y$ and $x,y> 90$. What is the probability of winning?

Answer

Assume that you have the following information: with probability $0,1$, my new friend is female and at most $29$ years old. With probability $0,3$, my new friend is female and at least $30$ years old.

What $\text{Pr}[\text{"my new friend is female"}]$?

Answer

In a ($6$ out of $49$) lottery, the probability of winning is $\frac{1}{13\,983\,816}$. The probability that $49$ is one of the numbers is $\frac{6}{49}$.

You play in the lottery and at the same time roll a die. What is the probability that you win the lottery and roll a six?

Answer

A company makes computer discs. It tested a random sample of discs from a large batch and found that the probability of any disc being defective is $0,025$.

Bob buys two discs. Calculated the probability that

  • both discs are defective;
  • that only one disc is defective.

The company found $4$ defective discs in the sample they tested. How many discs were likely tested?

probability/02_multiple_event_probability.txt · Last modified: 2014/03/06 13:22 by anna