Let’s remember the example of people being infected of the previous lecture:
You can see that the two events are related: the probability that a person is infected depends on the outcome of the test.
Imagine now that the test is useless, and therefore it does not change the probability of a person being infected or not: $P(\text{infected|positive})=P(\text{infected})$
<aside> ℹ️ Event $A$ is called independent of $B$ if:
These statements are equivalent. If one is true, all are true.
If $A$ and $B$ are not independent (that is, any of the upper statements is false), they are said to be dependent.
</aside>
Note that if A is independent of B, B is also independent of A:
$P(B|A)=\frac{P(A\cap B)}{P(A)}=\frac{P(A|B)P(B)}{P(A)}=\frac{P(A)P(B)}{P(A)}=P(B)$
So, we can conclude that:
<aside> ℹ️ If $B$ is independent of $A$, then $A$ is also independent of $B$. Moreover, if $A$ is independent of $B^c$, $A$ is also independent of $B$ (and viceversa).
</aside>
Note that independence does not mean disjointness. If $A$ and $B$ are disjoint, $P(A \cap B)=0$. However, if $A$ and $B$ have some (positive) probability, then $P(A)P(B) \not = 0$, so $A$ and $B$ are dependent.
Suppose you have a normal 52 deck of shuffled poker cards (without jokers). You randomly raw a card. Let $A$ be the event that the card is a queen, and let $B$ be the event that the card is of hearts. Are $A$ and $B$ independent?
$P(A \cap B)=P(\text{queen of hearts})=\frac{1}{52}$
$P(A)P(B)=(\frac{4}{52})(\frac{13}{52})=\frac{1}{13}\frac{1}{4}=\frac{1}{52}$
As $P(A)P(B)=P(A \cap B)$, the events $A$ and $B$ are independent.
When more than two events are involved we need a more elaborate definition of independence.
<aside> ℹ️ The events $A_1,A_2,...,A_m$ are called independent if for each collection $A_{i1},A_{i2},...,A_{ik}$ it holds that
$P(A_{i1}\cap A_{i2} \cap ... \cap A_{ik})=P(A_{i1})P(A_{i2})...*P(A_{ik})$
</aside>