TITLE: Variance of the Empirical CDF
QUESTION [5 upvotes]: Suppose $X_1,X_2,\ldots$ are $m$-dependent random variables. Let $F_i$ be the cdf of $X_i$. Let $F_n(x, \omega)$ be the empirical cdf of $X_1,\ldots,X_n$. What will be the variance of $F_n(x, \omega)$?

REPLY [9 votes]: Let $Y(\omega) = F_n(x, \omega) = \frac{1}{n} \sum_{k=1}^n I(X_k(\omega) \leqslant x)$. Then, using $\mathbb{E}(I(X_k \leqslant x)) = \mathbb{P}(X_k \leqslant x)$, we have
$$
   \mathbb{E}\left(Y\right) = \frac{1}{n} \sum_{k=1}^n \mathbb{P}(X_k \leqslant x) = \frac{1}{n} \sum_{k=1}^n F_k(x)
$$
$$ \begin{eqnarray}
 \mathbb{E}(Y^2) &=& \frac{1}{n^2} \sum_{k=1}^n \sum_{\ell=1}^n \mathbb{E}\left( I(X_k \leqslant x) I(X_\ell \leqslant x)  \right) \\ &=& 
  \frac{1}{n^2} \sum_{k=1}^n \sum_{\ell=1}^n \mathbb{P}(X_k \leqslant x, X_\ell \leqslant x)
\end{eqnarray}
$$
Therefore:
$$\begin{eqnarray}
 \mathbb{Var}(Y) &=& \frac{1}{n^2} \sum_{k=1}^n \sum_{\ell=1}^n  \left(  \mathbb{P}(X_k \leqslant x, X_\ell \leqslant x) - F_{X_k}(x) F_{X_\ell}(x) \right) \\
     &=& \frac{1}{n^2} \sum_{k=1}^n F_{X_k}(x) \left(1-F_{X_k}(x)\right) + \frac{2}{n^2} \sum_{1 \leqslant k < \ell \leqslant n} \left( F_{X_k,X_\ell}(x,x) - F_{X_k}(x) F_{X_\ell}(x) \right)
\end{eqnarray}$$
For the case of independent variables in the sample, we get
$$
  \mathbb{Var}(Y_\text{indep}) = \frac{1}{n^2} \sum_{k=1}^n F_{X_k}(x) \left(1-F_{X_k}(x)\right)
$$
For the case of identically distributed:
$$
   \mathbb{Var}(Y_\text{i.i.d.}) = \frac{1}{n} F_X(x) (1-F_X(x))
$$