Proving $|P(A\cap B)-P(A)P(B)|\leq \frac{1}4$

Since $P(A)\ge P(A\cap B)$ and $P(B)\ge P(A\cap B)$ you have that $$P(A)P(B)\ge P(A\cap B)^2$$ which gives $$P(A\cap B)-P(A)P(B)\le P(A\cap B)-P(A\cap B)^2=P(A\cap B)(1-P(A\cap B))$$ Now for $p:=P(A\cap B)$, the right hand side is equal to $$f(p)=p(1-p)$$ for $p\in [0,1]$. This function is a quadratic function that attains it's maximum in the midpoint between it's roots ($p=0$ and $p=1$), that is at $p=1/2$.


Now the other side follows from the first side, if you use that $P(A\cap B)+P(A\cap B')=P(A)$ or equivalently $$P(A\cap B)=P(A)-P(A\cap B')$$ which gives you that $$P(A)P(B)-P(A\cap B)=P(A)P(B)-P(A)+P(A\cap B')=P(A\cap B')-P(A)P(B')$$ where the right hand side is $\le \dfrac{1}{4}$ due to first inequality we proved above (since the above inequality holds for every $A,B$, it holds also for $B'$ in place of $B$). This gives you also the other side.


Probably the most succinct proof, shamelessly adapted from another answer:

If $P(B)=0$ or $P(B)=1$ the inequality is trivial, so we may assume $P(B)\in (0,1)$. Then note that $$\begin{align}|P(A\cap B)-P(A)P(B)| &= \left|P(B)P(B^c)\left[ \frac{P(A\cap B)}{P(B)P(B^c)} - \frac{P(A\cap B)+P(A\cap B^c)}{P(B^c)} \right]\right|\\ &= \left|P(B)P(B^c)\left[\frac{P(A\cap B)(1-P(B))}{P(B)P(B^c)}-\frac{P(A\cap B^c)}{P(B^c)} \right]\right|\\ &=P(B)P(B^c)|P(A\mid B)-P(A\mid B^c)|\\ &=P(B)(1-P(B))\underbrace{|P(A\mid B)-P(A\mid B^c)|}_{\leq 1}\\ &\leq \frac 14 \end{align}$$

because $x(1-x)\leq \frac 14$ when $x\in [0,1]$.


first, look at this, $$0 \leq x \leq1 \to x(1-x)\leq \frac 14$$ now if $$* \space 0\leq y\leq x\leq1 \to y(1-x)\leq x(1-x)\leq \frac 14$$ and if $$** \space 0\leq x\leq y\leq1 \to x(1-y)\leq y(1-y)\leq \frac 14$$
we know $$P(A \cap B)\leq \min \{P(A ),P(B) \}\leq \max \{P(A ),P(B) \}$$ first suppose $P(A)=x,P( B)=y,y\leq x$
with respect to * you will have $$|P(A\cap B)−P(A)P(B)|\leq |\max \{P(A ),P(B) \}−P(A)P(B)|=|x-xy|=|x(1-y)|≤\frac{1}{4}$$ as a second step,suppose $P(A)=x,P( B)=y,y\geq x$

you will have
(with respect to **) $$|P(A\cap B)−P(A)P(B)|\leq |\max \{P(A ),P(B) \}−P(A)P(B)|=|y-xy|=|y(1-x)|≤\frac{1}{4}$$


Let's call $\;P(A)=x\;$, $\;P(B)=y\;$, and suppose $x\le y$.
We have

$$ \max\{0,x+y-1\}\le P(A\cap B)\le \min\{x,y\}=x $$ Then, if $\;P(A\cap B)\ge xy\;$, we have $$ |P(A\cap B)-xy|=P(A\cap B)-xy\le x-xy\le x-x^2\le \frac{1}{4} $$

On the other hand, if $\;P(A\cap B)\le xy\;$, and $\;x+y\le 1\;$, $$ |P(A\cap B)-xy|=xy-P(A\cap B)\le xy\le x(1-x)\le \frac{1}{4} $$

The last case is $\;P(A\cap B)\le xy\;$, and $\;x+y\ge 1\;$, $$ |P(A\cap B)-xy|=xy-P(A\cap B)\le xy-x-y+1=(1-x)(1-y)\le x(1-x)\le \frac{1}{4} $$


We know that $P(A), P(B), P(A \cap B) \geq 0$.

We have 2 cases:

  • Case 1: $P(A \cap B) \leq P(A)P(B)$. In this case, let $P(A) = x \in [0; 1]$. Thus $P(B) \leq 1-x + P(A \cap B)$. Hence $$ | P(A \cap B) - P(A)P(B) | \leq | P(A \cap B)(x-1) + x(1-x) | \leq x(1-x) $$

  • Case 2: $P(A \cap B) \geq P(A)P(B)$. In this case, let $P(A \cap B) = y \in [0; 1]$, $P(A) = y + u$ and $P(B) = y + v$ for some small but non-negative values of $u$ and $v$. Hence $$ | P(A \cap B) - P(A)P(B) | = | y - y^2 - yu - yv - uv | \leq y(1-y) $$