Class GFisherExact2by2

java.lang.Object
org.gorpipe.gor.util.GFisherExact2by2

public class GFisherExact2by2 extends Object
Fisher's exact test for 2-by-2 tables.
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    compute(int A, int B, int C, int D)
    Compute the probability for a specific tail for the table {{A, B}, {C, D}}, that is, towards large A and D and small B and C.
    static double
    computeOneTailed(int A, int B, int C, int D)
    Compute the one-tailed probability for the table {{A, B}, {C, D}}.
    static double
    computeTwoTailed(int A, int B, int C, int D)
    Compute the two-tailed probability for the table {{A, B}, {C, D}}.

    Methods inherited from class java.lang.Object

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

    • compute

      public static double compute(int A, int B, int C, int D)
      Compute the probability for a specific tail for the table {{A, B}, {C, D}}, that is, towards large A and D and small B and C. (This was factored out of the old Haplo Analyzer and is used when computing association).
      Parameters:
      A - the a
      B - the b
      C - the c
      D - the d
      Returns:
      the p-value
    • computeOneTailed

      public static double computeOneTailed(int A, int B, int C, int D)
      Compute the one-tailed probability for the table {{A, B}, {C, D}}.
      Parameters:
      A - the a
      B - the b
      C - the c
      D - the d
      Returns:
      the p-value
    • computeTwoTailed

      public static double computeTwoTailed(int A, int B, int C, int D)
      Compute the two-tailed probability for the table {{A, B}, {C, D}}.
      Parameters:
      A - the a
      B - the b
      C - the c
      D - the d
      Returns:
      the p-value