@Test public void testTestMeansUnknownEqualVars() { logger.info("testMeansUnknownEqualVars"); double xbar = 14.14; double ybar = 12.08; int n = 15; int m = 15; double stdx = 1.020784; double stdy = 0.951314; boolean is_twoTailed = false; double aLevel = 0.05; boolean expResult = true; boolean result = StudentsIndependentSamples.testMeansUnknownEqualVars(xbar, ybar, n, m, stdx, stdy, is_twoTailed, aLevel); assertEquals(expResult, result); }
public static boolean testMeansUnknownEqualVars(double xbar, double ybar, int n, int m, double stdx, double stdy, boolean is_twoTailed, double aLevel) { if(n<=1 || stdx<=0 || m<=1 || stdy<=0) { throw new IllegalArgumentException("The values of the provided parameters are not within the permitted range."); } double PooledVariance=((n-1)*stdx*stdx+(m-1)*stdy*stdy)/(n+m-2.0); double t=(xbar-ybar)/Math.sqrt(PooledVariance/n+PooledVariance/m); int df=n+m-2; boolean rejectH0=checkCriticalValue(t, df, is_twoTailed, aLevel); return rejectH0; }
StudentsIndependentSamples { public static boolean testMeansUnknownEqualVars(double xbar, double ybar, int n, int m, double stdx, double stdy, boolean is_twoTailed, double aLevel) { if(n<=1 || stdx<=0 || m<=1 || stdy<=0) { throw new IllegalArgumentException("The values of the provided parameters are not within the permitted range."); } double PooledVariance=((n-1)*stdx*stdx+(m-1)*stdy*stdy)/(n+m-2.0); double t=(xbar-ybar)/Math.sqrt(PooledVariance/n+PooledVariance/m); int df=n+m-2; boolean rejectH0=checkCriticalValue(t, df, is_twoTailed, aLevel); return rejectH0; } }
StudentsIndependentSamples { public static boolean testMeansUnknownEqualVars(double xbar, double ybar, int n, int m, double stdx, double stdy, boolean is_twoTailed, double aLevel) { if(n<=1 || stdx<=0 || m<=1 || stdy<=0) { throw new IllegalArgumentException("The values of the provided parameters are not within the permitted range."); } double PooledVariance=((n-1)*stdx*stdx+(m-1)*stdy*stdy)/(n+m-2.0); double t=(xbar-ybar)/Math.sqrt(PooledVariance/n+PooledVariance/m); int df=n+m-2; boolean rejectH0=checkCriticalValue(t, df, is_twoTailed, aLevel); return rejectH0; }  }
StudentsIndependentSamples { public static boolean testMeansUnknownEqualVars(double xbar, double ybar, int n, int m, double stdx, double stdy, boolean is_twoTailed, double aLevel) { if(n<=1 || stdx<=0 || m<=1 || stdy<=0) { throw new IllegalArgumentException("The values of the provided parameters are not within the permitted range."); } double PooledVariance=((n-1)*stdx*stdx+(m-1)*stdy*stdy)/(n+m-2.0); double t=(xbar-ybar)/Math.sqrt(PooledVariance/n+PooledVariance/m); int df=n+m-2; boolean rejectH0=checkCriticalValue(t, df, is_twoTailed, aLevel); return rejectH0; }  static boolean testMeansUnknownNotEqualVars(double xbar, double ybar, int n, int m, double stdx, double stdy, boolean is_twoTailed, double aLevel); static boolean testMeansUnknownEqualVars(double xbar, double ybar, int n, int m, double stdx, double stdy, boolean is_twoTailed, double aLevel); }
StudentsIndependentSamples { public static boolean testMeansUnknownEqualVars(double xbar, double ybar, int n, int m, double stdx, double stdy, boolean is_twoTailed, double aLevel) { if(n<=1 || stdx<=0 || m<=1 || stdy<=0) { throw new IllegalArgumentException("The values of the provided parameters are not within the permitted range."); } double PooledVariance=((n-1)*stdx*stdx+(m-1)*stdy*stdy)/(n+m-2.0); double t=(xbar-ybar)/Math.sqrt(PooledVariance/n+PooledVariance/m); int df=n+m-2; boolean rejectH0=checkCriticalValue(t, df, is_twoTailed, aLevel); return rejectH0; }  static boolean testMeansUnknownNotEqualVars(double xbar, double ybar, int n, int m, double stdx, double stdy, boolean is_twoTailed, double aLevel); static boolean testMeansUnknownEqualVars(double xbar, double ybar, int n, int m, double stdx, double stdy, boolean is_twoTailed, double aLevel);  }