# Variance of the Empirical CDF

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)$?

-
Do you mean $F_i(x) = \mathbb{P}(X_i \leqslant x)$? Also, for the empirical cdf, do you mean $F_n(x,\omega) = \frac{1}{n} \sum_{k=1}^n I(X_k(\omega) < x)$? It could not hurt to be a little more specific. – Sasha Apr 30 '12 at 5:11
Yes and thank you for the clarification. – user12847 Apr 30 '12 at 5:42

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))$$
Thank you. How about the case of $m$-independence where $X_i$ and $X_j$ are independent once $m$ apart. – user12847 Apr 30 '12 at 6:30
@user12847 In that case, the formula for $\mathbb{Var}(Y)$ simplifies, in that $F_{X_k,X_\ell}(x,x) = F_{X_k}(x) F_{X_\ell}(x)$ for $|k-\ell| \geqslant m$. – Sasha Apr 30 '12 at 12:02