Skip to content

Home / Statistical Tools / Analysis Tools / Tolerance Interval / Math Details

Math Details

This page gives the exact formulas Quantum XL uses to compute a tolerance interval. Each equation lists what it computes and where it appears in the output.

Notation

Term Description
\(n\) number of finite data values in the sample
\(P\) proportion of the population to capture (Percent of Population ÷ 100)
\(C\) confidence level as a fraction (Confidence Level ÷ 100)
\(\alpha\) \(1 - C\)
\(\bar{x}\) sample mean
\(s\) sample standard deviation (n − 1 denominator)
\(X_{(1)} \leq X_{(2)} \leq \cdots \leq X_{(n)}\) the sample sorted in ascending order (order statistics)
\(\Phi^{-1}\) quantile (inverse CDF) of the standard normal distribution
\(\varphi\) probability density of the standard normal distribution
\(z_P\) \(\Phi^{-1}(P)\), the \(P\)-quantile of the standard normal distribution

Sample statistics

\[ \bar{x} = \frac{1}{n}\sum_{i=1}^{n} x_i \qquad\qquad s = \sqrt{\frac{\sum_{i=1}^{n}\left(x_i - \bar{x}\right)^2}{n-1}} \]

Used by: the Mean and Std Dev rows of the statistics table, and the normal bounds below.

Normal method: one-sided tolerance factor

The one-sided factor has an exact closed form based on the noncentral t distribution:

\[ k_1 = \frac{t_{\,n-1,\ C}(\delta)}{\sqrt{n}} \qquad \text{with noncentrality} \quad \delta = z_P\,\sqrt{n} \]

where \(z_P = \Phi^{-1}(P)\) and \(t_{\,n-1,\ C}(\delta)\) is the \(C\)-quantile of the noncentral \(t\) distribution with \(n-1\) degrees of freedom and noncentrality parameter \(\delta\). The same \(k_1\) is used for the lower and upper one-sided bounds.

Used by: the one-sided normal bounds.

Normal method: two-sided tolerance factor

The two-sided factor \(k_2\) is computed exactly. It is the value at which the probability that the interval \(\bar{x} \pm k_2\, s\) captures at least the proportion \(P\) of the population equals the requested confidence \(C\):

\[ 2\int_{0}^{\infty} \left[\, 1 - F_{\chi^2_{n-1}}\!\left( \frac{(n-1)\;\chi^{2}_{1,\,P}\!\left(z^{2}/n\right)}{k_2^{\,2}} \right) \right]\varphi(z)\; dz \;=\; C \]

where:

  • \(\chi^{2}_{1,\,P}(\lambda)\) is the \(P\)-quantile of the noncentral chi-square distribution with 1 degree of freedom and noncentrality parameter \(\lambda\),
  • \(F_{\chi^2_{n-1}}\) is the CDF of the central chi-square distribution with \(n-1\) degrees of freedom, and
  • \(\varphi(z)\) is the standard normal density.

This equation has no closed-form solution for \(k_2\), so Quantum XL solves it numerically. The search starts from the Krishnamoorthy-Mathew approximation:

\[ k_2 \approx \sqrt{\frac{(n-1)\;\chi^{2}_{1,\,P}\!\left(1/n\right)}{\chi^{2}_{\,n-1,\ \alpha}}} \]

where \(\chi^{2}_{\,n-1,\ \alpha}\) is the \(\alpha\)-quantile of the central chi-square distribution with \(n-1\) degrees of freedom. The equation is then solved for \(k_2\) with a bracketing root finder.

Used by: the two-sided normal bounds.

Note

Because \(k_2\) is solved exactly, the two-sided normal interval attains the requested confidence \(C\) precisely, rather than approximately as with tabulated or approximated \(k\) factors.

Normal method: bounds

Interval type Bounds
Two-sided \(\left[\ \bar{x} - k_2\, s,\ \ \bar{x} + k_2\, s\ \right]\)
One-sided lower bound \(\left[\ \bar{x} - k_1\, s,\ \ \infty\ \right)\)
One-sided upper bound \(\left(\ -\infty,\ \ \bar{x} + k_1\, s\ \right]\)

Used by: the Normal Bounds rows of the statistics table.

Nonparametric method: one-sided bounds

Let \(Y \sim \mathrm{Bin}(n,\ 1-P)\). The bound uses the largest rank \(k \in \{1, \dots, n\}\) that still attains the requested confidence:

\[ \Pr\left(Y \geq k\right) \;=\; 1 - F_{\mathrm{Bin}(n,\,1-P)}(k-1) \;\geq\; C \]
Interval type Bound
One-sided lower bound \(L = X_{(k)}\)
One-sided upper bound \(U = X_{(n-k+1)}\)

The attained confidence of the returned bound is:

\[ C_{\text{attained}} \;=\; 1 - F_{\mathrm{Bin}(n,\,1-P)}(k-1) \]

The fraction of the population actually captured follows a Beta distribution,

\[ \text{coverage} \;\sim\; \mathrm{Beta}\left(n-k+1,\ k\right) \]

so the coverage that can be guaranteed at confidence \(C\) is the \(\alpha\)-quantile of that Beta distribution:

\[ P_{\text{guaranteed}} \;=\; F^{-1}_{\mathrm{Beta}(n-k+1,\ k)}(\alpha) \]

If no rank \(k\) satisfies the confidence requirement, the widest possible interval is returned (\(k = 1\): the bound is the sample minimum or maximum), and the attained confidence shows what that interval actually provides.

Used by: the one-sided Nonparametric Bounds and the Attained Confidence row.

Nonparametric method: two-sided bounds

Let \(V \sim \mathrm{Bin}(n,\ P)\). Note this uses \(P\), where the one-sided rule uses \(1-P\). The method finds the smallest span \(k \in \{1, \dots, n+1\}\) satisfying:

\[ F_{\mathrm{Bin}(n,\,P)}(k-1) \;\geq\; C \]

The interval returned is \(\left(X_{(r)},\ X_{(s)}\right)\), placed so that the \(n - 1 - k\) excluded order statistics are split as evenly as possible between the two tails, with the extra one (when the count is odd) removed from the upper tail:

\[ r = \left\lfloor \frac{n-1-k}{2} \right\rfloor + 1 \qquad\qquad s = n - \left\lceil \frac{n-1-k}{2} \right\rceil \]

This returns the tightest interval attaining the requested confidence, rather than a symmetric one. The attained confidence is computed from the width of the interval actually returned:

\[ C_{\text{attained}} \;=\; F_{\mathrm{Bin}(n,\,P)}\left((s - r) - 1\right) \]

The coverage of \(\left(X_{(r)}, X_{(s)}\right)\) follows \(\mathrm{Beta}\left(s-r,\ n-s+r+1\right)\), so the guaranteed coverage at confidence \(C\) is:

\[ P_{\text{guaranteed}} \;=\; F^{-1}_{\mathrm{Beta}(s-r,\ n-s+r+1)}(\alpha) \]

If even the full sample range cannot attain the requested confidence, the full range \(\left(X_{(1)},\ X_{(n)}\right)\) is returned and the attained confidence reports what that range truly achieves. For example, with \(n = 25\) at 95% coverage the full sample range attains only about 35.8% confidence.

Used by: the two-sided Nonparametric Bounds and the Attained Confidence row.

Goodness of fit (Anderson-Darling)

Quantum XL also reports an Anderson-Darling normality statistic and its p-value (defined in Anderson-Darling Test) as an advisory check on the normality assumption behind the normal method. This check is diagnostic only: Quantum XL always computes both the normal and nonparametric intervals, and the Anderson-Darling result does not select or gate either one. The normal probability plot shows the same check visually.

Used by: the Goodness of Fit rows of the statistics table.

See Also

References

  1. Krishnamoorthy, K., and Mathew, T. (2009). Statistical Tolerance Regions: Theory, Applications, and Computation. Wiley.
  2. Hahn, G. J., Meeker, W. Q., and Escobar, L. A. (2017). Statistical Intervals: A Guide for Practitioners and Researchers, 2nd ed. Wiley.
  3. Wilks, S. S. (1941). Determination of sample sizes for setting tolerance limits. The Annals of Mathematical Statistics, 12(1), 91-96.
  4. NIST/SEMATECH e-Handbook of Statistical Methods, sections on tolerance intervals for a normal distribution and tolerance intervals based on the largest and smallest observations.