gof_test
gof_test(x, d, test='ks')
Goodness-of-fit test statistic for a fitted distribution.
Parameters
| x |
array_like |
Numeric vector of observations. Sorted internally, as the C# methods require. |
required |
| d |
Distribution |
A fitted :class:~corehydropy.Distribution. |
required |
| test |
('ks', 'ad', 'chi_squared') |
"ks" (Kolmogorov-Smirnov D), "ad" (Anderson-Darling A squared), or "chi_squared". |
"ks" |
Examples
>>> from corehydropy import Distribution, gof_test
>>> x = [2.1, 3.4, 1.8, 4.9, 3.3, 2.7, 5.1, 3.9]
>>> gof_test(x, Distribution("Normal", [3.4, 1.1]), "ks") > 0
True