AndersonDarlingTest Constructor

Definition

Namespace: Extreme.Statistics.Tests
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

AndersonDarlingTest() Constructs a new Anderson-Darling test of normality.
AndersonDarlingTest(Vector<Double>) Constructs a new Anderson-Darling test of normality.
AndersonDarlingTest(Vector<Double>, ContinuousDistribution) Constructs a new Anderson-Darling test for the specified distribution.
AndersonDarlingTest(Vector<Double>, Func<Double, Double>) Constructs a new Anderson-Darling test for the specified distribution function.
AndersonDarlingTest(Vector<Double>, Double, Double) Constructs a new Anderson-Darling test of normality.

AndersonDarlingTest

Constructs a new Anderson-Darling test of normality.
C#
public AndersonDarlingTest()

AndersonDarlingTest(Vector<Double>)

Constructs a new Anderson-Darling test of normality.
C#
public AndersonDarlingTest(
	Vector<double> sample
)

Parameters

sample  Vector<Double>
A vector.

Remarks

The Anderson-Darling test works on any sample. The sample does not have to be normalized, for example.

AndersonDarlingTest(Vector<Double>, ContinuousDistribution)

Constructs a new Anderson-Darling test for the specified distribution.
C#
public AndersonDarlingTest(
	Vector<double> sample,
	ContinuousDistribution distributionType
)

Parameters

sample  Vector<Double>
A vector.
distributionType  ContinuousDistribution
The Type of the reference distribution.

Remarks

The Anderson-Darling test works on any sample. The sample does not have to be normalized.

Some distributions have specialized equations for computing p-values: NormalDistribution, LognormalDistribution, ExponentialDistribution, GumbelDistribution (largest value only), LogisticDistribution.

Note that for these types of reference distributions, the test will return results that are different from an Anderson-Darling test created using the distribution's cumulative distribution function (CDF) directly. This is because the algorithm used to compute the p-values for the Anderson-Darling distribution is different.

For other distributions, the cumulative distribution function is fitted directly.

AndersonDarlingTest(Vector<Double>, Func<Double, Double>)

Constructs a new Anderson-Darling test for the specified distribution function.
C#
public AndersonDarlingTest(
	Vector<double> sample,
	Func<double, double> cdf
)

Parameters

sample  Vector<Double>
A vector.
cdf  Func<Double, Double>
A function that evaluates the cumulative distribution function (CD) of the reference distribution.

Remarks

This algorithm is based on a method by Marsaglia for computing the distribution function of the Anderson-Darling statistic for a uniform distribution.

Note that for some types of reference distributions, this method will return results that are different from an Anderson-Darling test created using the specific distribution object instead of its distribution function.

AndersonDarlingTest(Vector<Double>, Double, Double)

Constructs a new Anderson-Darling test of normality.
C#
public AndersonDarlingTest(
	Vector<double> sample,
	double mean,
	double standardDeviation
)

Parameters

sample  Vector<Double>
A vector.
mean  Double
The mean of the normal distribution to test against.
standardDeviation  Double
The standard deviation of the normal distribution to test against.

Remarks

Use this constructor to create an AndersonDarlingTest object that can be used to test whether a sample follows a specific normal distribution.

Exceptions

ArgumentOutOfRangeExceptionstandardDeviation is less than or equal to zero.

See Also