Inclusion/exclusion probability

344 Views Asked by At

I am having a really hard time understanding inclusion/exclusion for probabilities.

For counting, i understand the concept that if you take $|A| + |B|$ and they have something in common you are counting that something twice. In order to fix this problem you must subtract that something once: $|A| + |B| - |A\cap B|$. I get the concept of $|A| + |B| + |C| + \dots$

What i am confused about is how does this work in the general form of $1-[S_1-S_2+S_3-\dots+\dots-\dots]$ etc.

In terms of $|A|+|B| - |A\cap B|$, $S_1=|A|+|B|$ and $S_2=|A\cap B|$, how does this work with probability?

Example: \begin{align*} S&=\{4\textrm{ boxes}, 6\textrm{ balls}\}\\ \textrm{event } A&=\{\textrm{no empty boxes}\}\\ |S|&=4^6\\ A^{\textrm c}&=\{\textrm{at least 1 empty box}\}\\ A_i&=\{\textrm{box }i\textrm{ empty}\}\\ 1&-[S_1-S_2+S_3-S_4]= 1-\left[\frac{4\cdot 3^6}{4^6} - \frac{6\cdot 2^6}{4^6} + \frac{4}{4^6}\right]=\frac{1560}{4^6} \end{align*} I understand that 1 is the total probability of the event so subtracting each probability of box i not being empty will yield the probability of no empty boxes.

I just don't understand the numbers of $S_1, S_2, S_3, S_4$. I get the denominator $4^6$ since that is the total sample space but what is $4\cdot 3^6$ and $6\cdot 2^6$ and $1$? Is there some permutation going on with the boxes? $3$, $2$, $1$? What is $4$ and $6$?

EDIT: Okay after much thinking i've realized that $|A_1|+|A_2|+|A_3|+|A_4|=3^6/4^6 + 3^6/4^6 + 3^6/4^6 + 3^6/4^6$ which is $S_1=4\cdot 3^6/4^6$, and that $|A_1 \cap A_2|+|A_1 \cap A_3|+|A_1 \cap A_4|+|A_2 \cap A_3|+|A_2 \cap A_4|+|A_3 \cap A_4|=2^6/4^6 + 2^6/4^6 + 2^6/4^6 + 2^6/4^6 + 2^6/4^6 + 2^6/4^6$ which is $S_2=6\cdot 2^6/4^6$. Lastly $S_3=4/4^6$ which is the part that we add back after subtracting the center for duplicates. For $4/4^6$ why is it $4$ instead of $2/4^6$? We added a total of $4$ duplicates from $A_1$ to $A_4$ and then subtracted the intersection of $A_1$ to $A_4$ $6$ times.

1

There are 1 best solutions below

0
On

In your case, that is when we consider the uniform distribution, there is almost no difference between counting and probabilities. For the probability, you just consider the number $|A|$ of desired outcomes, in our case the outcomes with no empty boxes, and for the denominator you just take the number $|S|$ of all possible outcomes, in our case $|S|=4^6$. When choosing randomly, the probability is just the number of desired outcomes divided by the total number of outcomes, i.e. $\frac{|A|}{|S|}$.

For the number $|A|$ of desired outcomes, you have correctly applied inclusion exclusion. In order to directly compute $|A|$, we start with $S$. Then we subtract the cases where box $1$ is empty, further the cases where box $2$ is empty and so forth. This gives $|S|-\sum_{i=1}^4|A_i|$. Then we have subtracted the cases in the intersection $A_1\cap A_2$ twice, and analogously for the remaining intersections, so we have to add them again. This gives $|S|-\sum_{i=1}^4|A_i|+\sum_{1\le i<j\le 4}|A_i\cap A_j|$. Now, look at the cases $A_1\cap A_2\cap A_3$ where the boxes $1,2,3$ are empty. First, we considered them since they are in $S$, then we subtracted them three times, then we added them three times. Since we have to exclude these cases, we have to subtract them again. This gives $|S|-\sum_{i=1}^4|A_i|+\sum_{1\le i<j\le 4}|A_i\cap A_j|-\sum_{1\le i<j<k\le 4}|A_i\cap A_j\cap A_k|$. A similar train of thought gives $|A|=|S|-\sum_{i=1}^4|A_i|+\sum_{1\le i<j\le 4}|A_i\cap A_j|-\sum_{1\le i<j<k\le 4}|A_i\cap A_j\cap A_k|+|A_1\cap A_2\cap A_3\cap A_4|$ and thereby completes the discussion of the inclusion-exclusion formula.

Now, we have to compute the numbers. We have $|S|=4^6$. Further, we have $|A_i|=3^6$ since box $i$ is empty and we can hence only choose one of the remaining three boxes for each ball. Similarly, we obtain $|A_i\cap A_j|=2^6$, $|A_i\cap A_j\cap A_k|=1^6$ and notice that $|A_1\cap A_2\cap A_3\cap A_4|=0$ since we have to put the balls somewhere. This gives $|A|=4^6-3^6|\{i:1\le i\le 4\}|+2^6|\{(i,j):1\le i<j\le 4\}|-|\{(i,j,k):1\le i<j<k\le 4\}|$. Now, we can either count or notice that these set sizes are exactly given by binomial coefficients, yielding $|A|=\binom{4}{0}4^6-\binom{4}{1}3^6+\binom{4}{2}2^6-\binom{4}{3}1^6=4^6-4\cdot 3^6+6\cdot 2^6-4$. Dividing by $4^6$ gives the probability.