javanpst.distributions.tests
Class SpearmanDistribution
- java.lang.Object
-
- javanpst.distributions.tests.SpearmanDistribution
-
public class SpearmanDistribution extends java.lang.ObjectAn implementation of the Spearman distribution. Uses a Singleton pattern to ensure only an instance of the class is allowed.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublecomputeAproximatedProbability(int n, double T)Computes approximated probability of the exact Spearman distributiondoublecomputeAsymptoticProbability(double Z, boolean dependence)Computes asymptotic probability of the Spearman distributiondoublecomputeExactProbability(int n, double T)Computes exact probability of the Spearman distributionstatic Critical1KeyTablegetCriticalTable()Gets the table of critical values of the distributionstatic Aproximate1KeyTablegetExactTable()Gets the table of the distributionstatic SpearmanDistributiongetInstance()Singleton pattern access to the distribution
-
-
-
Method Detail
-
getInstance
public static SpearmanDistribution getInstance()
Singleton pattern access to the distribution- Returns:
- the instance of the distribution
-
getCriticalTable
public static Critical1KeyTable getCriticalTable()
Gets the table of critical values of the distribution- Returns:
- Reference to the table
-
getExactTable
public static Aproximate1KeyTable getExactTable()
Gets the table of the distribution- Returns:
- Reference to the table
-
computeExactProbability
public double computeExactProbability(int n, double T)Computes exact probability of the Spearman distribution- Parameters:
n- number of pairsT- Spearman statistic- Returns:
- p-value computed
-
computeAproximatedProbability
public double computeAproximatedProbability(int n, double T)Computes approximated probability of the exact Spearman distribution- Parameters:
n- number of pairsT- Spearman statistic- Returns:
- p-value computed
-
computeAsymptoticProbability
public double computeAsymptoticProbability(double Z, boolean dependence)Computes asymptotic probability of the Spearman distribution- Parameters:
Z- normal approximationdependence- true if testing positive dependence. False, if negative- Returns:
- p-value computed
-
-
DMelt 3.0 © DataMelt by jWork.ORG