Statistics.SignTest Method

Overload List

#SignatureDescription
1Double SignTest(TVec Data1, TVec Data2, ref THypothesisResult hRes, ref Double Signif, ref Double[] ConfInt, THypothesisType hType, Double Alpha)Performs paired Sign test. The routine tests the null hypothesis that Data1 and Data2 have equal median value.
2Double SignTest(TVec Data, Double Median, ref THypothesisResult hRes, ref Double Signif, ref Double[] ConfInt, THypothesisType hType, Double Alpha)One or two-sample Sign test.

Overload 1: Double SignTest(TVec Data1, TVec Data2, ref THypothesisResult hRes, ref Double Signif, ref Double[] ConfInt, THypothesisType hType, Double Alpha)

Performs paired Sign test. The routine tests the null hypothesis that Data1 and Data2 have equal median value.

#NameDescription
1Data1First set of data from which to compute the median.
2Data2Second set of data from which to compute the median.
3hResReturns the result of the null hypothesis (default assumption is that the means are equal).
4hTypeDefines the type of the null hypothesis (left, right and two - tailed).
5Signif(Significance level) returns the probability of observing the given result by chance given that the null hypothesis is true.
6ConfIntReturns the 100*(1-Alpha) percent confidence interval for the mean.
7AlphaDefines the desired significance level. If the significance probability (Signif) is bellow the desired significance (Alpha), the null hypothesis is rejected.

Returns: Double - The Sign test statistics.

Examples
using Dew.Math;
using Dew.Stats;
using Dew.Stats.Units;
namespace Dew.Examples
{
    private void Example()
    {
        Vector d1 = new Vector(0);
        Vector d2 = new Vector(0);
        d1.SetIt(false, new double[] {1,4,5,6,7,12});
        d2.SetIt(false, new double[] {3,3.5,2,3.1,10,9});
        double signif, SStat;
        double[] ci = new double[2];
        THypothesisResult hres;
        // don't use normal approximation
        SStat = Statistics.SignTest(d1,d2,out hres,out signif,out ci,THypothesisType.htTwoTailed,0.05);
    }
}
See Also: Statistics.WilcoxonSign

Overload 2: Double SignTest(TVec Data, Double Median, ref THypothesisResult hRes, ref Double Signif, ref Double[] ConfInt, THypothesisType hType, Double Alpha)

One or two-sample Sign test.

#NameTypeDescription
1DataTVecsource TVec
2MedianDoublescalar
3hResTHypothesisResult (ref)
4SignifDouble (ref)output
5ConfIntDouble[] (ref)
6hTypeTHypothesisType
7AlphaDoublescalar

Returns: Double

Remarks:

Performs one-sample Sign test by comparing Data median value with given Median. The null hypothesis is that Data median is equal to Median. Additional assumption is that underlying population is continuous.