Class FisherExact

java.lang.Object
pal.statistics.FisherExact

public class FisherExact extends Object
This does a one tail fisher exact test. It uses an array of factorials initialized at the beginning to provide speed. There could be better ways to do this.
Version:
$Id: FisherExact.java,v 1
Author:
Ed Buckler
  • Constructor Summary

    Constructors
    Constructor
    Description
    FisherExact(int maxSize)
    constructor for FisherExact table
  • Method Summary

    Modifier and Type
    Method
    Description
    final double
    getCumlativeP(int a, int b, int c, int d)
    calculates the one tail P-value for the Fisher Exact test This
    final double
    getP(int a, int b, int c, int d)
    calculates the P-value for this specific state

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FisherExact

      public FisherExact(int maxSize)
      constructor for FisherExact table
      Parameters:
      maxSize - is the maximum sum that will be encountered by the table (a+b+c+d)
  • Method Details

    • getP

      public final double getP(int a, int b, int c, int d)
      calculates the P-value for this specific state
      Parameters:
      a - ,b,c,d are the four cells in a 2x2 matrix
      Returns:
      the P-value
    • getCumlativeP

      public final double getCumlativeP(int a, int b, int c, int d)
      calculates the one tail P-value for the Fisher Exact test This
      Parameters:
      a - ,b,c,d are the four cells in a 2x2 matrix
      Returns:
      the P-value