gov.sandia.cognition.statistics.method
Class StudentTConfidence.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.StudentTConfidence.Statistic
All Implemented Interfaces:
ConfidenceStatistic, CloneableSerializable, Serializable, Cloneable
Enclosing class:
StudentTConfidence

public static class StudentTConfidence.Statistic
extends AbstractConfidenceStatistic

Confidence statistics for a Student-t test

See Also:
Serialized Form

Field Summary
 
Fields inherited from class gov.sandia.cognition.statistics.method.AbstractConfidenceStatistic
nullHypothesisProbability
 
Constructor Summary
StudentTConfidence.Statistic(double t, double degreesOfFreedom)
          Creates a new instance of Statistic
StudentTConfidence.Statistic(StudentTConfidence.Statistic other)
          Copy Constructor
 
Method Summary
 StudentTConfidence.Statistic clone()
          This makes public the clone method on the Object class and removes the exception that it throws.
 double getDegreesOfFreedom()
          Getter for degreesOfFreedom
 double getT()
          Getter for t
 double getTestStatistic()
          Gets the statistic from which we compute the null-hypothesis probability.
protected  void setDegreesOfFreedom(double degreesOfFreedom)
          Setter for degreesOfFreedom
protected  void setT(double t)
          Setter for t
static double twoTailTStatistic(double t, double degreesOfFreedom)
          Computes the likelihood that a StudentTDistribution would generate a LESS LIKELY sample as "t", given the degrees of freedom.
 
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

StudentTConfidence.Statistic

public StudentTConfidence.Statistic(double t,
                                    double degreesOfFreedom)
Creates a new instance of Statistic

Parameters:
t - Value that is used in the Student-t CDF to compute the probability. Usually just called the "t-statistic"
degreesOfFreedom - Number of degrees of freedom in the Student-t distribution, usually the number of data points - 1

StudentTConfidence.Statistic

public StudentTConfidence.Statistic(StudentTConfidence.Statistic other)
Copy Constructor

Parameters:
other - Statistic to copy
Method Detail

clone

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

twoTailTStatistic

public static double twoTailTStatistic(double t,
                                       double degreesOfFreedom)
Computes the likelihood that a StudentTDistribution would generate a LESS LIKELY sample as "t", given the degrees of freedom. This is a two tailed test, thus, we're computing the probability that a Student-t distribution would be as far away as "t" (both tails)

Parameters:
t - Sample to determine how likely a worse sample is than "t"
degreesOfFreedom - Number of degrees of freedom in the Student-t distribution
Returns:
Probability that a Student-t distribution would generate as bad of a sample as "t"

getT

public double getT()
Getter for t

Returns:
Value that is used in the Student-t CDF to compute the probability. Usually just called the "t-statistic"

setT

protected void setT(double t)
Setter for t

Parameters:
t - Value that is used in the Student-t CDF to compute the probability. Usually just called the "t-statistic"

getDegreesOfFreedom

public double getDegreesOfFreedom()
Getter for degreesOfFreedom

Returns:
Number of degrees of freedom in the Student-t distribution, usually the number of data points - 1

setDegreesOfFreedom

protected void setDegreesOfFreedom(double degreesOfFreedom)
Setter for degreesOfFreedom

Parameters:
degreesOfFreedom - Number of degrees of freedom in the Student-t distribution, usually the number of data points - 1

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.