@Test public void testTest() { logger.info("test"); FlatDataCollection flatDataCollection = new FlatDataCollection(Arrays.asList(new Object[]{0.16,0.12,0.19,0.16,0.17,0.18,0.15,0.20,0.16,0.18,0.13,0.17,0.18,0.21,0.18,0.17,0.19,0.11,0.16,0.16})); double median = 0.15; boolean is_twoTailed = true; double aLevel = 0.05; boolean expResult = true; boolean result = SignOneSample.test(flatDataCollection, median, is_twoTailed, aLevel); assertEquals(expResult, result); }
public static boolean test(FlatDataCollection flatDataCollection, double median, boolean is_twoTailed, double aLevel) { double pvalue= getPvalue(flatDataCollection, median); boolean rejectH0=false; double a=aLevel; if(is_twoTailed) { a=aLevel/2.0; } if(pvalue<=a || pvalue>=(1-a)) { rejectH0=true; } return rejectH0; }
SignOneSample { public static boolean test(FlatDataCollection flatDataCollection, double median, boolean is_twoTailed, double aLevel) { double pvalue= getPvalue(flatDataCollection, median); boolean rejectH0=false; double a=aLevel; if(is_twoTailed) { a=aLevel/2.0; } if(pvalue<=a || pvalue>=(1-a)) { rejectH0=true; } return rejectH0; } }
SignOneSample { public static boolean test(FlatDataCollection flatDataCollection, double median, boolean is_twoTailed, double aLevel) { double pvalue= getPvalue(flatDataCollection, median); boolean rejectH0=false; double a=aLevel; if(is_twoTailed) { a=aLevel/2.0; } if(pvalue<=a || pvalue>=(1-a)) { rejectH0=true; } return rejectH0; }  }
SignOneSample { public static boolean test(FlatDataCollection flatDataCollection, double median, boolean is_twoTailed, double aLevel) { double pvalue= getPvalue(flatDataCollection, median); boolean rejectH0=false; double a=aLevel; if(is_twoTailed) { a=aLevel/2.0; } if(pvalue<=a || pvalue>=(1-a)) { rejectH0=true; } return rejectH0; }  static double getPvalue(FlatDataCollection flatDataCollection, double median); static boolean test(FlatDataCollection flatDataCollection, double median, boolean is_twoTailed, double aLevel); }
SignOneSample { public static boolean test(FlatDataCollection flatDataCollection, double median, boolean is_twoTailed, double aLevel) { double pvalue= getPvalue(flatDataCollection, median); boolean rejectH0=false; double a=aLevel; if(is_twoTailed) { a=aLevel/2.0; } if(pvalue<=a || pvalue>=(1-a)) { rejectH0=true; } return rejectH0; }  static double getPvalue(FlatDataCollection flatDataCollection, double median); static boolean test(FlatDataCollection flatDataCollection, double median, boolean is_twoTailed, double aLevel);  }