@Test public void testTestMean() { logger.info("testMean"); double xbar = 7.4; int n = 28; double H0mean = 7.0; double std = 0.95; boolean is_twoTailed = false; double aLevel = 0.05; boolean expResult = true; boolean result = StudentsOneSample.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 t=(xbar-H0mean)/(std/Math.sqrt(n)); boolean rejectH0=checkCriticalValue(t, n, is_twoTailed, aLevel); return rejectH0; }
StudentsOneSample { 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 t=(xbar-H0mean)/(std/Math.sqrt(n)); boolean rejectH0=checkCriticalValue(t, n, is_twoTailed, aLevel); return rejectH0; } }
StudentsOneSample { 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 t=(xbar-H0mean)/(std/Math.sqrt(n)); boolean rejectH0=checkCriticalValue(t, n, is_twoTailed, aLevel); return rejectH0; }  }
StudentsOneSample { 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 t=(xbar-H0mean)/(std/Math.sqrt(n)); boolean rejectH0=checkCriticalValue(t, n, is_twoTailed, aLevel); return rejectH0; }  static boolean testMean(double xbar, int n, double H0mean, double std, boolean is_twoTailed, double aLevel); static boolean testAutocorrelation(double pk, int n, boolean is_twoTailed, double aLevel); }
StudentsOneSample { 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 t=(xbar-H0mean)/(std/Math.sqrt(n)); boolean rejectH0=checkCriticalValue(t, n, is_twoTailed, aLevel); return rejectH0; }  static boolean testMean(double xbar, int n, double H0mean, double std, boolean is_twoTailed, double aLevel); static boolean testAutocorrelation(double pk, int n, boolean is_twoTailed, double aLevel);  }