Why is the covariance of two indicator functions at most 1/4?

71 Views Asked by At

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!

2

There are 2 best solutions below

1
On BEST ANSWER

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$.

2
On

Write $a = P(A \setminus B), b = P(B \setminus A), c = P(A \cap B), d = 1 - a - b - c$.

You want to prove : $|c - (c+a)(c+b)| = |c - c^2 - (a+b)c - ab| = |dc - ab| \leq 1/4$, knowing $a+b+c+d = 1$ and they are all positive. But $dc, ab \geq 0$ and if $a + b \leq 1$, $0 \leq a, b \leq 1$, you always have $ab \leq 1/4$, the same holds for $dc$. This yields what you want.