Problem with the Chebyshev confidence interval
As mentioned by Carlo, we have σ2≤14. This follows from Var(X)≤μ(1−μ). Therefore a confidence interval for μ is given by
P(|X¯−μ|≥ε)≤14nε2.
The problem is that the inequality is, in a certain sense, quite loose when
n gets large. An improvement is given by Hoeffding's bound and shown below. However, we can also demonstrate how bad it can get using the
Berry-Esseen theorem, pointed out by Yves. Let
Xi have a variance
14, the worst possible case. The theorem implies that
P(|X¯−μ|≥ε2n√)≤2SF(ε)+8n√,
where
SF is the survival function of the standard normal distribution. In particular, with
ε=16, we get
SF(16)≈e−58 (according to Scipy), so that essentially
P(|X¯−μ|≥8n√)≤8n√+0,(∗)
whereas the Chebyshev inequality implies
P(|X¯−μ|≥8n√)≤1256.
Note that I did not try to optimize the bound given in
(∗), the result here is only of conceptual interest.
Comparing the lengths of the confidence intervals
Consider the (1−α)-level confidence interval lengths ℓZ(α,n) and ℓC(α,n) obtained using the normal approximation (σ=12) and the Chebyshev inequality, repectively. It turns out that ℓC(α,n) is a constant times bigger than ℓZ(α,n), independently of n. Precisely, for all n,
ℓC(α,n)=κ(α)ℓZ(α,n),κ(α)=(ISF(α2)α−−√)−1,
where
ISF is the inverse survival function of the standard normal distribution. I plot below the multiplicative constant.
In particular, the 95% level confidence interval obtained using the Chebyshev inequality is about 2.3 times bigger than the same level confidence interval obtained using the normal approximation.
Using Hoeffding's bound
Hoeffding's bound gives
P(|X¯−μ|≥ε)≤2e−2nε2.
Thus an
(1−α)-level confidence interval for
μ is
(X¯−ε,X¯+ε),ε=−lnα22n−−−−−−√,
of length
ℓH(α,n)=2ε. I plot below the lengths of the different confidence intervals (Chebyshev inequality:
ℓC; normal approximation (
σ=1/2):
ℓZ; Hoeffding's inequality:
ℓH) for
α=0.05.