Anderson-Darling test for a standard normal distribution.
(x)
| 90 | |
| 91 | |
| 92 | def anderson_darling(x): |
| 93 | """Anderson-Darling test for a standard normal distribution.""" |
| 94 | x = np.sort(np.ravel(x)) |
| 95 | n = len(x) |
| 96 | i = np.linspace(1, n, n) |
| 97 | z = np.sum((2 * i - 1) * np.log(normal_cdf(x)) + |
| 98 | (2 * (n - i) + 1) * np.log(1 - normal_cdf(x))) |
| 99 | return -n - z / n |
| 100 | |
| 101 | |
| 102 | def test_truncated_normal(assert_equal, assert_all_close, n, y, |
nothing calls this directly
no test coverage detected