gov.sandia.cognition.statistics.method
Class WilcoxonSignedRankConfidence

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.statistics.method.WilcoxonSignedRankConfidence
All Implemented Interfaces:
NullHypothesisEvaluator<Collection<? extends Number>>, CloneableSerializable, Serializable, Cloneable

@ConfidenceTestAssumptions(name="Wilcoxon Signed-Rank Sum Test",
                           alsoKnownAs="Wilcoxon signed-rank test",
                           description={"A nonparameteric statistical hypothesis test for the case of two related samples or repeated measurements on a single sample.","Wilcoxon Signed-Rank Sum Test does not assume that the data are generated according to a particular distribution.","Used as an alternative to a paired Student-t test when the data are not assumed to be Gaussian."},
                           assumptions={"The differences between paired samples are independent.","Each difference comes from a continuous population, identical for all differences, and is symmetric about a common median.","The data are oridinal variables such that comparisons such as greater than, less than, and equal to have meaning."},
                           nullHypothesis="The median difference between the paired samples is 0.0",
                           dataPaired=true,
                           dataSameSize=true,
                           distribution=UnivariateGaussian.CDF.class,
                           reference=@PublicationReference(author="Wikipedia",title="Wilcoxon signed-rank test",type=WebPage,year=2009,url="http://en.wikipedia.org/wiki/Wilcoxon_signed-rank_test"))
public class WilcoxonSignedRankConfidence
extends AbstractCloneableSerializable
implements NullHypothesisEvaluator<Collection<? extends Number>>

This is a Wilcoxon Signed-Rank Sum test, which performs a pair-wise test to determine if two datasets are different.

Since:
2.0
Author:
Kevin R. Dixon
See Also:
Serialized Form

Nested Class Summary
static class WilcoxonSignedRankConfidence.Statistic
          ConfidenceStatistics associated with a Wilcoxon test
 
Field Summary
static WilcoxonSignedRankConfidence INSTANCE
          Default instance since the class has no state.
 
Constructor Summary
WilcoxonSignedRankConfidence()
          Creates a new instance of WilcoxonSignedRankConfidence
 
Method Summary
 WilcoxonSignedRankConfidence.Statistic evaluateNullHypothesis(Collection<? extends Number> data1, Collection<? extends Number> data2)
          Computes the probability that two data were generated by the same distribution.
static double[] ranks(Collection<? extends Number> values)
          Returns the ranks of the values in ascending order
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 

Field Detail

INSTANCE

public static final WilcoxonSignedRankConfidence INSTANCE
Default instance since the class has no state.

Constructor Detail

WilcoxonSignedRankConfidence

public WilcoxonSignedRankConfidence()
Creates a new instance of WilcoxonSignedRankConfidence

Method Detail

evaluateNullHypothesis

public WilcoxonSignedRankConfidence.Statistic evaluateNullHypothesis(Collection<? extends Number> data1,
                                                                     Collection<? extends Number> data2)
Description copied from interface: NullHypothesisEvaluator
Computes the probability that two data were generated by the same distribution. NullHypothesisProbability=1 means that the distributions are likely the same, NullHypothesisProbability=0 means they are likely NOT the same, and NullHypothesisProbability less than 0.05 is the standard statistical significance test. This is the "p-value" that social scientists like to use.

Specified by:
evaluateNullHypothesis in interface NullHypothesisEvaluator<Collection<? extends Number>>
Parameters:
data1 - First dataset to consider
data2 - Second dataset to consider
Returns:
Probability that the two data were generated by the same source. A value of NullHypothesisProbability less than 0.05 is the standard point at which social scientists say two distributions were generated by different sources.

ranks

public static double[] ranks(Collection<? extends Number> values)
Returns the ranks of the values in ascending order

Parameters:
values - Collection of values to rank
Returns:
Ranks of the indices of the values