_statistic#
- normtest.filliben._statistic(x_data, zi)[source]#
This function estimates the statistic of the Filliben normality test [1]
- Parameters:
- x_datanumpy array
One dimension numpy array with at least
4observations.- zinumpy array
The statistical order in the standard Normal distribution scale.
- Returns:
- statistic
The test statistic;
See also
Notes
The test statistic (\(F_{p}\)) is estimated through the correlation between the ordered data and the Normal statistical order:
\[F_p = \frac{\sum_{i=1}^n \left(x_i - \overline{x}\right) \left(z_i - \overline{z}\right)}{\sqrt{\sum_{i=1}^n \left( x_i - \overline{x}\right)^2 \sum_{i=1}^n \left( z_i - \overline{z}\right)^2}}\]where \(z_{i}\) values are the z-score values of the corresponding experimental data (\(x_{{i}}\)) value, and \(n\) is the sample size.
The correlation is estimated using scipy.stats.pearsonr().
References
[1]FILLIBEN, J. J. The Probability Plot Correlation Coefficient Test for Normality. Technometrics, v. 17, n. 1, p. 111-117, 1975.
Examples
>>> from normtest import filliben >>> import numpy as np >>> x_data = np.array([6, 1, -4, 8, -2, 5, 0]) >>> uniform_order = filliben._uniform_order_medians(x_data.size) >>> normal_order = filliben._normal_order_medians(uniform_order) >>> x_data = np.sort(x_data) >>> statistic = filliben._statistic(x_data, normal_order) >>> print(statistic) 0.9854095718708367