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

public static class MannWhitneyUConfidence.Statistic
extends AbstractConfidenceStatistic

Statistics from the Mann-Whitney U-test

See Also:
Serialized Form

Field Summary
 
Fields inherited from class gov.sandia.cognition.statistics.method.AbstractConfidenceStatistic
nullHypothesisProbability
 
Constructor Summary
MannWhitneyUConfidence.Statistic(double sum1, int N1, double sum2, int N2)
          Creates a new instance of Statistic
MannWhitneyUConfidence.Statistic(MannWhitneyUConfidence.Statistic other)
          Copy Constructor
 
Method Summary
static double computeNullHypothesisProbability(double z)
          Computes the p-value for the test, given the z-value
static double computeU(double sum1, int N1, double sum2, int N2)
          Computes the U-statistic, the minimum rank sum above "chance"
static double computeZ(double U, int N1, int N2)
          Computes the z-value, used in the UnivariateGaussian CDF
 int getN1()
          Getter for N1
 int getN2()
          Getter for N2
 double getTestStatistic()
          Gets the statistic from which we compute the null-hypothesis probability.
 double getU()
          Getter for U
 double getZ()
          Getter for z
protected  void setN1(int N1)
          Setter for N1
protected  void setN2(int N2)
          Setter for N2
protected  void setU(double U)
          Setter for U
protected  void setZ(double z)
          Setter for z
 
Methods inherited from class gov.sandia.cognition.statistics.method.AbstractConfidenceStatistic
getNullHypothesisProbability, setNullHypothesisProbability, toString
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 

Constructor Detail

MannWhitneyUConfidence.Statistic

public MannWhitneyUConfidence.Statistic(double sum1,
                                        int N1,
                                        double sum2,
                                        int N2)
Creates a new instance of Statistic

Parameters:
sum1 - Rank sum for data1
N1 - Number of samples in data1
sum2 - Rank sum for data2
N2 - Number of samples in data2

MannWhitneyUConfidence.Statistic

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

Parameters:
other - Statistic to copy
Method Detail

computeU

public static double computeU(double sum1,
                              int N1,
                              double sum2,
                              int N2)
Computes the U-statistic, the minimum rank sum above "chance"

Parameters:
sum1 - Rank-sum value for data1
N1 - Number of samples in data1
sum2 - Rank-sum value for data2
N2 - Number of samples in data2
Returns:
U statistic, minimum rank sum above "chance"

computeZ

public static double computeZ(double U,
                              int N1,
                              int N2)
Computes the z-value, used in the UnivariateGaussian CDF

Parameters:
U - U statistic, minimum rank sum above "chance"
N1 - Number of samples in data1
N2 - Number of samples in data2
Returns:
z-value for a UnivariateGaussian CDF, number of standard deviations away from chance

computeNullHypothesisProbability

public static double computeNullHypothesisProbability(double z)
Computes the p-value for the test, given the z-value

Parameters:
z - z-value for a UnivariateGaussian CDF, number of standard deviations away from chance
Returns:
Chance that the null hypothesis is correct

getU

public double getU()
Getter for U

Returns:
U statistic, minimum rank sum above "chance"

setU

protected void setU(double U)
Setter for U

Parameters:
U - U statistic, minimum rank sum above "chance"

getZ

public double getZ()
Getter for z

Returns:
z-value for a UnivariateGaussian CDF, number of standard deviations away from chance

setZ

protected void setZ(double z)
Setter for z

Parameters:
z - z-value for a UnivariateGaussian CDF, number of standard deviations away from chance

getN1

public int getN1()
Getter for N1

Returns:
Number of samples in data1

setN1

protected void setN1(int N1)
Setter for N1

Parameters:
N1 - Number of samples in data1

getN2

public int getN2()
Getter for N2

Returns:
Number of samples in data2

setN2

protected void setN2(int N2)
Setter for N2

Parameters:
N2 - Number of samples in data1

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.