I was reading in the book "What is Mathematics" by Courant/Robbins about the algebra of sets and their application to the theory of probability.
They give an example:
The three digits 1, 2, 3 are written down in random order. What is the probability that at least one digit will occupy its proper place.
So we wish to calculate $p(A + B + C)$ (OR).
They give then a formula for calulating:
$$p(A + B + C) = p(A) + p(B) + p(C) - p(AB) - p(AC) - p(BC) + p(ABC)$$
1) I find this confusing, because in another book I found this definition:
$$p(\text{A or B or C}) = p(A) + p(B) + p(C)$$
What's the reason here for two different definitions?
2) In the "What is Mathematics" book they proceed to calculate $p(A) = p(B) = p(C) = \frac{1}{3}$ which is clear to me.
But then they calculate $p(AB) = p(AC) = p(BC) = \frac{1}{6}$ (AND) which I dont understand how they found it. I wrote down the combinations, and of course the answer is correct, put I thought for example $p(AB) = \frac{1}{3} \times \frac{1}{3}$ (although that would give a nonsensical answer.)
So how is $p(AB) = p(AC) = p(BC) = \frac{1}{6}$ found mathemtically?
Consider the diagram below:
We wish to find $\Pr(A \cup B \cup C)$, the probability that an element is contained in set $A$ or set $B$ or set $C$.
If we simply add the probabilities $\Pr(A)$, $\Pr(B)$, and $\Pr(C)$, we add the probabilities $\Pr(A \cap B)$, $\Pr(A \cap C)$, and $\Pr(B \cap C)$ twice, once for each set in which the intersection of two sets is contained. We only want to add them once, so we must subtract $\Pr(A \cap B)$, $\Pr(A \cap C)$, and $\Pr(B \cap C)$ from $\Pr(A) + \Pr(B) + \Pr(C)$. However, if we do so, we will not have added $\Pr(A \cap B \cap C)$ at all. This is because we add it three times in the sum $\Pr(A) + \Pr(B) + \Pr(C)$, once for each set in which $A \cap B \cap C$ is contained, then subtract it three times when we subtract $\Pr(A \cap B)$, $\Pr(A \cap C)$, and $\Pr(B \cap C)$ from the total, once for each pair of sets in which $A \cap B \cap C$ is contained. Thus, we must add $\Pr(A \cap B \cap C)$ to the total. Therefore, $$\Pr(A \cup B \cup C) = \Pr(A) + \Pr(B) + \Pr(C) - \Pr(A \cap B) - \Pr(A \cap C) - \Pr(B \cap C) + \Pr(A \cap B \cap C)$$ In the special case that sets $A$, $B$, and $C$ are mutually disjoint,
$$P(A \cap B) = P(A \cap C) = P(B \cap C) = P(A \cap B \cap C) = 0$$ so $$\Pr(A \cup B \cup C) = \Pr(A) + \Pr(B) + \Pr(C)$$
As for the problem in Courant and Robbins' What is Mathematics?, notice that if any two of the three numbers $1, 2, 3$ are in their proper places, so is the third. Since there are $3! = 6$ possible permutations and only one of them has two numbers in their proper places, $$P(A \cap B) = P(A \cap C) = P(B \cap C) = \frac{1}{6}$$ Moreover, $$P(A \cap B \cap C) = \frac{1}{6}$$ since only one of the six permutations has all three numbers in their proper places.
Consider the list of the six permutations of $1, 2, 3$.
$1, 2, 3$
$1, \color{red}{3}, \color{red}{2}$
$\color{red}{2}, \color{red}{1}, 3$
$\color{red}{2}, \color{red}{3}, \color{red}{1}$
$\color{red}{3}, \color{red}{1}, \color{red}{2}$
$\color{red}{3}, 2, \color{red}{1}$
Numbers marked in red are not in their proper places. Two of the six permutations of $1, 2, 3$ have no number in their proper place (these are called derangements). The remaining four permutations have at least one number in its proper place, so they belong to $A \cup B \cup C$. Hence, $$\Pr(A \cup B \cup C) = \frac{4}{6} = \frac{2}{3}$$ We can also compute $\Pr(A \cup B \cup C)$ using our formula. Since $\Pr(A) = \Pr(B) = \Pr(C) = \frac{1}{3}$, $\Pr(A \cap B) = \Pr(A \cap C) = \Pr(B \cap C) = \Pr(A \cap B \cap C) = \frac{1}{6}$, we obtain \begin{align*} \Pr(A \cup B \cup C) & = \Pr(A) + \Pr(B) + \Pr(C) - \Pr(A \cap B) - \Pr(A \cap C) - \Pr(B \cap C) + \Pr(A \cap B \cap C)\\ & = \frac{1}{3} + \frac{1}{3} + \frac{1}{3} - \frac{1}{6} - \frac{1}{6} - \frac{1}{6} + \frac{1}{6}\\ & = \frac{4}{6}\\ & = \frac{2}{3} \end{align*}