DistFunc_kFactorPooled(n, m, p, alpha)

Exact margin factor for bilateral covering interval of pooled Normal populations.


The size of the population


The size of the pool

pfloat 0<p<1

The probability level of the covering interval

alphafloat 0<\alpha<1

The confidence level of the covering interval


The margin factor


This method allows to compute the exact margin factor k of a pool of m Normal populations of size n with unknown means \mu_i and unknown common variance \sigma^2. Let m_i=\dfrac{1}{n}\sum_{j=1}^nX_{ij} be the empirical mean of the ith population (X_{i1},\dots,X_{in}) and \sigma^2_{mn}=\dfrac{}{}\sum_{i=1}^m\sum_{j=1}^n(X_{ij}-m_i)^2 the empirical pooled variance. The covering factor k is such that the intervals [m_i-k\sigma_{mn},m_i+k\sigma_{mn}] satisfy:

\Prob{\Prob{X_i\in[m_i-k\sigma_{mn},m_i+k\sigma_{mn}]}\geq p}=\alpha

for i\in\{1,\dots,m\}. It reduces to find k such that:

\int_{\Rset}F(x,k;\nu_{m,n},p)\phi_{0,1/\sqrt{n}}(x)\,\di x = \alpha

where phi_{0,1/\sqrt{n}} is the density function of the normal distribution with a mean equals to 0 and a variance equals to 1/n, \nu_{m,n}=m(n-1) and F(x,k;\nu_{m,n},p) the function defined by:

F(x,k;\nu_{m,n},p)=\bar{F}_{\chi^2_{\nu_{m,n}}}(\nu_{m,n} R^2(x;p)/k^2)

where \bar{F}_{\chi^2_{\nu_{m,n}}} is the complementary distribution function of a chi-square distribution with \nu_{m,n} degrees of freedom and R(x;p) the solution of:

\Phi(x + R) - \Phi(x - R) = p


>>> import openturns as ot
>>> k = ot.DistFunc.kFactorPooled(5, 3, 0.95, 0.9)