SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.stats.test.distribution.pearson
Class FisherExactDistribution

java.lang.Object
  extended by com.numericalmethod.suanshu.stats.distribution.univariate.EmpiricalDistribution
      extended by com.numericalmethod.suanshu.stats.test.distribution.pearson.FisherExactDistribution
All Implemented Interfaces:
UnivariateDistribution

public class FisherExactDistribution
extends EmpiricalDistribution

Fisher's exact test is a statistical significance test used in the analysis of contingency tables where sample sizes are small. It converges to Chi-square distribution for a large and well balanced sample.

For small, sparse, or unbalanced data, the exact and asymptotic p-values can be quite different and may lead to opposite conclusions concerning the hypothesis of interest. In contrast the Fisher exact test is, as its name states, exact, and it can therefore be used regardless of the sample characteristics.

It becomes difficult to calculate with large samples or well-balanced tables, but fortunately these are exactly the conditions where the chi-square distribution is appropriate.

See Also:
Wikipedia: Fisher's exact test

Constructor Summary
FisherExactDistribution(int[] rowSums, int[] colSums, int nSim)
          Construct the distribution for the Fisher's exact test.
FisherExactDistribution(int[] rowSums, int[] colSums, int nSim, RandomNumberGenerator rng)
          Construct the distribution for the Fisher's exact test.
 
Method Summary
 
Methods inherited from class com.numericalmethod.suanshu.stats.distribution.univariate.EmpiricalDistribution
cdf, density, entropy, kurtosis, mean, median, moment, quantile, skew, variance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FisherExactDistribution

public FisherExactDistribution(int[] rowSums,
                               int[] colSums,
                               int nSim,
                               RandomNumberGenerator rng)
Construct the distribution for the Fisher's exact test.

Parameters:
rowSums - row totals
colSums - column totals
nSim - number of simulations
rng - a uniform random number generator

FisherExactDistribution

public FisherExactDistribution(int[] rowSums,
                               int[] colSums,
                               int nSim)
Construct the distribution for the Fisher's exact test.

Parameters:
rowSums - row totals
colSums - column totals
nSim - number of simulations

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.