@Test public void testTestMeansUnknownNotEqualVars() { logger.info("testMeansUnknownNotEqualVars"); 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 = StudentsIndependentSamples.testMeansUnknownNotEqualVars(xbar, ybar, n, m, stdx, stdy, is_twoTailed, aLevel); assertEquals(expResult, result); }
public static boolean testMeansUnknownNotEqualVars(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 varx=stdx*stdx; double vary=stdy*stdy; double t = (xbar-ybar)/Math.sqrt(varx/n+vary/m); int df = (int)Math.round(Math.pow(varx/n+vary/m,2)/(Math.pow(varx/n,2)/(n-1) + Math.pow(vary/m,2)/(m-1))); boolean rejectH0=checkCriticalValue(t, df, is_twoTailed, aLevel); return rejectH0; }
StudentsIndependentSamples { public static boolean testMeansUnknownNotEqualVars(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 varx=stdx*stdx; double vary=stdy*stdy; double t = (xbar-ybar)/Math.sqrt(varx/n+vary/m); int df = (int)Math.round(Math.pow(varx/n+vary/m,2)/(Math.pow(varx/n,2)/(n-1) + Math.pow(vary/m,2)/(m-1))); boolean rejectH0=checkCriticalValue(t, df, is_twoTailed, aLevel); return rejectH0; } }
StudentsIndependentSamples { public static boolean testMeansUnknownNotEqualVars(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 varx=stdx*stdx; double vary=stdy*stdy; double t = (xbar-ybar)/Math.sqrt(varx/n+vary/m); int df = (int)Math.round(Math.pow(varx/n+vary/m,2)/(Math.pow(varx/n,2)/(n-1) + Math.pow(vary/m,2)/(m-1))); boolean rejectH0=checkCriticalValue(t, df, is_twoTailed, aLevel); return rejectH0; }  }
StudentsIndependentSamples { public static boolean testMeansUnknownNotEqualVars(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 varx=stdx*stdx; double vary=stdy*stdy; double t = (xbar-ybar)/Math.sqrt(varx/n+vary/m); int df = (int)Math.round(Math.pow(varx/n+vary/m,2)/(Math.pow(varx/n,2)/(n-1) + Math.pow(vary/m,2)/(m-1))); 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 testMeansUnknownNotEqualVars(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 varx=stdx*stdx; double vary=stdy*stdy; double t = (xbar-ybar)/Math.sqrt(varx/n+vary/m); int df = (int)Math.round(Math.pow(varx/n+vary/m,2)/(Math.pow(varx/n,2)/(n-1) + Math.pow(vary/m,2)/(m-1))); 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);  }