Institute of Measurement Science SAS - ToleranceFactor computes the exact tolerance factor for the two-sided tolerance interval


Updated 5 Apr 2022

View License

ToleranceFactor computes the exact tolerance factor k for the two-sided (optionally for the one-sided) p-content and (1-alpha)-confidence tolerance interval TI = [Xmean - k * S, Xmean + k * S], where Xmean = mean(X), S = std(X), X = [X_1,...,X_n] is a random sample of size n from the distribution N(mu,sig2) with unknown mean mu and variance sig2.
The tolerance factor k is determined such that the tolerance intervals with the confidence (1-alpha) cover at least the fraction p ('coverage') of the distribution N(mu,sigma^2), i.e.
Prob[ Prob( Xmean - k * S < X < Xmean + k * S ) >= p ]= 1-alpha, for X ~ N(mu,sig2) which is independent with Xmean and S.
k = ToleranceFactor(n,coverage,confidence)
k = ToleranceFactor(n,coverage,confidence,m,nu,d2,options)
k = ToleranceFactor(n,coverage,confidence,[],[],[],options)
Krishnamoorthy K, Mathew T. (2009). Statistical Tolerance Regions: Theory, Applications, and Computation. John Wiley & Sons, Inc., Hoboken, New Jersey. ISBN: 978-0-470-38026-0, 512 pages.
Witkovsky V. On the exact two-sided tolerance intervals for univariate normal distribution and linear regression. Austrian Journal of Statistics 43(4), 2014, 279-92. http://
ISO 16269-6:2013: Statistical interpretation of data - Part 6: Determination of statistical tolerance intervals.

Cite As

Viktor Witkovsky (2023). ToleranceFactor (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2017b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Time Series in Help Center and MATLAB Answers

Inspired by: NCTCDFVW

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

Corrected nctcdfVW and renaming of the ISO tables

Corrected parameter checking in ToleranceFactorGK

Institute of Measurement Science SAS included in Summary

ToleranceFactor ver. 2.0 of is polished for MATLAB 9.3 (R2017b)

ToleranceFactorGK uses adaptive Gauss-Kronod quadrature. Moreover, allows computing tolerance factor for simultaneou tolerance intervals, based on sample from m populations with common sample size n.


Fisrst revision, 2009-05-17