kFactorPooled¶
- kFactorPooled(n, m, p, alpha)¶
Exact margin factor for bilateral covering interval of pooled Normal samples.
- Parameters:
- nint
The size of the sample.
- mint
The size of the pool.
- pfloat
The probability level of the covering interval.
- alphafloat
The confidence level of the covering interval.
- Returns:
- kfloat
The margin factor
Notes
This method allows one to compute the exact margin factor
of a pool of
Normal samples of size
with unknown means
and unknown common variance
. This implements the standard NF ISO 16269-6. Let
be the empirical mean of the ith sample
and
the empirical pooled variance. The covering factor
is such that the intervals
satisfy:
for
. It reduces to find
such that:
where
is the density function of the normal distribution with a mean equals to 0 and a variance equals to
,
and
the function defined by:
where
is the complementary distribution function of a chi-square distribution with
degrees of freedom and
the solution of:
The following
ResourceMapkeys are used:KFactor-Precision(Scalar, default:1e-08): precision of the zero-finding algorithm used to compute the tolerance factor,KFactor-DefaultIntegrationNodesNumber(UnsignedInteger, default:256): number of nodes of the Gauss-Kronrod integration rule used to compute the tolerance factor,KFactor-RMax(Scalar, default:8.5): upper bound of the bracketing interval explored by the zero-finding algorithm to compute the tolerance factor,KFactor-MaximumIteration(UnsignedInteger, default:32): maximum number of iterations of the zero-finding algorithm.
Examples
>>> import openturns as ot >>> k = ot.DistFunc.kFactorPooled(5, 3, 0.95, 0.9)
OpenTURNS