_p_value#
- normtest.ryan_joiner._p_value(statistic, sample_size)[source]#
This function estimates the probability associated with the Ryan-Joiner 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 Ryan-Joiner 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.10\), the result is always “p > 0.100”.
If the test statistic is lower than the critical value for \(\alpha=0.01\), the result is always “p < 0.010”.
Warning
The estimated \(p_{value}\) may not be accurate as it is calculated using linear interpolation
References
[1] (1,2)RYAN, T. A., JOINER, B. L. Normal Probability Plots and Tests for Normality, Technical Report, Statistics Department, The Pennsylvania State University, 1976. Available at www.additive-net.de. Access on: 22 Jul. 2023.
Examples
>>> from normtest import ryan_joiner >>> p_value = ryan_joiner._p_value(0.90, 10) >>> print(p_value) 0.030930589077996555