Why is the independence formula P(A|B) = P(A)

I understand independence of flips of a coin to be this: no matter what outcome happens for the first flip the probabilities of the outcomes of the second flip remain the same. Let's apply this to events. If B = heads on first flip and A = heads on second flip then if these events are independent then P(A|B) = P(A|notB). In other words, no matter if the first flip is heads or tails the probability of the outcome of heads for the second flip remains the same. So why is the formula P(A|B) = P(A) instead?

• The events $A,B$ are independent iff $P(A \cap B) = P(A)P(B)$. Commented Jun 12, 2022 at 19:44

Your definition actually works too! But first some conceptual reasoning. The condition $$P(A\mid B) = P(A)$$ means that knowing that $$B$$ happened has no influence on the probability of $$A$$, which is the typical Bayesian view on the matter. The probability is the same with or without knowledge of $$B$$.

In contrast, your definition says that whether $$B$$ happens or not gives the same conditional probablity of $$A$$. A reasonable idea as well. In fact, they are equivalent: $$P(A\mid B) = P(A\mid \neg B)$$ $$\iff \frac{P(A\cap B)}{P(B)} = \frac{P(A\cap \neg B)}{P(\neg B)} = \frac{P(A) - P(A\cap B)}{1-P(B)}$$ $$\iff \frac{P(A\cap B)}{P(B)} - P(A\cap B) = P(A) - P(A\cap B)$$ $$\iff P(A\mid B) = \frac{P(A\cap B)}{P(B)} = P(A).$$

Somewhat sleeker derivation through law of total probability: $$\begin{split} P(A\mid B) &= P(A\mid B)(1 - P(B)) + P(A\mid B)P(B)\\ &= P(A\mid \neg B)P(\neg B) + P(A\mid B)P(B)\\ &= P(A). \end{split}$$

And similarly for the other direction.

Well, if $$A$$ and $$B$$ are independent events, I claim the following is true: \begin{align*} P(A|B) &= P(A) \\ P(A|B) &= P(A|\text{NOT} \, B) \\ P(A \cap B) &= P(A)P(B) \\ \end{align*}

The last equation is how I have typically seen it defined.

Recall that (provided $$\mathbb{P}(B)>0$$), $$\mathbb{P}(A\mid B)=\frac{\mathbb{P}(A\cap B)}{\mathbb{P}(B)}$$.

So if $$\mathbb{P}(A\mid B)= \mathbb{P}(A)$$ then $$\mathbb{P}(A\cap B)=\mathbb{P}(A)\mathbb{P}(B)$$, which is exactly the condition of independence.