@Test public void testTest() { logger.info("test"); int n11 = 1; int n12 = 5; int n21 = 4; int n22 = 0; double aLevel = 0.05; boolean expResult = true; boolean result = Fisher.test(n11, n12, n21, n22, aLevel); assertEquals(expResult, result); }
public static boolean test(int n11, int n12, int n21, int n22, double aLevel) { int ndot1=n11+n21; int ndot2=n12+n22; int n1dot=n11+n12; int n2dot=n21+n22; double pvalue= getPvalue(n11,ndot1,ndot2,n1dot,n2dot); boolean rejectH0=false; if(pvalue<=aLevel) { rejectH0=true; } return rejectH0; }
Fisher { public static boolean test(int n11, int n12, int n21, int n22, double aLevel) { int ndot1=n11+n21; int ndot2=n12+n22; int n1dot=n11+n12; int n2dot=n21+n22; double pvalue= getPvalue(n11,ndot1,ndot2,n1dot,n2dot); boolean rejectH0=false; if(pvalue<=aLevel) { rejectH0=true; } return rejectH0; } }
Fisher { public static boolean test(int n11, int n12, int n21, int n22, double aLevel) { int ndot1=n11+n21; int ndot2=n12+n22; int n1dot=n11+n12; int n2dot=n21+n22; double pvalue= getPvalue(n11,ndot1,ndot2,n1dot,n2dot); boolean rejectH0=false; if(pvalue<=aLevel) { rejectH0=true; } return rejectH0; }  }
Fisher { public static boolean test(int n11, int n12, int n21, int n22, double aLevel) { int ndot1=n11+n21; int ndot2=n12+n22; int n1dot=n11+n12; int n2dot=n21+n22; double pvalue= getPvalue(n11,ndot1,ndot2,n1dot,n2dot); boolean rejectH0=false; if(pvalue<=aLevel) { rejectH0=true; } return rejectH0; }  static double getPvalue(int n11, int ndot1, int ndot2, int n1dot, int n2dot); static boolean test(int n11, int n12, int n21, int n22, double aLevel); }
Fisher { public static boolean test(int n11, int n12, int n21, int n22, double aLevel) { int ndot1=n11+n21; int ndot2=n12+n22; int n1dot=n11+n12; int n2dot=n21+n22; double pvalue= getPvalue(n11,ndot1,ndot2,n1dot,n2dot); boolean rejectH0=false; if(pvalue<=aLevel) { rejectH0=true; } return rejectH0; }  static double getPvalue(int n11, int ndot1, int ndot2, int n1dot, int n2dot); static boolean test(int n11, int n12, int n21, int n22, double aLevel);  }