Class FisherExactDistribution

  • All Implemented Interfaces:
    ProbabilityDistribution

    public class FisherExactDistribution
    extends EmpiricalDistribution
    Fisher's exact test distribution is, as its name states, exact, and can therefore be used regardless of the sample characteristics. It converges asymptotically to Chi-square distribution for a large and well balanced sample. For a set of 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. The exact distribution becomes difficult to calculate with large samples or well-balanced tables, but fortunately these are precisely the conditions where the chi-square distribution is appropriate.
    See Also:
    Wikipedia: Fisher's exact test
    • Constructor Detail

      • FisherExactDistribution

        public FisherExactDistribution​(int[] rowSums,
                                       int[] colSums,
                                       int nSims,
                                       RandomLongGenerator uniform)
        Construct the distribution for Fisher's exact test.
        Parameters:
        rowSums - the row totals
        colSums - the column totals
        nSims - the number of simulations
        uniform - a uniform random number generator
      • FisherExactDistribution

        public FisherExactDistribution​(int[] rowSums,
                                       int[] colSums,
                                       int nSims)
        Construct the distribution for Fisher's exact test.
        Parameters:
        rowSums - the row totals
        colSums - the column totals
        nSims - the number of simulations