javanpst.distributions.tests
Class RunsUpDownDistribution
- java.lang.Object
-
- javanpst.distributions.tests.RunsUpDownDistribution
-
public class RunsUpDownDistribution extends java.lang.ObjectAn implementation of the Runs up down 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 doublecomputeAsymptoticDoubleTailProbability(int n, int R)Computes asymptotic double tail p-value of the Runs Up Down distributiondoublecomputeAsymptoticLeftTailProbability(int n, int R)Computes asymptotic left tail p-value of the Runs Up Down distributiondoublecomputeAsymptoticRightTailProbability(int n, int R)Computes asymptotic left tail p-value of the Runs Up Down distributiondoublecomputeExactProbability(int n, int R, boolean leftTail)Computes exact p-value of the Runs up down distributionstatic RunsUpDownDistributiongetInstance()Singleton pattern access to the distributionstatic Incomplete2KeyTablegetTable()Gets the table of the distribution
-
-
-
Method Detail
-
getInstance
public static RunsUpDownDistribution getInstance()
Singleton pattern access to the distribution- Returns:
- the instance of the distribution
-
getTable
public static Incomplete2KeyTable getTable()
Gets the table of the distribution- Returns:
- Reference to the table
-
computeExactProbability
public double computeExactProbability(int n, int R, boolean leftTail)Computes exact p-value of the Runs up down distribution- Parameters:
n- number of elementsR- Runs up down statisticleftTail- true if computing p-value of the left tail, false if right tail- Returns:
- p-value computed
-
computeAsymptoticLeftTailProbability
public double computeAsymptoticLeftTailProbability(int n, int R)Computes asymptotic left tail p-value of the Runs Up Down distribution- Parameters:
n- number of elements in the sequenceR- total number of runs- Returns:
- p-value computed
-
computeAsymptoticRightTailProbability
public double computeAsymptoticRightTailProbability(int n, int R)Computes asymptotic left tail p-value of the Runs Up Down distribution- Parameters:
n- number of elements in the sequenceR- total number of runs- Returns:
- p-value computed
-
computeAsymptoticDoubleTailProbability
public double computeAsymptoticDoubleTailProbability(int n, int R)Computes asymptotic double tail p-value of the Runs Up Down distribution- Parameters:
n- number of elements in the sequenceR- total number of runs- Returns:
- p-value computed
-
-
DMelt 3.0 © DataMelt by jWork.ORG