Deriving a confidence interval for the cumulative distribution function

90 Views Asked by At

If $X_1, \dots, X_n$ is a random sample from a distribution with CDF $F_X$, then I want to derive a pointwise confidence interval for the empirical CDF, $\hat F_n(x)$. I am using the pivot

\begin{align*} \frac{\hat F_n(x) - F_X(x)}{\sqrt{\frac{F_X(x)(1 - F_X(x))}{n}}} \end{align*}

which is approximately normally distributed. Notice that I have the CDF in under the radical, not the empirical CDF. The problem is that the algebraic manipulations to get a confidence interval for $F_X(x)$ are really messy.

I'm hoping for help with the algebra here, because I've really gotten bogged down and can't see my way out. (I think the fact that the quadratic polynomial is an inequality is one of the main things that's giving me grief. I've never dealt with that before.)

My attempt:

Due to limit theorems again we have that

\begin{align*} P \Bigg(-z_{\alpha / 2} \leq \frac{\hat F_n(x) - F_X(x)}{\sqrt{\frac{F_X(x)(1 - F_X(x))}{n}}} \leq z_{\alpha / 2}\Bigg) \approx 1 - \alpha. \end{align*}

Again we must manipulate two inequalities in order to isolate $F_X(x)$, but it is trickier this time because we now have $F_X(x)$ under the radical, whereas before we had $\hat F_n(x)$ under the radical.\

Applying basic algebra to the left inequality, we have

\begin{align*} -z_{\alpha / 2} &\leq \frac{\hat F_n(x) - F_X(x)}{\sqrt{\frac{F_X(x)(1 - F_X(x))}{n}}}\\ \Rightarrow -z_{\alpha / 2}\sqrt{\frac{F_X(x)(1 - F_X(x))}{n}} &\leq \hat F_n(x) - F_X(x)\\ \Rightarrow z_{\alpha / 2}^2 \frac{F_X(x)(1 - F_X(x))}{n} &\leq \big(\hat F_n(x) - F_X(x)\big)^2\\ \Rightarrow z_{\alpha / 2}^2 \frac{F_X(x)(1 - F_X(x))}{n} &\leq \hat F_n(x)^2 - 2\hat F_n(x)F_X(x) + F_X(x)^2\\ \Rightarrow \frac{z_{\alpha / 2}^2}{n}F_X(x) - \frac{z_{\alpha / 2}^2}{n}F_X(x)^2 &\leq \hat F_n(x)^2 - 2\hat F_n(x)F_X(x) + F_X(x)^2\\ \Rightarrow 0 &\leq \Big( \frac{n + z_{\alpha / 2}^2}{n} \Big)F_X(x)^2 + \Big( - \frac{z_{\alpha / 2}^2}{n} - 2\hat F_n(x)\Big) F_X(x) + \hat F_n(x)^2. \end{align*}

As this is a quadratic polynomial in $F_X(x)$, we may now apply the quadratic formula with

\begin{align*} a &= \frac{n + z_{\alpha / 2}^2}{n}\\ b &= - \frac{z_{\alpha / 2}^2}{n} - 2\hat F_n(x)\\ c &= \hat F_n(x)^2, \end{align*}

giving us

\begin{align*} F_X(x) &= \frac{\Big(\frac{z_{\alpha / 2}^2}{n} + 2\hat F_n(x)\Big) \pm \sqrt{\Big(\frac{z_{\alpha / 2}^2}{n} + 2\hat F_n(x)\Big)^2 - 4\Big(\frac{n + z_{\alpha / 2}^2}{n}\Big)\hat F_n(x)^2}}{2\Big( \frac{n + z_{\alpha / 2}^2}{n}\Big)}. \end{align*}

The answer:

I believe the answer is supposed to be

\begin{align*} \frac{n}{n + z^2}\hat F_n(x) + \frac{z^2/2}{n + z^2} \pm z\sqrt{\frac{z^2/4}{n + z^2} + \frac{n}{n + z^2}\hat F_n(x)\big(1 - \hat F_n(x)\big)} \end{align*}

where $z = z_{\alpha /2}$.

I appreciate if anybody can help me find the way to the answer. Thanks.