StatisticsUtil { public static boolean wilcoxonSignedRankSumTestTwoSided(final double[] sampleA, final double[] sampleB) { return wilcoxonSignedRankSumTestP(sampleA, sampleB) < 0.05; } private  StatisticsUtil(); static double max(final Collection<? extends Number> values); static double min(final Collection<? extends Number> values); static double mean(final Collection<? extends Number> values); static double sum(final Collection<? extends Number> values); static double variance(final Collection<? extends Number> values); static double standardDeviation(final Collection<? extends Number> values); static double wilcoxonSignedRankSumTestP(final double[] sampleA, final double[] sampleB); static boolean wilcoxonSignedRankSumTestTwoSided(final double[] sampleA, final double[] sampleB); static boolean wilcoxonSignedRankSumTestSingleSided(final double[] sampleA, final double[] sampleB); static double mannWhitneyTwoSidedSignificanceP(final double[] sampleA, final double[] sampleB); static boolean mannWhitneyTwoSidedSignificance(final double[] sampleA, final double[] sampleB); static boolean mannWhitneyTwoSidedSignificance(final Collection<Double> sampleA, final Collection<Double> sampleB); static boolean mannWhitneyOneSidedSignificance(final double[] sampleA, final double[] sampleB); static boolean twoSampleTTestSignificance(final Collection<Double> valuesA, final Collection<Double> valuesB); static boolean twoSampleTTestSignificance(final double[] valuesA, final double[] valuesB); static boolean twoSampleTTestSignificance(final double mean1, final double variance1, final double n1, final double mean2, final double variance2, final double n2);  }
@Test public void testWilcoxonSignedRankSumTest() { assertFalse("Wilcoxon Signed Rank Test detects different distributions which is not the case.", StatisticsUtil.wilcoxonSignedRankSumTestTwoSided(posSampleA, posSampleB)); assertTrue("Wilcoxon Signed Rank Test did not detect different distributions although they are.", StatisticsUtil.wilcoxonSignedRankSumTestTwoSided(negSampleA, negSampleB)); }