9 Empirical Distribution

1 Convergence of Empirical Distribution

Suppose X1,⋯,Xn∼i.i.dF, where F(x)=P(X≤x) is an unknown c.d.f. We want to estimate F:R→[0,1].
A natural estimator is the empirical distribution F^n:R×Ω→[0,1]: Fn^(x)=1n∑i=1nI(Xi≤x), where for ω∈Ω, I(Xi≤x)(ω)={1,Xi(ω)≤x,0,otherwise.

  1. Xi(ω)≤x⇔ω∈Xi−1(−∞,x].
  2. Note that E[I(Xi≤x)]=P(I(Xi≤x)=1)=P({ω∈Ω|Xi(ω)≤x})=P(Xi≤x)=F(x)≤1.
    So by SLLN, ∀x∈R, F^n(x)→a.s.F(x). I.e. ∀x∈R, P(limn→∞F^n(x)=F(x))=1.
    If we expand the limit claim, ∀ε>0,∃N(x,ω,ε), s.t. ∀n≥N(x,ω,ε), |F^n(x,ω)−F(x)|<ε. Here N depends on x, so is pointwise convergence.

One can obtain a stronger result:

Theorem (Glivenko-Cantelli)

Suppose X1,⋯,Xn∼i.i.dF. Then supx|F^n(x)−F(x)|→a.s.0. In other words P(limn→∞supx|F^n(x)−F(x)|=0)=1.

If we also expand it, ∀ε>0, ∃N(ω,ε) s.t. ∀n≥N(ω,ε), |F^n(x,ω)−F(x)|<ε,∀x∈R. Here N does not depend on x, so is uniform convergence.

The following proof and discussions are inserted after later notes. Readers can skip this part for now.

Define Dn=supx|F^n(x)−F(x)|.
So this theorem is equivalent to Dn→a.s.0. However today we only prove a weaker version: Dn→p0.

Lemma 1

X1,⋯,Xn∼F continuous. The distribution of Dn is the same for all continuous F.

2 Relation to Brownian Bridge Kernel

Recall Multivariate CLT: n([F^n(u1)⋮Fn^(uk)]−[u1⋮uk])=1n∑a=1n[1{Ua≤u1}⋮1{Ua≤uk}]→dNk(0→,Σ),
where Σ=(Σij)i,j=1,⋯,K with Σij=Cov(1{U≤ui},1{U≤uj})=E[1{U≤ui}1{U≤uj}]−E[1{U≤ui}]E[1{U≤uj}]=min{ui,uj}−uiuj.E[1{U≤ui}1{U≤uj}]=P(U≤ui,U≤uj)=min{ui,uj},E[1{U≤ui}]=P(U≤ui)=ui.
This is true for all k. So the RHS corresponds to a Gaussian process with the Brownian Bridge Kernel {Bbr(u),u∈(0,1)}.
Hence nDn=supu∈(0,1)n|F^n(u)−u|→dsupu∈(0,1)|Bbr(u)|.
We have another fact about Brownian bridge kernel:

Theorem (Kolomogorov-Smirnov)

P(supu∈(0,1)|Bbr(u)|>x)=2∑k=1∞(−1)k+1e−2k2x2.

The first term 2e−2x2 alone is very accurate.

So if n is large, P(Dn>xn)≈2e−2x2.
This can be used to find an asymptotic level −α confidence interval for estimating F(u) simultaneously for all u. 2e−2x2=u⇒x=12ln⁡2α,xn=12nln⁡2α.