Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ADErrFix ¶
ADErrFix provides a correction term that de-resolves an infinite AD distribution (or at least the approximation we use) down to a resolution of N. Takes a sample size N and an AD p-value p as inputs.
Returns 0 if N <= 0, or if p is not a value between 0 and 1.
func ADPValue ¶
ADPValue computes and returns the p-value of the given a-statistic. Returns -1 and error if the z-statistic is 0 or less.
This computation uses the adinf(z) approximation in Marsaglia & Marsaglia [1]. The approximation is split into two regimes based on whether or not the test statistic z >= 2.
func ADStatistic ¶
ADStatistic computes the a-statistic of the given sample. Currently only supports normal distributions. Returns an error on an empty sample.
func AndersonDarlingTest ¶
AndersonDarlingTest takes a sample of floating-point numbers and performs the Anderson-Darling test for numerical distribution. It returns a p-value of the resulting test statistic, with a high p-value (>= 0.95, conventionally) indicating that the null hypothesis of a normal distribution can be rejected.
Returns a negative p-value and an error if the sample is empty.
This method of computing the Anderson-Darling test uses the approximation from: [1] Marsaglia, John & Marsaglia, George. (2004). Evaluating the Anderson-Darling Distribution. Journal of Statistical Software. 09. 10.18637/jss.v009.i02.
Types ¶
This section is empty.