WilcoxonSignedRankTest Class 
Namespace: Accord.Statistics.Testing
The WilcoxonSignedRankTest type exposes the following members.
Name  Description  

WilcoxonSignedRankTest 
Tests the null hypothesis that the sample median is equal to a hypothesized value.

Name  Description  

CriticalValue 
Gets the critical value for the current significance level.
(Inherited from HypothesisTestTDistribution.)  
Delta 
Gets the differences between the samples.
(Inherited from WilcoxonTest.)  
Hypothesis 
Gets the alternative hypothesis under test. If the test is
Significant, the null hypothesis can be rejected
in favor of this alternative hypothesis.
 
NumberOfSamples 
Gets the number of samples being tested.
(Inherited from WilcoxonTest.)  
PValue 
Gets the Pvalue associated with this test.
(Inherited from HypothesisTestTDistribution.)  
Ranks 
Gets the rank statistics for the differences.
(Inherited from WilcoxonTest.)  
Significant 
Gets whether the null hypothesis should be rejected.
(Inherited from HypothesisTestTDistribution.)  
Signs 
Gets the signs for each of the Delta differences.
(Inherited from WilcoxonTest.)  
Size 
Gets the significance level for the
test. Default value is 0.05 (5%).
(Inherited from HypothesisTestTDistribution.)  
Statistic 
Gets the test statistic.
(Inherited from HypothesisTestTDistribution.)  
StatisticDistribution 
Gets the distribution associated
with the test statistic.
(Inherited from HypothesisTestTDistribution.)  
Tail 
Gets the test type.
(Inherited from HypothesisTestTDistribution.) 
Name  Description  

Compute(Double, Double, DistributionTail, NullableBoolean) 
Computes the Wilcoxon SignedRank test.
(Inherited from WilcoxonTest.)  
Compute(Int32, Double, DistributionTail, NullableBoolean, Boolean) 
Computes the Wilcoxon SignedRank test.
(Inherited from WilcoxonTest.)  
Equals  Determines whether the specified object is equal to the current object. (Inherited from Object.)  
Finalize  Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)  
GetHashCode  Serves as the default hash function. (Inherited from Object.)  
GetType  Gets the Type of the current instance. (Inherited from Object.)  
MemberwiseClone  Creates a shallow copy of the current Object. (Inherited from Object.)  
OnSizeChanged 
Called whenever the test significance level changes.
(Inherited from HypothesisTestTDistribution.)  
PValueToStatistic 
Converts a given pvalue to a test statistic.
(Inherited from WilcoxonTest.)  
StatisticToPValue 
Converts a given test statistic to a pvalue.
(Inherited from WilcoxonTest.)  
ToString 
Converts the numeric PValue of this test to its equivalent string representation.
(Inherited from HypothesisTestTDistribution.)  
ToString(String, IFormatProvider) 
Converts the numeric PValue of this test to its equivalent string representation.
(Inherited from HypothesisTestTDistribution.) 
Name  Description  

HasMethod 
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)  
IsEqual  Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices. (Defined by Matrix.)  
ToT  Overloaded.
Converts an object into another type, irrespective of whether
the conversion can be done at compile time or not. This can be
used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)  
ToT  Overloaded.
Converts an object into another type, irrespective of whether
the conversion can be done at compile time or not. This can be
used to convert generic types to numeric types during runtime.
(Defined by Matrix.) 
The Wilcoxon signedrank test is a nonparametric statistical hypothesis test used when comparing two related samples, matched samples, or repeated measurements on a single sample to assess whether their population mean ranks differ (i.e. it is a paired difference test). It can be used as an alternative to the paired Student's ttest, ttest for matched pairs, or the ttest for dependent samples when the population cannot be assumed to be normally distributed.
The Wilcoxon signedrank test is not the same as the Wilcoxon ranksum test, although both are nonparametric and involve summation of ranks.
This test uses the positive W statistic, as explained in https://onlinecourses.science.psu.edu/stat414/node/319
References:
// This example has been adapted from the Wikipedia's page about // the ZTest, available from: http://en.wikipedia.org/wiki/Ztest // We would like to check whether a sample of 20 // students with a median score of 96 points ... double[] sample = { 106, 115, 96, 88, 91, 88, 81, 104, 99, 68, 104, 100, 77, 98, 96, 104, 82, 94, 72, 96 }; // ... could have happened just by chance inside a // population with an hypothesized median of 100 points. double hypothesizedMedian = 100; // So we start by creating the test: WilcoxonSignedRankTest test = new WilcoxonSignedRankTest(sample, hypothesizedMedian, OneSampleHypothesis.ValueIsSmallerThanHypothesis); // Now, we can check whether this result would be // unlikely under a standard significance level: bool significant = test.Significant; // false (so the event was likely) // We can also check the test statistic and its PValue double statistic = test.Statistic; // 40.0 double pvalue = test.PValue; // 0.98585347446367344