gov.sandia.cognition.statistics.method
Class FriedmanConfidence.Statistic

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.statistics.method.AbstractConfidenceStatistic
          extended by gov.sandia.cognition.statistics.method.FriedmanConfidence.Statistic
All Implemented Interfaces:
ConfidenceStatistic, CloneableSerializable, Serializable, Cloneable
Enclosing class:
FriedmanConfidence

public static class FriedmanConfidence.Statistic
extends AbstractConfidenceStatistic

Confidence statistic associated with the Friedman test using the tighter F-statistic.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class gov.sandia.cognition.statistics.method.AbstractConfidenceStatistic
nullHypothesisProbability
 
Constructor Summary
  FriedmanConfidence.Statistic(int treatmentCount, int subjectCount, ArrayList<Double> treatmentRankMeans)
          Creates a new instance of Statistic
protected FriedmanConfidence.Statistic(int treatmentCount, int subjectCount, ArrayList<Double> treatmentRankMeans, double chiSquare)
          Creates a new instance of Statistic
protected FriedmanConfidence.Statistic(int treatmentCount, int subjectCount, ArrayList<Double> treatmentRankMeans, double chiSquare, double F)
          Creates a new instance of Statistic
 
Method Summary
 FriedmanConfidence.Statistic clone()
          This makes public the clone method on the Object class and removes the exception that it throws.
protected static double computeChiSquare(int treatmentCount, int subjectCount, ArrayList<Double> treatmentRankMeans)
          Computes the chi-square error for the rank means
 double getChiSquare()
          Getter for chiSquare
 double getChiSquareNullHypothesisProbability()
          Getter for chiSquareNullHypothesisProbability
 double getDegreesOfFreedom()
          Getter for degreesOfFreedom
 double getF()
          Getter for F.
 int getSubjectCount()
          Getter for subjectCount
 double getTestStatistic()
          Gets the statistic from which we compute the null-hypothesis probability.
 int getTreatmentCount()
          Getter for treatmentCount
 ArrayList<Double> getTreatmentRankMeans()
          Getter for treatmentRankMeans
 
Methods inherited from class gov.sandia.cognition.statistics.method.AbstractConfidenceStatistic
getNullHypothesisProbability, setNullHypothesisProbability, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FriedmanConfidence.Statistic

public FriedmanConfidence.Statistic(int treatmentCount,
                                    int subjectCount,
                                    ArrayList<Double> treatmentRankMeans)
Creates a new instance of Statistic

Parameters:
treatmentCount - Number of treatments in the experiment
subjectCount - Number of subjects in the experiment
treatmentRankMeans - Mean rank for each treatment

FriedmanConfidence.Statistic

protected FriedmanConfidence.Statistic(int treatmentCount,
                                       int subjectCount,
                                       ArrayList<Double> treatmentRankMeans,
                                       double chiSquare)
Creates a new instance of Statistic

Parameters:
treatmentCount - Number of treatments in the experiment
subjectCount - Number of subjects in the experiment
treatmentRankMeans - Mean rank for each treatment
chiSquare - Value of the chi-square error for the treatment ranks

FriedmanConfidence.Statistic

protected FriedmanConfidence.Statistic(int treatmentCount,
                                       int subjectCount,
                                       ArrayList<Double> treatmentRankMeans,
                                       double chiSquare,
                                       double F)
Creates a new instance of Statistic

Parameters:
treatmentCount - Number of treatments in the experiment
subjectCount - Number of subjects in the experiment
treatmentRankMeans - Mean rank for each treatment
chiSquare - Value of the chi-square error for the treatment ranks
F - F-statistic for the corrected chi-square using Snedecor's F distribution
Method Detail

computeChiSquare

protected static double computeChiSquare(int treatmentCount,
                                         int subjectCount,
                                         ArrayList<Double> treatmentRankMeans)
Computes the chi-square error for the rank means

Parameters:
treatmentCount - Number of treatments in the experiment
subjectCount - Number of subjects in the experiment
treatmentRankMeans - Mean rank for each treatment
Returns:
Value of the chi-square error for the treatment ranks

clone

public FriedmanConfidence.Statistic clone()
Description copied from class: AbstractCloneableSerializable
This makes public the clone method on the Object class and removes the exception that it throws. Its default behavior is to automatically create a clone of the exact type of object that the clone is called on and to copy all primitives but to keep all references, which means it is a shallow copy. Extensions of this class may want to override this method (but call super.clone() to implement a "smart copy". That is, to target the most common use case for creating a copy of the object. Because of the default behavior being a shallow copy, extending classes only need to handle fields that need to have a deeper copy (or those that need to be reset). Some of the methods in ObjectUtil may be helpful in implementing a custom clone method. Note: The contract of this method is that you must use super.clone() as the basis for your implementation.

Specified by:
clone in interface CloneableSerializable
Overrides:
clone in class AbstractCloneableSerializable
Returns:
A clone of this object.

getTreatmentCount

public int getTreatmentCount()
Getter for treatmentCount

Returns:
Number of treatments in the experiment

getSubjectCount

public int getSubjectCount()
Getter for subjectCount

Returns:
Number of subjects in the experiment

getChiSquare

public double getChiSquare()
Getter for chiSquare

Returns:
Value of the chi-square error for the treatment ranks

getTreatmentRankMeans

public ArrayList<Double> getTreatmentRankMeans()
Getter for treatmentRankMeans

Returns:
Mean rank for each treatment

getDegreesOfFreedom

public double getDegreesOfFreedom()
Getter for degreesOfFreedom

Returns:
Degrees of freedom of the chi-square

getChiSquareNullHypothesisProbability

public double getChiSquareNullHypothesisProbability()
Getter for chiSquareNullHypothesisProbability

Returns:
Null-hypothesis using the chi-square statistic

getF

public double getF()
Getter for F.

Returns:
F-statistic for the corrected chi-square using Snedecor's F distribution

getTestStatistic

public double getTestStatistic()
Description copied from interface: ConfidenceStatistic
Gets the statistic from which we compute the null-hypothesis probability. In an ANOVA, this would be the "F" statistic. In a t-test, this would be the "t" value. And so forth.

Returns:
Confidence statistic used to compute the null-hypothesis probability.