# Finding example of independent event in coin toss

This is from the book All of Statistics - Larry Wasserman, Chapter 1, excercise 23

Here we will get some experience simulating conditional probabilities. Consider tossing a fair die. Let $$A = [2, 4, 6]$$ and $$B = [1,2,3,4]$$. Then, $$P(A) = 1/2, P(B) = 2/3$$ and $$P(A \cap B) = 1/3$$. Since $$P(A > \cap B) = P(A)P(B)$$, the events A and B are independent.

...

Now find two events $$A$$ and $$B$$ that are not independent.

Suppose I choose A = {2, 4}, then $$P(A) = 1/3$$, and $$P(A \cap B)$$ is still $$1/3. P(A \cap B) \neq P(A)P(B)$$. However, I think A and B are still independent because I could not see how choosing B and A influences another. How can one find an define $$A$$ and $$B$$ so that they are dependent?

A useful way to think about dependency is this: If the chance of $$B$$ happening is effected by the happening or not happening of $$A$$, then we can say that they are dependent.

As an extreme case, consider the situation where $$A=B$$:

Well, when $$A$$ happens, $$B$$ is bound to happen as well, while if $$A$$ does not happen, $$B$$ cannot happen either. So, the chance of $$B$$ happening is very much effected by $$A$$ happening or not. Indeed, one could say they are 'perfectly' or 'maximally' dependent.

The math shows this as well. With $$A=B=[2,4,6]$$ we get $$P(A \cap B)=\frac{1}{2}$$ but $$P(A)\cdot P(B)=\frac{1}{4}$$

But using the above way of thinking, you can also test for dependency as follows: If $$P(A|B)=P(A|B')$$, then $$A$$ and $$B$$ are independent, otherwise they are dependent. In this case: $$P(A|B)=1$$, but $$P(A|B')=0$$, so they are dependent.

Also note that $$P(A|B)=P(A|B')$$ if and only if $$P(A|B)=P(A)$$, so that is another tèst you can do: if $$P(A|B) \not = P(A)$$ then they are dependent: once again, the chance of $$A$$ happening is effected by the happening of $$B$$.

Now, your example works too! As you found out, with $$A=[2,4]$$ and $$B=[1,2,3,4]$$, we have $$P(A \cap B)=P(A)=\frac{1}{3}$$, which does not equal $$P(A)\cdot P(B)=\frac{2}{9}$$, so they are dependent.

But more intuitively, why is this so?

Well, note that we have $$A \subseteq B$$, so whenever $$A$$ happens, we know $$B$$ definitely happens. However, if $$A$$ does not happen, $$B$$ may or may not happen. So, the happening of $$A$$ will effect the chances of $$B$$ happening, making them dependent.

Seen the other way around: if $$B$$ happens, then $$A$$ may or may not happen, but if $$B$$ does not happen, than $$A$$ definitely cannot happen. So, the happening of $$A$$ will effect the chances of $$B$$ happening. So again, they will influence each other, and are thus dependent.

Indeed, to use that other test:

$$P(B|A)=1$$, but $$P(B|A')=\frac{1}{2}$$. Not the same, so dependent.

$$P(A|B)=\frac{1}{2}$$, but $$P(A|B')=0$$. Again, not the same, so dependent

• Thank you for intuition that what did not happen is at important as what happened Commented Jun 15, 2019 at 5:27

Hint: $$A = \{ 1,2\}, B = \{ 3,4\}$$

• Ah yes, a bit of an extreme case where $P(A \cap B=0$, now if $A$ happened, we can be sure that $B$ won't, thus they are dependent. Commented Jun 15, 2019 at 5:43

Here is an example where the events are neither mutually exclusive nor disjoint nor one a subset of the other:

$$A$$: get an even number, $$\{2,4,6\}$$

$$B$$: get a number greater than $$3$$, $$\{4,5,6\}$$.

$$P(A)=P(B)=\frac12$$, but $$P(A\cap B)=P(\{4,6\})=\frac13$$. So $$P(A\cap B)\ne P(A)\cdot P(B)$$.