@Test public void testTest() { logger.info("test"); TransposeDataList transposeDataList = new TransposeDataList(); transposeDataList.put(0, new FlatDataList(Arrays.asList(new Object[]{64,61,84,70,88,92,72,77}))); transposeDataList.put(1, new FlatDataList(Arrays.asList(new Object[]{20,16,34,23,27,32,18,22}))); boolean is_twoTailed = true; double aLevel = 0.05; boolean expResult = true; boolean result = PearsonCorrelation.test(transposeDataList, is_twoTailed, aLevel); assertEquals(expResult, result); }
public static boolean test(TransposeDataList transposeDataList, boolean is_twoTailed, double aLevel) { double pearson=calculateCorrelation(transposeDataList); Object[] keys = transposeDataList.keySet().toArray(); int n = transposeDataList.get(keys[0]).size(); double pvalue=scoreToPvalue(pearson,n); boolean rejectH0=false; double a=aLevel; if(is_twoTailed) { a=aLevel/2; } if(pvalue<=a || pvalue>=(1-a)) { rejectH0=true; } return rejectH0; }
PearsonCorrelation { public static boolean test(TransposeDataList transposeDataList, boolean is_twoTailed, double aLevel) { double pearson=calculateCorrelation(transposeDataList); Object[] keys = transposeDataList.keySet().toArray(); int n = transposeDataList.get(keys[0]).size(); double pvalue=scoreToPvalue(pearson,n); boolean rejectH0=false; double a=aLevel; if(is_twoTailed) { a=aLevel/2; } if(pvalue<=a || pvalue>=(1-a)) { rejectH0=true; } return rejectH0; } }
PearsonCorrelation { public static boolean test(TransposeDataList transposeDataList, boolean is_twoTailed, double aLevel) { double pearson=calculateCorrelation(transposeDataList); Object[] keys = transposeDataList.keySet().toArray(); int n = transposeDataList.get(keys[0]).size(); double pvalue=scoreToPvalue(pearson,n); boolean rejectH0=false; double a=aLevel; if(is_twoTailed) { a=aLevel/2; } if(pvalue<=a || pvalue>=(1-a)) { rejectH0=true; } return rejectH0; }  }
PearsonCorrelation { public static boolean test(TransposeDataList transposeDataList, boolean is_twoTailed, double aLevel) { double pearson=calculateCorrelation(transposeDataList); Object[] keys = transposeDataList.keySet().toArray(); int n = transposeDataList.get(keys[0]).size(); double pvalue=scoreToPvalue(pearson,n); boolean rejectH0=false; double a=aLevel; if(is_twoTailed) { a=aLevel/2; } if(pvalue<=a || pvalue>=(1-a)) { rejectH0=true; } return rejectH0; }  static double calculateCorrelation(TransposeDataList transposeDataList); static boolean test(TransposeDataList transposeDataList, boolean is_twoTailed, double aLevel); }
PearsonCorrelation { public static boolean test(TransposeDataList transposeDataList, boolean is_twoTailed, double aLevel) { double pearson=calculateCorrelation(transposeDataList); Object[] keys = transposeDataList.keySet().toArray(); int n = transposeDataList.get(keys[0]).size(); double pvalue=scoreToPvalue(pearson,n); boolean rejectH0=false; double a=aLevel; if(is_twoTailed) { a=aLevel/2; } if(pvalue<=a || pvalue>=(1-a)) { rejectH0=true; } return rejectH0; }  static double calculateCorrelation(TransposeDataList transposeDataList); static boolean test(TransposeDataList transposeDataList, boolean is_twoTailed, double aLevel);  }