Index: /trunk/sources/HeuristicLab.Analysis/3.3/HeuristicLab.Analysis-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Analysis/3.3/HeuristicLab.Analysis-3.3.csproj	(revision 11702)
+++ /trunk/sources/HeuristicLab.Analysis/3.3/HeuristicLab.Analysis-3.3.csproj	(revision 11703)
@@ -159,5 +159,14 @@
     <Compile Include="QualityAnalysis\QualityDistributionAnalyzer.cs" />
     <Compile Include="QualityAnalysis\ScaledQualityDifferenceAnalyzer.cs" />
+    <Compile Include="Statistics\BonferroniHolm.cs" />
+    <Compile Include="Statistics\EnumerableStatisticsExtension.cs" />
+    <Compile Include="Statistics\ExpFitting.cs" />
+    <Compile Include="Statistics\IFitting.cs" />
+    <Compile Include="Statistics\KruskalWallisTest.cs" />
+    <Compile Include="Statistics\LinearLeastSquaresFitting.cs" />
+    <Compile Include="Statistics\LogFitting.cs" />
     <Compile Include="Statistics\NormalDistribution.cs" />
+    <Compile Include="Statistics\PairwiseTest.cs" />
+    <Compile Include="Statistics\SampleSizeDetermination.cs" />
     <Compile Include="ValueAnalysis\SingleValueAnalyzer.cs" />
     <Compile Include="ValueAnalysis\MinAverageMaxValueAnalyzer.cs" />
Index: /trunk/sources/HeuristicLab.Analysis/3.3/Statistics/BonferroniHolm.cs
===================================================================
--- /trunk/sources/HeuristicLab.Analysis/3.3/Statistics/BonferroniHolm.cs	(revision 11703)
+++ /trunk/sources/HeuristicLab.Analysis/3.3/Statistics/BonferroniHolm.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 System.Collections.Generic;
+using System.Linq;
+
+namespace HeuristicLab.Analysis.Statistics {
+  public static class BonferroniHolm {
+    /// <summary>
+    /// Based on David Groppe's MATLAB implementation 
+    /// (BSD licensed, see 
+    /// http://www.mathworks.com/matlabcentral/fileexchange/28303-bonferroni-holm-correction-for-multiple-comparisons)
+    /// </summary>
+    public static double[] Calculate(double globalAlpha, double[] pValues, out bool[] h) {
+      int k = pValues.Length;
+      double[] alphaNiveau = new double[k];
+      double[] adjustedPValues = new double[k];
+      bool[] decision = new bool[k];
+      Dictionary<int, double> pValuesIndizes = new Dictionary<int, double>();
+
+      for (int i = 0; i < k; i++) {
+        pValuesIndizes.Add(i, pValues[i]);
+      }
+      var sortedPValues = pValuesIndizes.OrderBy(x => x.Value);
+
+      for (int i = 1; i < k + 1; i++) {
+        alphaNiveau[i - 1] = globalAlpha / (k - i + 1);
+        int idx = sortedPValues.ElementAt(i - 1).Key;
+
+        if (i == 1) {
+          //true means reject
+          decision[idx] = sortedPValues.ElementAt(i - 1).Value < alphaNiveau[i - 1];
+          adjustedPValues[idx] = sortedPValues.ElementAt(i - 1).Value * (k - i + 1);
+        } else {
+          decision[idx] = decision[sortedPValues.ElementAt(i - 2).Key] ? (sortedPValues.ElementAt(i - 1).Value < alphaNiveau[i - 1]) : false;
+          adjustedPValues[idx] = Math.Max(adjustedPValues[sortedPValues.ElementAt(i - 2).Key], sortedPValues.ElementAt(i - 1).Value * (k - i + 1));
+        }
+        if (adjustedPValues[idx] > 1.0) {
+          adjustedPValues[idx] = 1.0;
+        }
+      }
+
+      h = decision;
+      return adjustedPValues;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Analysis/3.3/Statistics/EnumerableStatisticsExtension.cs
===================================================================
--- /trunk/sources/HeuristicLab.Analysis/3.3/Statistics/EnumerableStatisticsExtension.cs	(revision 11703)
+++ /trunk/sources/HeuristicLab.Analysis/3.3/Statistics/EnumerableStatisticsExtension.cs	(revision 11703)
@@ -0,0 +1,44 @@
+﻿#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 System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.Analysis.Statistics {
+  public static class EnumerableStatisticExtensions {
+    public static Tuple<double, double> ConfidenceIntervals(this IEnumerable<double> values, double alpha) {
+      if (values.Count() <= 1) return new Tuple<double, double>(double.NaN, double.NaN);
+
+      double lower, upper;
+      double s = values.StandardDeviation();
+      double x = values.Average();
+      int n = values.Count();
+      double t = alglib.invstudenttdistribution(n - 1, (1.0 - alpha) / 2.0);
+
+      lower = x + t * (s / Math.Sqrt(n));
+      upper = x - t * (s / Math.Sqrt(n));
+
+      return new Tuple<double, double>(lower, upper);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Analysis/3.3/Statistics/ExpFitting.cs
===================================================================
--- /trunk/sources/HeuristicLab.Analysis/3.3/Statistics/ExpFitting.cs	(revision 11703)
+++ /trunk/sources/HeuristicLab.Analysis/3.3/Statistics/ExpFitting.cs	(revision 11703)
@@ -0,0 +1,98 @@
+﻿#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 System.Linq;
+
+namespace HeuristicLab.Analysis.Statistics {
+  public class ExpFitting : IFitting {
+    private void LogFunc(double[] c, double[] x, ref double func, object obj) {
+      func = Math.Exp(-c[0] * Math.Pow(x[0], 2));
+    }
+
+    private double[] GetDefaultXValues(int n) {
+      var stdX = Enumerable.Range(1, n).Select(x => (double)x).ToArray();
+      return stdX;
+    }
+
+    public void Calculate(double[] dataPoints, out double p0, out double p1) {
+      var stdX = GetDefaultXValues(dataPoints.Count());
+      Calculate(dataPoints, stdX, out p0, out p1);
+    }
+
+    public void Calculate(double[] y, double[] x, out double p0, out double p1) {
+      if (y.Count() != x.Count()) {
+        throw new ArgumentException("The lenght of x and y needs do be equal. ");
+      }
+
+      double[] c = new double[] { 0.3 };
+      double epsf = 0;
+      double epsx = 0.000001;
+      int maxits = 0;
+      int info;
+      alglib.lsfitstate state;
+      alglib.lsfitreport rep;
+      double diffstep = 0.0001;
+      double[,] xx = new double[x.Count(), 1];
+
+      for (int i = 0; i < x.Count(); i++) {
+        xx[i, 0] = x[i];
+      }
+
+      alglib.lsfitcreatef(xx, y, c, diffstep, out state);
+      alglib.lsfitsetcond(state, epsf, epsx, maxits);
+      alglib.lsfitfit(state, LogFunc, null, null);
+      alglib.lsfitresults(state, out info, out c, out rep);
+
+      p0 = c[0];
+      p1 = c[0];
+    }
+
+    public DataRow CalculateFittedLine(double[] dataPoints, string rowName) {
+      DataRow newRow = new DataRow(rowName);
+      double c0, c1;
+      Calculate(dataPoints, out c0, out c1);
+      var stdX = GetDefaultXValues(dataPoints.Count());
+
+      for (int i = 0; i < stdX.Count(); i++) {
+        newRow.Values.Add(Math.Exp(-c0 * Math.Pow(stdX[i], 2)));
+      }
+
+      return newRow;
+    }
+
+    public DataRow CalculateFittedLine(double[] y, double[] x, string rowName) {
+      DataRow newRow = new DataRow(rowName);
+      double c0, c1;
+      Calculate(y, x, out c0, out c1);
+
+      for (int i = 0; i < x.Count(); i++) {
+        newRow.Values.Add(Math.Exp(-c0 * Math.Pow(x[i], 2)));
+      }
+
+      return newRow;
+    }
+
+    public override string ToString() {
+      return "Exponential Fitting";
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Analysis/3.3/Statistics/IFitting.cs
===================================================================
--- /trunk/sources/HeuristicLab.Analysis/3.3/Statistics/IFitting.cs	(revision 11703)
+++ /trunk/sources/HeuristicLab.Analysis/3.3/Statistics/IFitting.cs	(revision 11703)
@@ -0,0 +1,30 @@
+﻿#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
+
+namespace HeuristicLab.Analysis.Statistics {
+  public interface IFitting {
+    void Calculate(double[] dataPoints, out double p0, out double p1);
+    void Calculate(double[] y, double[] x, out double p0, out double p1);
+
+    DataRow CalculateFittedLine(double[] dataPoints, string rowName);
+    DataRow CalculateFittedLine(double[] y, double[] x, string rowName);
+  }
+}
Index: /trunk/sources/HeuristicLab.Analysis/3.3/Statistics/KruskalWallisTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Analysis/3.3/Statistics/KruskalWallisTest.cs	(revision 11703)
+++ /trunk/sources/HeuristicLab.Analysis/3.3/Statistics/KruskalWallisTest.cs	(revision 11703)
@@ -0,0 +1,151 @@
+﻿#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 System.Collections.Generic;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.Analysis.Statistics {
+  public static class KruskalWallisTest {
+    /// <summary>
+    /// Performs the Kruskal-Wallis test and returns the p-Value. 
+    /// (source based on R's kruskal.test(), GNU GPL)
+    /// </summary>
+    public static double Test(double[][] data) {
+      double[] g;
+      double[] x = FlattenArray(data, out g);
+      int n = x.Length;
+      int parameter = data.Length - 1;
+
+      int[] r = Rank(x);
+      double[][] ties = CountDuplicates(x);
+      double statistic = CalculateStatistic(r, g);
+      double tiesCorrection = CalculateTiesCorrection(ties);
+      statistic = ((12 * statistic / (n * (n + 1)) - 3 * (n + 1)) /
+                  (1 - tiesCorrection / (Math.Pow(n, 3) - n)));
+
+      return alglib.chisquarecdistribution(parameter, statistic);
+    }
+
+    private static double CalculateStatistic(int[] r, double[] g) {
+      double result = 0.0;
+      double lastG = g[0];
+      double curSum = 0.0;
+      int cnt = 0;
+      for (int i = 0; i < r.Length; i++) {
+        if (lastG.IsAlmost(g[i])) {
+          curSum += r[i];
+          cnt++;
+        } else {
+          double sum = Math.Pow(curSum, 2);
+          sum /= cnt;
+          result += sum;
+
+          lastG = g[i];
+          curSum = r[i];
+          cnt = 1;
+        }
+      }
+
+      double lastSum = Math.Pow(curSum, 2);
+      lastSum /= cnt;
+      result += lastSum;
+
+      return result;
+    }
+
+    private static double CalculateTiesCorrection(double[][] ties) {
+      double sum = 0.0;
+      for (int i = 0; i < ties[1].Length; i++) {
+        double tic = Math.Pow(ties[1][i], 3) - ties[1][i];
+        sum += tic;
+      }
+      return sum;
+    }
+
+    private static double[] FlattenArray(double[][] x, out double[] indizes) {
+      int compLenght = 0;
+      for (int i = 0; i < x.Length; i++) {
+        compLenght += x[i].Length;
+      }
+
+      double[] result = new double[compLenght];
+      indizes = new double[compLenght];
+
+      int resultPos = 0;
+      for (int i = 0; i < x.Length; i++) {
+        Array.Copy(x[i], 0, result, resultPos, x[i].Length);
+
+        for (int j = resultPos; j < resultPos + x[i].Length; j++) {
+          indizes[j] = i;
+        }
+        resultPos += x[i].Length;
+      }
+
+      return result;
+    }
+
+    private static double[][] CountDuplicates(double[] x) {
+      List<double> number = new List<double>();
+      List<double> cnt = new List<double>();
+      double[] sortedX = new double[x.Length];
+
+      Array.Copy(x, sortedX, x.Length);
+      Array.Sort(sortedX);
+
+      double last = x[0];
+      number.Add(x[0]);
+      cnt.Add(1);
+
+      for (int i = 1; i < x.Length; i++) {
+        if (!last.IsAlmost(x[i])) {
+          number.Add(x[i]);
+          last = x[i];
+          cnt.Add(1);
+        } else {
+          cnt[cnt.Count - 1] += 1;
+        }
+      }
+
+      double[][] result = new double[2][];
+      result[0] = number.ToArray();
+      result[1] = cnt.ToArray();
+
+      return result;
+    }
+
+    private static int[] Rank(double[] x) {
+      double[] keys = new double[x.Length];
+      int[] items = new int[x.Length];
+      int[] ranks = new int[x.Length];
+
+      Array.Copy(x, keys, x.Length);
+      for (int i = 0; i < x.Length; i++) items[i] = i;
+
+      Array.Sort(keys, items);
+
+      for (int i = 0; i < x.Length; i++) {
+        ranks[items[i]] = i + 1;
+      }
+      return ranks;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Analysis/3.3/Statistics/LinearLeastSquaresFitting.cs
===================================================================
--- /trunk/sources/HeuristicLab.Analysis/3.3/Statistics/LinearLeastSquaresFitting.cs	(revision 11703)
+++ /trunk/sources/HeuristicLab.Analysis/3.3/Statistics/LinearLeastSquaresFitting.cs	(revision 11703)
@@ -0,0 +1,98 @@
+﻿#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 System.Linq;
+
+namespace HeuristicLab.Analysis.Statistics {
+  public class LinearLeastSquaresFitting : IFitting {
+    public void Calculate(double[] dataPoints, out double p0, out double p1) {
+      var stdX = Enumerable.Range(0, dataPoints.Count()).Select(x => (double)x).ToArray();
+      Calculate(dataPoints, stdX, out p0, out p1);
+    }
+
+    public void Calculate(double[] y, double[] x, out double p0, out double p1) {
+      if (y.Count() != x.Count()) {
+        throw new ArgumentException("The lenght of x and y needs do be equal. ");
+      }
+
+      double sxy = 0.0;
+      double sxx = 0.0;
+      int n = y.Count();
+      double sy = y.Sum();
+      double sx = ((n - 1) * n) / 2.0;
+      double avgy = sy / n;
+      double avgx = sx / n;
+
+      for (int i = 0; i < n; i++) {
+        sxy += x[i] * y[i];
+        sxx += x[i] * x[i];
+      }
+
+      p0 = (sxy - (n * avgx * avgy)) / (sxx - (n * avgx * avgx));
+      p1 = avgy - p0 * avgx;
+    }
+
+    public double CalculateError(double[] dataPoints, double p0, double p1) {
+      double r;
+      double avgy = dataPoints.Average();
+      double sstot = 0.0;
+      double sserr = 0.0;
+
+      for (int i = 0; i < dataPoints.Count(); i++) {
+        double y = p0 * i + p1;
+        sstot += Math.Pow(dataPoints[i] - avgy, 2);
+        sserr += Math.Pow(dataPoints[i] - y, 2);
+      }
+
+      r = 1.0 - (sserr / sstot);
+      return r;
+    }
+
+    public DataRow CalculateFittedLine(double[] y, double[] x, string rowName) {
+      double k, d;
+      Calculate(y, x, out k, out d);
+
+      DataRow newRow = new DataRow(rowName);
+      for (int i = 0; i < x.Count(); i++) {
+        newRow.Values.Add(k * x[i] + d);
+      }
+      return newRow;
+    }
+
+    public DataRow CalculateFittedLine(double[] dataPoints, string rowName) {
+      DataRow newRow = new DataRow(rowName);
+      double c0, c1;
+      Calculate(dataPoints, out c0, out c1);
+      var stdX = Enumerable.Range(0, dataPoints.Count()).Select(x => (double)x).ToArray();
+
+      for (int i = 0; i < stdX.Count(); i++) {
+        newRow.Values.Add(c0 * stdX[i] + c1);
+      }
+
+      return newRow;
+    }
+
+    public override string ToString() {
+      return "Linear Fitting";
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Analysis/3.3/Statistics/LogFitting.cs
===================================================================
--- /trunk/sources/HeuristicLab.Analysis/3.3/Statistics/LogFitting.cs	(revision 11703)
+++ /trunk/sources/HeuristicLab.Analysis/3.3/Statistics/LogFitting.cs	(revision 11703)
@@ -0,0 +1,98 @@
+﻿#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 System.Linq;
+
+namespace HeuristicLab.Analysis.Statistics {
+  public class LogFitting : IFitting {
+    private void LogFunc(double[] c, double[] x, ref double func, object obj) {
+      func = c[0] * Math.Exp(c[1] / x[0]);
+    }
+
+    private double[] GetDefaultXValues(int n) {
+      var stdX = Enumerable.Range(1, n).Select(x => (double)x).ToArray();
+      return stdX;
+    }
+
+    public void Calculate(double[] dataPoints, out double p0, out double p1) {
+      var stdX = GetDefaultXValues(dataPoints.Count());
+      Calculate(dataPoints, stdX, out p0, out p1);
+    }
+
+    public void Calculate(double[] y, double[] x, out double p0, out double p1) {
+      if (y.Count() != x.Count()) {
+        throw new ArgumentException("The lenght of x and y needs do be equal. ");
+      }
+
+      double[] c = new double[] { 0.3, 0.3 };
+      double epsf = 0;
+      double epsx = 0.000001;
+      int maxits = 0;
+      int info;
+      alglib.lsfitstate state;
+      alglib.lsfitreport rep;
+      double diffstep = 0.0001;
+      double[,] xx = new double[x.Count(), 1];
+
+      for (int i = 0; i < x.Count(); i++) {
+        xx[i, 0] = x[i];
+      }
+
+      alglib.lsfitcreatef(xx, y, c, diffstep, out state);
+      alglib.lsfitsetcond(state, epsf, epsx, maxits);
+      alglib.lsfitfit(state, LogFunc, null, null);
+      alglib.lsfitresults(state, out info, out c, out rep);
+
+      p0 = c[0];
+      p1 = c[1];
+    }
+
+    public DataRow CalculateFittedLine(double[] dataPoints, string rowName) {
+      DataRow newRow = new DataRow(rowName);
+      double c0, c1;
+      Calculate(dataPoints, out c0, out c1);
+      var stdX = GetDefaultXValues(dataPoints.Count());
+
+      for (int i = 0; i < stdX.Count(); i++) {
+        newRow.Values.Add(c0 * Math.Exp(c1 / stdX[i]));
+      }
+
+      return newRow;
+    }
+
+    public DataRow CalculateFittedLine(double[] y, double[] x, string rowName) {
+      DataRow newRow = new DataRow(rowName);
+      double c0, c1;
+      Calculate(y, x, out c0, out c1);
+
+      for (int i = 0; i < x.Count(); i++) {
+        newRow.Values.Add(c0 * Math.Exp(c1 / x[i]));
+      }
+
+      return newRow;
+    }
+
+    public override string ToString() {
+      return "Logarithmic Fitting";
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Analysis/3.3/Statistics/PairwiseTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Analysis/3.3/Statistics/PairwiseTest.cs	(revision 11703)
+++ /trunk/sources/HeuristicLab.Analysis/3.3/Statistics/PairwiseTest.cs	(revision 11703)
@@ -0,0 +1,37 @@
+﻿#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
+
+
+namespace HeuristicLab.Analysis.Statistics {
+  public class PairwiseTest {
+    public static double TTest(double[] group1, double[] group2) {
+      double left, right, both;
+      alglib.unequalvariancettest(group1, group1.Length, group2, group2.Length, out both, out left, out right);
+      return both;
+    }
+
+    public static double MannWhitneyUTest(double[] group1, double[] group2) {
+      double mwuBothtails, mwuLefttail, mwuRighttail;
+      alglib.mannwhitneyutest(group1, group1.Length, group2, group2.Length, out mwuBothtails, out mwuLefttail, out mwuRighttail);
+      return mwuBothtails;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Analysis/3.3/Statistics/SampleSizeDetermination.cs
===================================================================
--- /trunk/sources/HeuristicLab.Analysis/3.3/Statistics/SampleSizeDetermination.cs	(revision 11703)
+++ /trunk/sources/HeuristicLab.Analysis/3.3/Statistics/SampleSizeDetermination.cs	(revision 11703)
@@ -0,0 +1,112 @@
+﻿#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 System.Linq;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.Analysis.Statistics {
+  public static class SampleSizeDetermination {
+    /// <summary>
+    /// Determines for a given sample the required sample size as described in 
+    /// Göran Kauermann, Helmut Küchenhoff: Stichproben: Methoden und praktische Umsetzung mit R, section 2.27. 
+    /// </summary>
+    /// <param name="samples">The pilot sample.</param>
+    /// <param name="conf">Confidence Interval.</param>
+    /// <returns>Number of required samples for the given confidence interval. </returns>
+    public static int DetermineSampleSizeByEstimatingMean(double[] samples, double conf = 0.95) {
+      if (conf < 0.0 || conf > 1.0) throw new ArgumentException("The confidence interval must be between zero and one.");
+
+      var confInterval = samples.ConfidenceIntervals(0.95);
+      double e = (confInterval.Item2 - confInterval.Item1) / 2;
+      double s = samples.StandardDeviation();
+      double z = alglib.invnormaldistribution((conf + 1) / 2);
+      double n = samples.Count();
+
+      double result = Math.Pow(s, 2) / ((Math.Pow(e, 2) / Math.Pow(z, 2)) + (Math.Pow(s, 2) / n));
+
+      result = Math.Ceiling(result);
+      if (result > int.MaxValue)
+        return int.MaxValue;
+      else
+        return (int)result;
+    }
+
+    public static int DetermineSampleSizeByEstimatingMeanForLargeSampleSizes(double[] samples, double conf = 0.95) {
+      if (conf < 0.0 || conf > 1.0) throw new ArgumentException("The confidence interval must be between zero and one.");
+
+      var confInterval = samples.ConfidenceIntervals(0.95);
+      double e = (confInterval.Item2 - confInterval.Item1) / 2;
+      double s = samples.StandardDeviation();
+      double z = alglib.invnormaldistribution((conf + 1) / 2);
+
+      double result = Math.Pow(z, 2) * (Math.Pow(s, 2) / Math.Pow(e, 2));
+
+      result = Math.Ceiling(result);
+      if (result > int.MaxValue)
+        return int.MaxValue;
+      else
+        return (int)result;
+    }
+
+    /// <summary>
+    /// Calculates Cohen's d.
+    /// </summary>
+    /// <returns>Cohen's d. 
+    /// d = 0.2 means small effect
+    /// d = 0.5 means medium effect
+    /// d = 0.8 means big effect
+    /// According to Wikipedia this means: "A lower Cohen's d indicates a necessity of larger sample sizes, and vice versa."
+    /// </returns>
+    public static double CalculateCohensD(double[] d1, double[] d2) {
+      double x1, x2, s1, s2;
+
+      x1 = d1.Average();
+      x2 = d2.Average();
+      s1 = d1.Variance();
+      s2 = d2.Variance();
+
+      return Math.Abs(x1 - x2) / Math.Sqrt((s1 + s2) / 2);
+    }
+
+    /// <summary>
+    /// Calculates Hedges' g. 
+    /// Hedges' g works like Cohen's d but corrects for bias. 
+    /// </summary>
+    /// <returns>Hedges' g</returns>
+    public static double CalculateHedgesG(double[] d1, double[] d2) {
+      double x1, x2, s1, s2, n1, n2, s, g, c;
+
+      x1 = d1.Average();
+      x2 = d2.Average();
+      s1 = d1.Variance();
+      s2 = d2.Variance();
+      n1 = d1.Count();
+      n2 = d2.Count();
+
+      s = Math.Sqrt(((n1 - 1) * s1 + (n2 - 1) * s2) / (n1 + n2 - 2));
+      g = Math.Abs(x1 - x2) / s;
+      c = (1 - (3 / (4 * (n1 + n2) - 9))) * g;
+
+      return c;
+    }
+  }
+}
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));
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab.Tests.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab.Tests.csproj	(revision 11702)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab.Tests.csproj	(revision 11703)
@@ -411,4 +411,8 @@
     <Compile Include="HeuristicLab.Algorithms.DataAnalysis-3.4\GaussianProcessFunctionsTest.cs" />
     <Compile Include="HeuristicLab.Algorithms.DataAnalysis-3.4\GaussianProcessRegressionTest.cs" />
+    <Compile Include="HeuristicLab.Analysis-3.3\BonferroniHolmUnitTests.cs" />
+    <Compile Include="HeuristicLab.Analysis-3.3\ConfidenceIntervalsTests.cs" />
+    <Compile Include="HeuristicLab.Analysis-3.3\EffectSizeUnitTests.cs" />
+    <Compile Include="HeuristicLab.Analysis-3.3\KruskalWallisUnitTests.cs" />
     <Compile Include="HeuristicLab.Analysis-3.3\MultidimensionalScalingTest.cs" />
     <Compile Include="HeuristicLab.Collections-3.3\BidirectionalDictionaryTest.cs" />
