# The Probability That a Measurement Falls within a Range ofn Standard Deviations from an Estimate of the Mean

Authors: Louis M. Houston
Journal: ISRN Applied Mathematics
 (2012)

---

## Abstract

We derive a general equation for the probability that a measurement falls within a range ofn standard deviations from an estimate of the mean. So, we provide a format that is compatible with a confidence interval centered about the mean that is naturally independent of the sample size. The equation is derived by interpolating theoretical results for extreme sample sizes. The intermediate value of the equation is confirmed with a computational test.


---

## Body

## 1. Introduction

A confidence interval is an interval in which a measurement or trial falls corresponding to a given probability [1, 2]. In statistics, confidence intervals centered about an estimate of the mean target the mean [1]. Because these confidence intervals rely on the standard error of the estimate, they increase as sample size decreases and they decrease as sample size increases. Consequently, the confidence interval, in statistics, is often a margin of error for the estimate of the mean [3].We are interested in finding the probability of a confidence interval centered about an estimate of the mean that targets an arbitrary measurement and is independent of the sample size. In this way, we provide a format that is compatible with a confidence interval centered about the mean that is naturally independent of sample size, but has a width ofn standard deviations. We approach this problem by considering the known case of a confidence interval centered about the mean and we derive the associated probability. We correlate this result to the case of infinite sample size. The next step is to calculate the probability associated with the minimum sample size of one. This requires that we average the probability over different possible sample values. Finally, we propose an equation for probability that naturally interpolates our results and we show that the equation is consistent with intermediate probability values by comparing the equation to estimates of probability produced by computer simulation.


## 2. Expected Probability

In order to make the necessary confidence interval calculations, we will have to determine an expected or average probability. This can be examined by considering the cumulative distribution function [4, 5],
(2.1)F(x;μ,σ2)=12πσ∫-∞xe-(t-μ)2/2σ2dt,
where x is a measurement, μ is the mean, and σ is the standard deviation.Letv=(t-μ)/2σ. So, dv=dt/2σ. Therefore, (2.1) becomes
(2.2)F(x;μ,σ2)=1π∫-∞(x-μ)/2σe-v2dv=1π∫-∞0e-v2dv+1π∫-∞(x-μ)/2σe-v2dv=12+12erf(x-μ2σ),
where erf(x) is the so-called erf function [6, 7].Now, we know that(2.3)F(x;μ,σ2)=P(X≤x).
Rather than specifying a value of x, we would like to compute the probability averaged over all possible values of x. So we have
(2.4)E(F(x;μ,σ2))=E(P(X≤x)).
This yields
(2.5)E(F(x;μ,σ2))=12πσ∫-∞∞12e-(x-μ)2/2σ2dx+12πσ∫-∞∞12erf(x-μ2σ)e-(x-μ)2/2σ2dx(2.6)=12+12πσ∫-∞∞12erf(x-μ2σ)e-(x-μ)2/2σ2dx.
Let z=(x-μ)/2σ. So, dz=dx/2σ. Therefore, (2.6) becomes
(2.7)E(F(x;μ,σ2))=12+12π∫-∞∞erf(z)e-z2dz.
Since erf(z) is an odd function, we have
(2.8)E(F(x;μ,σ2))=12.
This can be easily confirmed by an alternative calculation. The probability density f(x) is
(2.9)f(x)=12πσe-(x-μ)2/2σ2.
Therefore, we can write [8]
(2.10)f=dFdx.
The expected value [9] of the cumulative distribution function is thus
(2.11)E(F)=∫-∞∞Ffdx.
Note that when x→∞, F=1 and when x→-∞, F=0. Therefore, we can write
(2.12)E(F)=∫01FdF=12.
Consequently, as per (2.4), we can write the expected probability as
(2.13)E(P(X≤x))=12.


## 3. The Probability of a Confidence Interval

We want to determine the probability given as(3.1)P(x--nσ≤x≤x-+nσ),
where
(3.2)x-=1N∑i=1Nxi
is the estimate of the mean, μ. At the maximal value of N, we find that
(3.3)limN→∞1N∑i=1Nxi≈μ.
For a normal distribution, the probability that a measurement falls within n standard deviations (nσ) of the mean μ (i.e., within the interval [μ-nσ,μ+nσ]) is given by
(3.4)P(μ-nσ≤x≤μ+nσ)=1σ2π∫μ-nσμ+nσe-(x-μ)2/(2σ2)dx=2σ2π∫μμ+nσe-(x-μ)2/(2σ2)dx.
Now, let u=(x-μ)/2σ, so du=dx/2σ.  Then
(3.5)P(μ-nσ≤x≤μ+nσ)=2σ2π2σ∫0n/2e-u2du(3.6)=2π∫0n/2e-u2du(3.7)=erf(n2).
Observe that we can express (3.7) in terms of the cumulative probability distribution function F. Thus, we can write
(3.8)P(μ-nσ≤x≤μ+nσ)=F(μ+nσ;μ,σ2)-F(μ-nσ;μ,σ2).
The minimal value of N is one, so that x-=x1.In this case, we have(3.9)P(x1-nσ≤x≤x1+nσ)=F(x1+nσ;μ,σ2)-F(x1-nσ;μ,σ2).
We find that (3.9) reduces into
(3.10)P(x1-nσ≤x≤x1+nσ)=12erf(x1+nσ-μσ2)+12erf(nσ+μ-x1σ2).
The probability in (3.10) is written in terms of the value x1. Consequently, we can derive an expected probability by computing
(3.11)Ex1(P)=1σ2π∫-∞∞[12erf(x1+nσ-μσ2)+12erf(nσ+μ-x1σ2)]e-(x1-μ)2/2σ2dx1(3.12)=1σ2π∫-∞∞[12erf((x1-μ)σ2+n2)+12erf(n2-(x1-μ)σ2)]e-(x1-μ)2/2σ2dx1.
Let z=(x1-μ)/σ2 which implies that dz=dx1/σ2. This reduces (3.12) into
(3.13)Ex1(P)=1π∫-∞∞[12erf(z+n2)+12erf(n2-z)]e-z2dz(3.14)=1π∫-∞∞erf(z+n2)e-z2dz.
Equation (3.14) can be evaluated numerically to yield the following:
(3.15)Ex1(P(x1-nσ≤x≤x1+nσ))=erf(n2).
A portion of the numerical results is presented in Table 1.Table 1
Comparisons of numerical integration of(1/π)∫-∞∞erf(z+(n/2))e-z2dz  and erf(n/2).
n
(
1
/
π
)
∫
-
∞
∞
erf
(
z
+
n
/
2
)
e
-
z
2
d
z
erf
(
n
/
2
)
0
.
5
0.2763
0.2763
1.5
0.7112
0.7112
2.5
0.9229
0.9229
3.5
0.9867
0.9867
4.5
0.9985
0.9985Based on (3.7) and (3.15), we can propose the equation
(3.16)P(x--nσ≤x≤x-+nσ)=erf(n221/N),
in which we are by default referring to the expected probability.Equation (3.16) clearly converges for the extreme estimates of the mean, since
(3.17)limN→∞erf(n221/N)=erf(n2),limN→1erf(n221/N)=erf(n2).
A plot of (3.16) for four values of N is shown in Figure 1. Observe that the curve for N=2 is intermediate to the other curves.  Consequently, we can have confidence in (3.16) if we can show that it is valid for N=2.Figure 1
A plot of the equationP(x--nσ≤x≤x-+nσ)=erf(n/221/N) for four different values of N.


## 4. Computational Test

We can estimateP(x--nσ≤x≤x-+nσ) computationally. Simulate the normal, independent random variables X and {Xi}, for which
(4.1)x∈X,xi∈Xi.
Let the condition β be
(4.2)β:(x--nσ≤x≤x-+nσ).
If  M(β) is the number of trials in which the condition β is met and M is the total number of trials, then an estimate of P is given as
(4.3)P-=M(β)M.
Figure 2 shows a plot of  P- versus P for N=2 and M=2000.Figure 2
A plot ofP- versus P for N=2 and M=2000.


## 5. Conclusions

We derive a general equation for the probability that a measurement falls within a range ofn standard deviations from an estimate of the mean. So, we provide a format that is compatible with a confidence interval centered about the mean that is naturally independent of the sample size. It is consistent with our equation that probability reduces with sample size. However, for samples greater than ten, the value of probability begins to converge. The equation for probability is derived by considering the minimal and maximal sample sizes and producing an equation which naturally interpolates the results. Computer simulation is used to estimate probability for the sample size N=2 that produces intermediate results that are in strong agreement with the general equation.



---

*Source: 710806-2012-12-18.xml*