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¶
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:
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\):
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:
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:
| 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:
The fraction of the population actually captured follows a Beta distribution,
so the coverage that can be guaranteed at confidence \(C\) is the \(\alpha\)-quantile of that Beta distribution:
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:
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:
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:
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:
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¶
- Krishnamoorthy, K., and Mathew, T. (2009). Statistical Tolerance Regions: Theory, Applications, and Computation. Wiley.
- Hahn, G. J., Meeker, W. Q., and Escobar, L. A. (2017). Statistical Intervals: A Guide for Practitioners and Researchers, 2nd ed. Wiley.
- Wilks, S. S. (1941). Determination of sample sizes for setting tolerance limits. The Annals of Mathematical Statistics, 12(1), 91-96.
- 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.