Click or drag to resize

Univariate.SignTest Method

Tests whether the sample median is compatible with the given reference value.

Namespace:  Meta.Numerics.Statistics
Assembly:  Meta.Numerics (in Meta.Numerics.dll) Version: 4.1.4
Syntax
public static TestResult SignTest(
	this IReadOnlyCollection<double> sample,
	double referenceMedian
)

Parameters

sample
Type: System.Collections.Generic.IReadOnlyCollection<Double>
The sample.
referenceMedian
Type: System.Double
The reference median.

Return Value

Type: TestResult
A test result indicating whether the sample median is compatible with the given reference value.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IReadOnlyCollection<Double>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptionsample is null.
InsufficientDataExceptionsample is empty.
Remarks

The sign test is a non-parametric alternative to the Student t-test (StudentTTest(IReadOnlyCollection<Double>, Double)). It tests whether the sample is consistent with the given reference median.

The null hypothesis for the test is that the median of the underlying population from which the sample is drawn is the reference median. The test statistic is simply number of sample values that lie above the median. Since each sample value is equally likely to be below or above the population median, each draw is an independent Bernoulli trial, and the total number of values above the population median is distributed according to a binomial distribution (BinomialDistribution).

See Also