javanpst.distributions.tests
Class FisherDistribution
- java.lang.Object
-
- javanpst.distributions.tests.FisherDistribution
-
public class FisherDistribution extends java.lang.ObjectAn implementation of the Fisher's test 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 doublecomputeAsymptoticProbability(double Q, int freedom)Compute asymptotic p-value, following a chi-square distributiondoublecomputeLeftExactProbability(int N, int n1, int n2, int Y, int n00)Computes exact left tail of Fisher distribution.doublecomputeRightExactProbability(int N, int n1, int n2, int Y, int n00)Computes exact right tail of Fisher distribution.static FisherDistributiongetInstance()Singleton pattern access to the distribution
-
-
-
Method Detail
-
getInstance
public static FisherDistribution getInstance()
Singleton pattern access to the distribution- Returns:
- the instance of the distribution
-
computeLeftExactProbability
public double computeLeftExactProbability(int N, int n1, int n2, int Y, int n00)Computes exact left tail of Fisher distribution.- Parameters:
N- number of samplesn1- sum of the samples of the first rown2- sum of the samples of the second rowY- sum of the samples of the first columnn00- samples in first column, first row- Returns:
- p-value computed
-
computeRightExactProbability
public double computeRightExactProbability(int N, int n1, int n2, int Y, int n00)Computes exact right tail of Fisher distribution.- Parameters:
N- number of samplesn1- sum of the samples of the first rown2- sum of the samples of the second rowY- sum of the samples of the first columnn00- samples in first column, first row- Returns:
- p-value computed
-
computeAsymptoticProbability
public double computeAsymptoticProbability(double Q, int freedom)Compute asymptotic p-value, following a chi-square distribution- Parameters:
Q- Fisher statisticfreedom- degrees of freedom- Returns:
- p-value computed
-
-
DMelt 3.0 © DataMelt by jWork.ORG