Index: trunk/sources/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/BonferroniHolmUnitTests.cs
===================================================================
--- trunk/sources/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/BonferroniHolmUnitTests.cs	(revision 11703)
+++ trunk/sources/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/BonferroniHolmUnitTests.cs	(revision 11703)
@@ -0,0 +1,122 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Analysis.Statistics;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace Statistics.UnitTests {
+  [TestClass]
+  public class BonferroniHolmUnitTest {
+    [TestMethod]
+    public void BonferroniHolmUnitTest1() {
+      /* example taken from 
+       * http://www.mathworks.com/matlabcentral/fileexchange/28303-bonferroni-holm-correction-for-multiple-comparisons
+       * 
+       * p = 0.56, 0.22, 0.001, 0.04, 0.01
+       * a = 0.05
+       * cor_p = 0.560, 0.440, 0.005, 0.120, 0.040
+       * h = 0, 0, 1, 0, 1
+       * 
+       */
+
+      double[] correctedPValues = new double[] { 0.56, 0.44, 0.005, 0.12, 0.04 };
+      double[] pVals = new[] { 0.56, 0.22, 0.001, 0.04, 0.01 };
+      bool[] h = new bool[] { false, false, true, false, true };
+      bool[] decision;
+
+      var result = BonferroniHolm.Calculate(0.05, pVals, out decision);
+
+      for (int i = 0; i < pVals.Length; i++) {
+        Assert.AreEqual(correctedPValues[i], result[i]);
+        Assert.AreEqual(h[i], decision[i]);
+      }
+    }
+
+    [TestMethod]
+    public void BonferroniHolmUnitTest2() {
+      /* example taken from 
+       * http://en.wikipedia.org/wiki/Holm-Bonferroni_method#Example
+       * 
+       * p = 0.01, 0.04, 0.03,  0.005
+       * a = 0.05
+       * cor_p = 0.03, 0.06, 0.06, 0.02
+       * h = 1, 0, 0, 1
+       * 
+       */
+
+      double[] correctedPValues = new double[] { 0.03, 0.06, 0.06, 0.02 };
+      double[] pVals = new[] { 0.01, 0.04, 0.03, 0.005 };
+      bool[] h = new bool[] { true, false, false, true };
+      bool[] decision;
+
+      var result = BonferroniHolm.Calculate(0.05, pVals, out decision);
+
+      for (int i = 0; i < pVals.Length; i++) {
+        Assert.AreEqual(correctedPValues[i], result[i]);
+        Assert.AreEqual(h[i], decision[i]);
+      }
+    }
+
+    [TestMethod]
+    public void BonferroniHolmUnitTest3() {
+      // comparison with R's p.adjust(p, "holm") method
+      double[] correctedPValues = new double[] { 0.23262159, 0.05204139 };
+      double[] pVals = new[] { 0.232621592948806, 0.0260206949805373 };
+      bool[] decision;
+
+      var result = BonferroniHolm.Calculate(0.05, pVals, out decision);
+
+      for (int i = 0; i < pVals.Length; i++) {
+        Assert.AreEqual(correctedPValues[i], Math.Round(result[i], 8));
+      }
+    }
+
+    [TestMethod]
+    public void BonferroniHolmUnitTest4() {
+      // comparison with R's p.adjust(p, "holm") method
+      double[] correctedPValues = new double[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
+      double[] pVals = new[] { 0.1108139, 0.1241641, 0.2805913, 0.3715633, 0.3967397, 0.6165547, 0.7272018, 0.8774432, 0.9495787, 0.9755199 };
+      bool[] decision;
+
+      var result = BonferroniHolm.Calculate(0.05, pVals, out decision);
+
+      for (int i = 0; i < pVals.Length; i++) {
+        Assert.AreEqual(correctedPValues[i], Math.Round(result[i], 8));
+      }
+    }
+
+    [TestMethod]
+    public void BonferroniHolmUnitTest5() {
+      // comparison with R's p.adjust(p, "holm") method
+      double[] correctedPValues = new double[] { 1.389563e-05, 7.293675e-05, 2.330999e-04, 2.330999e-04, 4.370736e-04, 5.539326e-04 };
+      double[] pVals = new[] { 2.315938e-06, 1.458735e-05, 5.827497e-05, 7.166659e-05, 2.185368e-04, 5.539326e-04 };
+      bool[] decision;
+
+      var result = BonferroniHolm.Calculate(0.05, pVals, out decision);
+
+      for (int i = 0; i < pVals.Length; i++) {
+        Assert.AreEqual(Math.Round(correctedPValues[i], 10), Math.Round(result[i], 10));
+      }
+    }
+  }
+}
+
Index: trunk/sources/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/ConfidenceIntervalsTests.cs
===================================================================
--- trunk/sources/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/ConfidenceIntervalsTests.cs	(revision 11703)
+++ trunk/sources/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/ConfidenceIntervalsTests.cs	(revision 11703)
@@ -0,0 +1,66 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Analysis.Statistics;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace Statistics.UnitTests {
+  [TestClass]
+  public class ConfidenceIntervalsTests {
+    private readonly double[] x = new double[] { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 1.5, 0.3 };
+    private readonly double[] y = new double[] { -0.4071000,  1.3207543,  0.8364860, -0.6574363,  0.6215807,  
+      1.1562429, -0.7299977, -0.1013315, -1.5221018, -0.9375169, -0.6257027,  1.1698417, -0.9868505,  0.6890087, 
+      -0.1643505, -0.4920212, -0.6958091,  1.8849663,  0.8117723,  0.9806149};
+    private readonly double[] z = new double[] { 45, 55, 67, 45, 68, 79, 98, 87, 84, 82 };
+
+    [TestMethod]
+    public void ConfidenceIntervalsTest1() {
+      var result = z.ConfidenceIntervals(0.98);
+      Assert.AreEqual(54.8, Math.Round(result.Item1, 1));
+      Assert.AreEqual(87.2, Math.Round(result.Item2, 1));
+    }
+
+    [TestMethod]
+    public void ConfidenceIntervalsTest2() {
+      //comparison with R's t.test(..)
+      var result = x.ConfidenceIntervals(0.95);
+      Assert.AreEqual(1.880506, Math.Round(result.Item1, 6));
+      Assert.AreEqual(5.679494, Math.Round(result.Item2, 6));
+    }
+
+    [TestMethod]
+    public void ConfidenceIntervalsTest3() {
+      //comparison with R's t.test(..)
+      var result = y.ConfidenceIntervals(0.1);
+      Assert.AreEqual(0.0802945, Math.Round(result.Item1, 7));
+      Assert.AreEqual(0.1348105, Math.Round(result.Item2, 7));
+    }
+
+    [TestMethod]
+    public void ConfidenceIntervalsTest4() {
+      //comparison with R's t.test(..)
+      var result = y.ConfidenceIntervals(0.99);
+      Assert.AreEqual(-0.5047921, Math.Round(result.Item1, 7));
+      Assert.AreEqual(0.7198970, Math.Round(result.Item2, 7));
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/EffectSizeUnitTests.cs
===================================================================
--- trunk/sources/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/EffectSizeUnitTests.cs	(revision 11703)
+++ trunk/sources/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/EffectSizeUnitTests.cs	(revision 11703)
@@ -0,0 +1,61 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Analysis.Statistics;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace Statistics.UnitTests {
+  [TestClass]
+  public class EffectSizeUnitTests {
+    private readonly double[] x = new double[] { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 1.5, 0.3 };
+    private readonly double[] y = new double[] { 1.0, 3.0, 10.0, 4.0, 2.5, 6.0, 7.5, 8.0, 1.5, 0.5 };
+    private readonly double[] z = new double[] { 45.0, 0.3, 12.0, 45.0, 68.0, 79.0, 10.0, 87.0, 84.0, 1.0 };
+
+    [TestMethod]
+    public void CohensdTest1() {
+      //compared to R lsr package/cohenD(..)
+      var result = SampleSizeDetermination.CalculateCohensD(x, y);
+      Assert.AreEqual(0.2074003, Math.Round(result, 7));
+    }
+
+    [TestMethod]
+    public void CohensdTest2() {
+      //compared to R lsr package/cohenD(..)
+      var result = SampleSizeDetermination.CalculateCohensD(x, z);
+      Assert.AreEqual(1.57424, Math.Round(result, 5));
+    }
+
+    [TestMethod]
+    public void HedgesGTest1() {
+      //compared to R effsize package/cohen.d(..,hedges.correction=TRUE)
+      var result = SampleSizeDetermination.CalculateHedgesG(x, y);
+      Assert.AreEqual(0.1986369, Math.Round(result, 7));
+    }
+
+    [TestMethod]
+    public void HedgesGTest2() {
+      //compared to R effsize package/cohen.d(..,hedges.correction=TRUE)
+      var result = SampleSizeDetermination.CalculateHedgesG(x, z);
+      Assert.AreEqual(1.507722, Math.Round(result, 6));
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/KruskalWallisUnitTests.cs
===================================================================
--- trunk/sources/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/KruskalWallisUnitTests.cs	(revision 11703)
+++ trunk/sources/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/KruskalWallisUnitTests.cs	(revision 11703)
@@ -0,0 +1,172 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Analysis.Statistics;
+using HeuristicLab.Common;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace Statistics.UnitTests {
+  [TestClass]
+  public class KruskalWallisUnitTests {
+    //tests the sample data from R's Kruskal.Test() help page
+    [TestMethod]
+    public void KruskalWallisTest1() {
+      double[][] data = new double[3][];
+      data[0] = new double[] { 2.9, 3.0, 2.5, 2.6, 3.2 };
+      data[1] = new double[] { 3.8, 2.7, 4.0, 2.4 };
+      data[2] = new double[] { 2.8, 3.4, 3.7, 2.2, 2.0 };
+
+      Assert.AreEqual(0.68, Math.Round(KruskalWallisTest.Test(data), 2));
+    }
+
+    //compares groups of uniformly distributed random variables
+    [TestMethod]
+    public void KruskalWallisTest2() {
+      double[][] data = new double[3][];
+      data[0] = new double[] { 977,3848,2803,4097,3155,2745,25,3384,2587,1332,1407,2842,4089,4083,608,3246,1634
+                              ,3182,2856,1614,2627,1116,2659,1166,3299,2322,3681,2184,2470,4682,3305,2553,239,2847
+                              ,2733,8,2773,3215,1345,1037,1760,2729,984,648,1875,4852,1002,4106,3934,4542,3718
+                              ,67,4539,1862,1886,1299,4544,3463,4052,1934,728,2492,799,730,1896,468,4724,1329
+                              ,510,3952,2392,2812,330,94,1726,2542,926,1472,4014,812,1243,2274,2394,3120,1745
+                              ,2597,4331,2562,4814,239,1194,4843,4577,3277,3482,1381,4697,3878,500,2182};
+      data[1] = new double[] { 4106,3279,4464,1460,1023,4459,4723,2934,1818,26,2539,1816,2246,1185,1266,1137,1921
+                              ,1340,4655,4636,578,2970,4208,2658,110,1063,2081,1735,3308,3900,1483,929,2214,2810
+                              ,4568,327,3046,1085,4585,535,3303,1511,213,491,492,167,1520,1469,122,2514,2206
+                              ,2218,974,1480,3959,1158,2753,1273,3870,2356,4707,492,3606,562,445,866,3714,1603
+                              ,3139,4941,3824,1124,2130,3701,3437,1771,2837,1,3800,3465,3407,4281,444,363,2926
+                              ,2353,4429,3357,4834,1039,4238,139,3050,4099,2003,4253,2004,3849,4321,380 };
+      data[2] = new double[] { 233,1577,198,2311,2281,1957,737,3508,1974,1819,3778,1237,3497,616,1286,1901,3114
+                              ,3982,1756,1058,2874,2401,1921,3146,1313,1604,621,2365,46,3108,2714,81,4367,853
+                              ,1387,73,4132,2052,3440,2814,520,4434,4183,4055,1655,4417,3845,2389,1500,3029,3733
+                              ,3834,3681,1283,2875,1752,1258,279,1302,4301,4402,229,2256,3490,977,3615,1293,4345
+                              ,2005,298,2962,2118,3379,3121,4237,4646,1186,568,2181,2843,4721,1609,224,391,1893
+                              ,3605,4162,493,330,4595,2699,4457,3981,3499,1773,653,3176,134,3205,4537 };
+
+      Assert.AreEqual(0.95, Math.Round(KruskalWallisTest.Test(data), 2));
+    }
+
+    //compares groups of normally distributed random variables
+    [TestMethod]
+    public void KruskalWallisTest3() {
+      double[][] data = new double[3][];
+      data[0] = new double[] { 0.264589812,0.161585300,0.890091755,0.342488339,-1.596719857,0.120133657
+                              ,2.241639009,0.085758340,-0.857294600,1.677233367,1.256788739,-1.094681878
+                              ,1.243547091,-0.420561525,-0.762303565,0.108380241,-1.583143952,-0.327616045
+                              ,1.848906992,2.265051780,-0.101968019,0.958290323,0.531773709,0.923724862
+                              ,-0.345119203,1.502269741,-0.441750726,-0.041689146,-0.794916891,-1.407491978
+                              ,0.260857731,-0.583565945,-0.246297801,0.289167991,1.475766373,0.089479435
+                              ,-0.419836298,0.929193796,1.321124907,0.984626214,-1.106529215,1.893772460
+                              ,-0.116651087,-0.855576968,-0.235878058,0.122260772,0.505024585,0.557638701
+                              ,1.042759510,-0.301076354,0.786736923,0.768976235,-0.004049338,0.577436400
+                              ,1.281303178,0.081638643,0.323528409,-0.037552073,0.700950894,0.051583445
+                              ,-0.002369374,1.025067100,-0.829806908,0.759951587,-0.126659012,0.139548228
+                              ,1.776592281,-1.047810226,0.002268369,1.706443821,0.491150412,0.785840754
+                              ,-0.108426124,-0.364622100,-1.863405685,0.475659013,1.410155770,1.619192440
+                              ,0.145232489,0.390564220,0.078523202,1.246437519,-1.851728231,-0.702955879 };
+      data[1] = new double[] { 0.88684045,-1.64580307,1.35554664,0.99774740,-0.28673422,0.07218712,-0.57748503
+                              ,0.46563867,0.18205386,0.37696309,-0.67810720,-0.22694641,0.04085999,-0.01930002
+                              ,-1.14389989,-0.04909415,-0.05459455,-0.17639915,-0.16265625,0.07556000,-0.44700873
+                              ,-0.91181687,0.68196982,1.24826347,0.43507746,-0.09482412,0.78624477,0.34046540
+                              ,-0.62211625,-1.12255940,-0.63737143,0.68804212,-0.71520904,-1.53110842,-1.05479994
+                              ,-1.24221848,-0.45931126,-0.45559477,1.76679857,-0.77232782,1.13517674,-1.39495738
+                              ,-0.34197961,0.30465514,-0.53298790,0.50683810,-0.58359581,-0.25960696,-1.22998083
+                              ,0.65792853,1.26266806,1.74247915,0.58659782,0.30592475,-0.18126620,1.34782875
+                              ,0.15637320,0.37607185,-0.68933176,-1.24838659,0.65059380,-0.81253053,-1.69024871
+                              ,0.07260499,-1.63974258,0.16926860,1.57151501,-1.59405343,-0.07934909,-0.02262132
+                              ,-0.77291344,0.59094265,-0.27438763,-0.95374866,-0.22790924,-0.21198915,0.68324522
+                              ,-0.23775701,-1.16306273,-1.33217708,-0.11785916,0.85999469,0.01001755,-0.01307264 };
+      data[2] = new double[] { 1.211025191,0.958893913,-0.195330882,-2.169217166,0.001336114,1.216295531
+                              ,-0.973521915,0.365480774,-0.489803183,-1.673553315,2.003532021,1.423367551
+                              ,0.092679901,-1.491714972,-1.565832859,0.689337215,-1.204939599,0.598992068
+                              ,-1.261605940,0.890733253,3.334496751,0.817455786,0.441394621,-2.374263091
+                              ,-0.635907080,-1.283172539,-0.130218566,-0.169552228,0.177057474,-0.398655531
+                              ,1.151068075,1.700511574,-0.193563851,-0.970337200,-1.299506394,0.571352533
+                              ,0.304304277,-0.962776922,-0.160333430,0.727834694,-0.175105398,-2.029508526
+                              ,1.491111387,-1.584083346,0.662427657,1.500680474,0.820281659,-0.707746044
+                              ,-0.180426669,-1.259842785,0.050592502,0.476649763,0.368184886,1.482703173
+                              ,1.863034189,-0.833241981,1.602468694,0.155115911,-2.463551102,2.045183510
+                              ,-0.078774687,0.463642193,1.263807207,-0.635996999,-0.563708248,0.475730571
+                              ,-0.162671474,-0.682790861,-0.573510544,0.077701772,0.751698338,0.408727821
+                              ,-0.374242494,-0.002329019,-0.330893667,-0.488596854,-0.697768835,-1.356949810
+                              ,-0.947125493,2.087444922,0.271276104,-1.027604792,-0.364097727,-0.741089219};
+
+      Assert.AreEqual(0.0253, Math.Round(KruskalWallisTest.Test(data), 4));
+    }
+
+    //compares groups of normally and uniformly distributed random variables
+    [TestMethod]
+    public void KruskalWallisTest4() {
+      double[][] data = new double[3][];
+      data[0] = new double[] { 977,3848,2803,4097,3155,2745,25,3384,2587,1332,1407,2842,4089,4083,608,3246,1634
+                              ,3182,2856,1614,2627,1116,2659,1166,3299,2322,3681,2184,2470,4682,3305,2553,239,2847
+                              ,2733,8,2773,3215,1345,1037,1760,2729,984,648,1875,4852,1002,4106,3934,4542,3718
+                              ,67,4539,1862,1886,1299,4544,3463,4052,1934,728,2492,799,730,1896,468,4724,1329
+                              ,510,3952,2392,2812,330,94,1726,2542,926,1472,4014,812,1243,2274,2394,3120,1745
+                              ,2597,4331,2562,4814,239,1194,4843,4577,3277,3482,1381,4697,3878,500,2182};
+      data[1] = new double[] { 0.88684045,-1.64580307,1.35554664,0.99774740,-0.28673422,0.07218712,-0.57748503
+                              ,0.46563867,0.18205386,0.37696309,-0.67810720,-0.22694641,0.04085999,-0.01930002
+                              ,-1.14389989,-0.04909415,-0.05459455,-0.17639915,-0.16265625,0.07556000,-0.44700873
+                              ,-0.91181687,0.68196982,1.24826347,0.43507746,-0.09482412,0.78624477,0.34046540
+                              ,-0.62211625,-1.12255940,-0.63737143,0.68804212,-0.71520904,-1.53110842,-1.05479994
+                              ,-1.24221848,-0.45931126,-0.45559477,1.76679857,-0.77232782,1.13517674,-1.39495738
+                              ,-0.34197961,0.30465514,-0.53298790,0.50683810,-0.58359581,-0.25960696,-1.22998083
+                              ,0.65792853,1.26266806,1.74247915,0.58659782,0.30592475,-0.18126620,1.34782875
+                              ,0.15637320,0.37607185,-0.68933176,-1.24838659,0.65059380,-0.81253053,-1.69024871
+                              ,0.07260499,-1.63974258,0.16926860,1.57151501,-1.59405343,-0.07934909,-0.02262132
+                              ,-0.77291344,0.59094265,-0.27438763,-0.95374866,-0.22790924,-0.21198915,0.68324522
+                              ,-0.23775701,-1.16306273,-1.33217708,-0.11785916,0.85999469,0.01001755,-0.01307264 };
+      data[2] = new double[] { 1.211025191,0.958893913,-0.195330882,-2.169217166,0.001336114,1.216295531
+                              ,-0.973521915,0.365480774,-0.489803183,-1.673553315,2.003532021,1.423367551
+                              ,0.092679901,-1.491714972,-1.565832859,0.689337215,-1.204939599,0.598992068
+                              ,-1.261605940,0.890733253,3.334496751,0.817455786,0.441394621,-2.374263091
+                              ,-0.635907080,-1.283172539,-0.130218566,-0.169552228,0.177057474,-0.398655531
+                              ,1.151068075,1.700511574,-0.193563851,-0.970337200,-1.299506394,0.571352533
+                              ,0.304304277,-0.962776922,-0.160333430,0.727834694,-0.175105398,-2.029508526
+                              ,1.491111387,-1.584083346,0.662427657,1.500680474,0.820281659,-0.707746044
+                              ,-0.180426669,-1.259842785,0.050592502,0.476649763,0.368184886,1.482703173
+                              ,1.863034189,-0.833241981,1.602468694,0.155115911,-2.463551102,2.045183510
+                              ,-0.078774687,0.463642193,1.263807207,-0.635996999,-0.563708248,0.475730571
+                              ,-0.162671474,-0.682790861,-0.573510544,0.077701772,0.751698338,0.408727821
+                              ,-0.374242494,-0.002329019,-0.330893667,-0.488596854,-0.697768835,-1.356949810
+                              ,-0.947125493,2.087444922,0.271276104,-1.027604792,-0.364097727,-0.741089219};
+
+      var result = KruskalWallisTest.Test(data);
+      Assert.IsTrue(result.IsAlmost(2.2E-16));
+    }
+
+    //compares groups containing the same random variables
+    [TestMethod]
+    public void KruskalWallisTest5() {
+      double[][] data = new double[4][];
+      data[0] = new double[] { 1477,764,4731,1048,822,974,3302,2258,1946,3067,974,206,2439,3022,2714,2559,28
+                              ,2654,4588,3363,4750,1440,1892,3629,816,4317,34,2119,3290,1758};
+      data[1] = new double[] { 1477,764,4731,1048,822,974,3302,2258,1946,3067,974,206,2439,3022,2714,2559,28
+                              ,2654,4588,3363,4750,1440,1892,3629,816,4317,34,2119,3290,1758};
+      data[2] = new double[] {1477,764,4731,1048,822,974,3302,2258,1946,3067,974,206,2439,3022,2714,2559,28
+                              ,2654,4588,3363,4750,1440,1892,3629,816,4317,34,2119,3290,1758 };
+      data[3] = new double[] {1477,764,4731,1048,822,974,3302,2258,1946,3067,974,206,2439,3022,2714,2559,28
+                              ,2654,4588,3363,4750,1440,1892,3629,816,4317,34,2119,3290,1758 };
+
+      Assert.AreEqual(1, Math.Round(KruskalWallisTest.Test(data), 2));
+    }
+  }
+}
