The problem is extracted from All of Statistics (Exercise 7.5), Larry Wasserman. I don't have a solution manual to the book so I post here the problem together with my attempted answer:
Let $x$ and $y$ be two distinct points. Find $Cov(\hat F_n(x), \hat F_n(y))$.
Here is my attempted answer:
$\hat F_n(x) = \frac{1}{n} \sum I\{ X_i \le x\} $
$\mathop{\mathbb{E}}(\hat F_n(x)) = F(x) $
$\mathop{\mathbb{E}}(\hat F_n(y)) = F(y) $
$Cov(\hat F_n(x), \hat F_n(y)) = \mathop{\mathbb{E}}(\hat F_n(x)\cdot \hat F_n(y)) - \mathop{\mathbb{E}}(F_n(X))\mathop{\mathbb{E}}(F_n(y) $
For (Updated based on Xi'an's answer) \begin{align*} \mathop{\mathbb{E}}(\hat F_n(x)\cdot \hat F_n(y)) &= \frac{1}{n^2} \mathop{\mathbb{E}}(\sum_i I\{X_i \le x\} \sum_j I\{X_j \le y\}) \\&= \frac{1}{n^2} \mathop{\mathbb{E}}(\sum_{i \neq j} I\{X_i \le x\}I\{X_j \le y\} + \sum_{i = j} I\{X_i \le x\}I\{X_j \le y\}) \\&= \frac{1}{n^2}(nF(\min\{x,y\})+n(n-1)F(x)F(y)) \\&= \frac{1}{n}(F(\min\{x,y\}) + (n-1)F(x)F(y))\end{align*}
Combining the above result together, we have (Updated based on Xi'an's answer):
$$ Cov(\hat F_n(x), \hat F_n(y)) = \frac{1}{n}(F(\min\{x,y\}) - F(x)F(y)) $$
I am not sure if my attempt is correct or not. Could anyone verify the answer or point out if there are any flaws in my arguments?