gov.sandia.cognition.statistics.method
Class FriedmanConfidence

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

@ConfidenceTestAssumptions(name="Friedman\'s test",
                           alsoKnownAs="",
                           description={"Friedman\'s test determines if the rankings associated with various treatments are equal.","This is a nonparametric rank-based alternative to ANOVA, a multiple comparison generalization similar to the difference between Student\'s t-test and Wilcoxon rank-signed test.","Friedman\'s test tends to have as much power as ANOVA, but without ANOVA\'s parameteric assumptions"},
                           assumptions={"All data came from same distribution, without considering treatment effects.","Measurements are independent and equivalent within a treatment.","All observations are independent."},
                           nullHypothesis="The treatments have no effect on experimental observations.",
                           dataPaired=true,
                           dataSameSize=true,
                           distribution=SnedecorFDistribution.class,
                           reference={@PublicationReference(author="Janez Demsar",title="Statistical Comparisons of Classifiers over Multiple Data Sets",type=Journal,publication="Journal of Machine Learning Research",year=2006,url="http://www.jmlr.org/papers/volume7/demsar06a/demsar06a.pdf"),@PublicationReference(author="Wikipedia",title="Friedman test",type=WebPage,year=2011,url="http://en.wikipedia.org/wiki/Friedman_test",notes="Our test uses the tighter F-statistic rather than the original chi-square statistic")})
public class FriedmanConfidence
extends AbstractCloneableSerializable
implements BlockExperimentComparison<Number>

The Friedman test determines if the rankings associated with various treatments are equal. This is a nonparametric alternative to ANOVA.

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

Nested Class Summary
static class FriedmanConfidence.Statistic
          Confidence statistic associated with the Friedman test using the tighter F-statistic.
 
Field Summary
static FriedmanConfidence INSTANCE
          Default instance.
 
Constructor Summary
FriedmanConfidence()
          Creates a new instance of FriedmanConfidence
 
Method Summary
static ArrayList<Double> computeTreatmentRankMeans(Collection<? extends Collection<? extends Number>> data)
          Computes the mean rank of the treatments
 FriedmanConfidence.Statistic evaluateNullHypothesis(Collection<? extends Collection<? extends Number>> data)
          Evaluates the null hypothesis for the given block-design treatments
 FriedmanConfidence.Statistic evaluateNullHypothesis(Collection<? extends Number> data1, Collection<? extends Number> data2)
          Computes the probability that two data were generated by the same distribution.
 
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 FriedmanConfidence INSTANCE
Default instance.

Constructor Detail

FriedmanConfidence

public FriedmanConfidence()
Creates a new instance of FriedmanConfidence

Method Detail

evaluateNullHypothesis

public FriedmanConfidence.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.

evaluateNullHypothesis

public FriedmanConfidence.Statistic evaluateNullHypothesis(Collection<? extends Collection<? extends Number>> data)
Description copied from interface: BlockExperimentComparison
Evaluates the null hypothesis for the given block-design treatments

Specified by:
evaluateNullHypothesis in interface BlockExperimentComparison<Number>
Parameters:
data - Collection of treatments for the block-design experiment, where each treatment contains
Returns:
The confidence for the null hypothesis.

computeTreatmentRankMeans

public static ArrayList<Double> computeTreatmentRankMeans(Collection<? extends Collection<? extends Number>> data)
Computes the mean rank of the treatments

Parameters:
data - Collection of treatments, where each treatment must have the same number of subjects in each treatment
Returns:
An mean rank for each of the treatments