_p_value#
- normtest.looney_gulledge._p_value(statistic, sample_size)[source]#
This function estimates the probability associated with the Looney-Gulledge Normality test [1].
- Parameters:
- statisticfloat (positive)
The test statistic;
- sample_sizeint
The sample size. Must be equal or greater than
4;
- Returns:
- p_valuefloat or str
The probability of the test;
See also
Notes
The test probability is estimated through linear interpolation of the test statistic with critical values from the Looney-Gulledge test [1]. The Interpolation is performed using the scipy.interpolate.interp1d() function.
If the test statistic is greater than the critical value for \(\alpha=0.995\), the result is always “p > 0.995”.
If the test statistic is lower than the critical value for \(\alpha=0.005\), the result is always “p < 0.005”.
Warning
The estimated \(p_{value}\) may not be accurate as it is calculated using linear interpolation
References
Examples
>>> from normtest import looney_gulledge >>> p_value = looney_gulledge._p_value(0.98538, 7) >>> print(p_value) 0.8883750000000009