@Test public void testTestMeans() { logger.info("testMeans"); double xbar = 215.0; double ybar = 200.0; int n = 60; int m = 50; double stdx = 55.0; double stdy = 50.0; boolean is_twoTailed = false; double aLevel = 0.05; boolean expResult = false; boolean result = NormalIndependentSamples.testMeans(xbar, ybar, n, m, stdx, stdy, is_twoTailed, aLevel); assertEquals(expResult, result); }
public static boolean testMeans(double xbar, double ybar, int n, int m, double stdx, double stdy, boolean is_twoTailed, double aLevel) { if(n<=0 || stdx<=0 || m<=0 || stdy<=0) { throw new IllegalArgumentException("All the parameters must be positive."); } double z=(xbar-ybar)/Math.sqrt(stdx*stdx/n+stdy*stdy/m); boolean rejectH0= checkCriticalValue(z, is_twoTailed, aLevel); return rejectH0; }
NormalIndependentSamples { public static boolean testMeans(double xbar, double ybar, int n, int m, double stdx, double stdy, boolean is_twoTailed, double aLevel) { if(n<=0 || stdx<=0 || m<=0 || stdy<=0) { throw new IllegalArgumentException("All the parameters must be positive."); } double z=(xbar-ybar)/Math.sqrt(stdx*stdx/n+stdy*stdy/m); boolean rejectH0= checkCriticalValue(z, is_twoTailed, aLevel); return rejectH0; } }
NormalIndependentSamples { public static boolean testMeans(double xbar, double ybar, int n, int m, double stdx, double stdy, boolean is_twoTailed, double aLevel) { if(n<=0 || stdx<=0 || m<=0 || stdy<=0) { throw new IllegalArgumentException("All the parameters must be positive."); } double z=(xbar-ybar)/Math.sqrt(stdx*stdx/n+stdy*stdy/m); boolean rejectH0= checkCriticalValue(z, is_twoTailed, aLevel); return rejectH0; }  }
NormalIndependentSamples { public static boolean testMeans(double xbar, double ybar, int n, int m, double stdx, double stdy, boolean is_twoTailed, double aLevel) { if(n<=0 || stdx<=0 || m<=0 || stdy<=0) { throw new IllegalArgumentException("All the parameters must be positive."); } double z=(xbar-ybar)/Math.sqrt(stdx*stdx/n+stdy*stdy/m); boolean rejectH0= checkCriticalValue(z, is_twoTailed, aLevel); return rejectH0; }  static boolean testMeans(double xbar, double ybar, int n, int m, double stdx, double stdy, boolean is_twoTailed, double aLevel); static boolean testPercentages(double p1bar, double p2bar, int n1, int n2, boolean is_twoTailed, double aLevel); static boolean testOddsRatio(int n11, int n12, int n21, int n22, boolean is_twoTailed, double aLevel); }
NormalIndependentSamples { public static boolean testMeans(double xbar, double ybar, int n, int m, double stdx, double stdy, boolean is_twoTailed, double aLevel) { if(n<=0 || stdx<=0 || m<=0 || stdy<=0) { throw new IllegalArgumentException("All the parameters must be positive."); } double z=(xbar-ybar)/Math.sqrt(stdx*stdx/n+stdy*stdy/m); boolean rejectH0= checkCriticalValue(z, is_twoTailed, aLevel); return rejectH0; }  static boolean testMeans(double xbar, double ybar, int n, int m, double stdx, double stdy, boolean is_twoTailed, double aLevel); static boolean testPercentages(double p1bar, double p2bar, int n1, int n2, boolean is_twoTailed, double aLevel); static boolean testOddsRatio(int n11, int n12, int n21, int n22, boolean is_twoTailed, double aLevel);  }