In an answer to this question, it was mentioned that the covariance of two indicators of measurable sets can at most be 1/4, in formulas,
$$ | P(A\cap B) - P(A)P(B) | \leq \frac{1}{4}, $$
where $P$ is a probability measure and $A$, $B$ are two events.
I tried to prove it but didn't suceed. The case where $A$ and $B$ are disjoint seems to be the extreme case (for which then optimizing yields the exact extremal value 1/4 by choosing $P(A)=P(B)=1/2$), but how to prove that the covariance of non-disjoint events can't be larger in magnitude?
Thanks in advance!
You may use Cauchy-Schwarz inequality $|\mathrm{Cov}(1_A,1_B)| \le \big(\mathrm{Var}(1_A)\mathrm{Var}(1_A)\big)^{1/2}$ and the fact that for every event $A$, $\mathrm{Var}(1_A) = P(A)-P(A)^2 \le 1/4$.