@Test public void testTestMean() { logger.info("testMean"); double xbar = 215.0; int n = 60; double H0mean = 200.0; double std = 55.0; boolean is_twoTailed = false; double aLevel = 0.05; boolean expResult = true; boolean result = NormalOneSample.testMean(xbar, n, H0mean, std, is_twoTailed, aLevel); assertEquals(expResult, result); }
public static boolean testMean(double xbar, int n, double H0mean, double std, boolean is_twoTailed, double aLevel) { if(n<=0 || std<=0) { throw new IllegalArgumentException("All the parameters must be positive."); } double z = (xbar-H0mean)/(std/Math.sqrt(n)); boolean rejectH0 = checkCriticalValue(z, is_twoTailed, aLevel); return rejectH0; }
NormalOneSample { public static boolean testMean(double xbar, int n, double H0mean, double std, boolean is_twoTailed, double aLevel) { if(n<=0 || std<=0) { throw new IllegalArgumentException("All the parameters must be positive."); } double z = (xbar-H0mean)/(std/Math.sqrt(n)); boolean rejectH0 = checkCriticalValue(z, is_twoTailed, aLevel); return rejectH0; } }
NormalOneSample { public static boolean testMean(double xbar, int n, double H0mean, double std, boolean is_twoTailed, double aLevel) { if(n<=0 || std<=0) { throw new IllegalArgumentException("All the parameters must be positive."); } double z = (xbar-H0mean)/(std/Math.sqrt(n)); boolean rejectH0 = checkCriticalValue(z, is_twoTailed, aLevel); return rejectH0; }  }
NormalOneSample { public static boolean testMean(double xbar, int n, double H0mean, double std, boolean is_twoTailed, double aLevel) { if(n<=0 || std<=0) { throw new IllegalArgumentException("All the parameters must be positive."); } double z = (xbar-H0mean)/(std/Math.sqrt(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 testMean(double xbar, int n, double H0mean, double std, boolean is_twoTailed, double aLevel) { if(n<=0 || std<=0) { throw new IllegalArgumentException("All the parameters must be positive."); } double z = (xbar-H0mean)/(std/Math.sqrt(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);  }