@Test public void testTestPercentage() { logger.info("testPercentage"); double pbar = 0.60; int n = 100; double H0p = 0.65; boolean is_twoTailed = false; double aLevel = 0.05; boolean expResult = false; boolean result = NormalOneSample.testPercentage(pbar, n, H0p, is_twoTailed, aLevel); assertEquals(expResult, result); }
public static boolean testPercentage(double pbar, int n, double H0p, boolean is_twoTailed, double aLevel) { if(n<=0 || H0p<=0 || pbar<0) { throw new IllegalArgumentException("All the parameters must be positive."); } double z = (pbar-H0p)/Math.sqrt((H0p*(1.0 - H0p)/n)); boolean rejectH0 = checkCriticalValue(z, is_twoTailed, aLevel); return rejectH0; }
NormalOneSample { public static boolean testPercentage(double pbar, int n, double H0p, boolean is_twoTailed, double aLevel) { if(n<=0 || H0p<=0 || pbar<0) { throw new IllegalArgumentException("All the parameters must be positive."); } double z = (pbar-H0p)/Math.sqrt((H0p*(1.0 - H0p)/n)); boolean rejectH0 = checkCriticalValue(z, is_twoTailed, aLevel); return rejectH0; } }
NormalOneSample { public static boolean testPercentage(double pbar, int n, double H0p, boolean is_twoTailed, double aLevel) { if(n<=0 || H0p<=0 || pbar<0) { throw new IllegalArgumentException("All the parameters must be positive."); } double z = (pbar-H0p)/Math.sqrt((H0p*(1.0 - H0p)/n)); boolean rejectH0 = checkCriticalValue(z, is_twoTailed, aLevel); return rejectH0; }  }
NormalOneSample { public static boolean testPercentage(double pbar, int n, double H0p, boolean is_twoTailed, double aLevel) { if(n<=0 || H0p<=0 || pbar<0) { throw new IllegalArgumentException("All the parameters must be positive."); } double z = (pbar-H0p)/Math.sqrt((H0p*(1.0 - H0p)/n)); boolean rejectH0 = checkCriticalValue(z, is_twoTailed, aLevel); return rejectH0; }  static boolean testMean(double xbar, int n, double H0mean, double std, boolean is_twoTailed, double aLevel); static boolean testSum(double xsum, int n, double H0mean, double std, boolean is_twoTailed, double aLevel); static boolean testPercentage(double pbar, int n, double H0p, boolean is_twoTailed, double aLevel); }
NormalOneSample { public static boolean testPercentage(double pbar, int n, double H0p, boolean is_twoTailed, double aLevel) { if(n<=0 || H0p<=0 || pbar<0) { throw new IllegalArgumentException("All the parameters must be positive."); } double z = (pbar-H0p)/Math.sqrt((H0p*(1.0 - H0p)/n)); boolean rejectH0 = checkCriticalValue(z, is_twoTailed, aLevel); return rejectH0; }  static boolean testMean(double xbar, int n, double H0mean, double std, boolean is_twoTailed, double aLevel); static boolean testSum(double xsum, int n, double H0mean, double std, boolean is_twoTailed, double aLevel); static boolean testPercentage(double pbar, int n, double H0p, boolean is_twoTailed, double aLevel);  }