Package org.gorpipe.gor.util
Class GFisherExact2by2
java.lang.Object
org.gorpipe.gor.util.GFisherExact2by2
Fisher's exact test for 2-by-2 tables.
-
Method Summary
Modifier and TypeMethodDescriptionstatic doublecompute(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 doublecomputeOneTailed(int A, int B, int C, int D) Compute the one-tailed probability for the table {{A, B}, {C, D}}.static doublecomputeTwoTailed(int A, int B, int C, int D) Compute the two-tailed probability for the table {{A, B}, {C, D}}.
-
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 aB- the bC- the cD- 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 aB- the bC- the cD- 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 aB- the bC- the cD- the d- Returns:
- the p-value
-