Index: /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views-3.3.csproj
===================================================================
--- /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views-3.3.csproj	(revision 9335)
+++ /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views-3.3.csproj	(revision 9336)
@@ -160,4 +160,5 @@
     </Compile>
     <Compile Include="SuccessorConfiguratorMenuItem.cs" />
+    <Compile Include="TTest.cs" />
   </ItemGroup>
   <ItemGroup>
Index: /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/StatisticalTestingView.cs
===================================================================
--- /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/StatisticalTestingView.cs	(revision 9335)
+++ /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/StatisticalTestingView.cs	(revision 9336)
@@ -234,16 +234,20 @@
       }
 
-      DoubleMatrix pValsMatrix = new DoubleMatrix(3, stringConvertibleMatrixView.Content.Columns);
+      DoubleMatrix pValsMatrix = new DoubleMatrix(5, stringConvertibleMatrixView.Content.Columns);
       pValsMatrix.ColumnNames = stringConvertibleMatrixView.Content.ColumnNames;
-      pValsMatrix.RowNames = new string[] { "p-Value", "Cohen's d", "Hedges' g" };
-
-      double bothtails;
-      double lefttail;
-      double righttail;
+      pValsMatrix.RowNames = new string[] { "p-Value of MannWhitneyU", "p-Value of T-Test", "Necessary Sample Size for T-Test", "Cohen's d", "Hedges' g" };
+
+      double mwuBothtails;
+      double mwuLefttail;
+      double mwuRighttail;
+      double ttestLefttail;
       for (int i = 0; i < data.Length; i++) {
-        alglib.mannwhitneyutest(data[colIndex], data[colIndex].Length, data[i], data[i].Length, out bothtails, out lefttail, out righttail);
-        pValsMatrix[0, i] = bothtails;
-        pValsMatrix[1, i] = SampleSizeDetermination.CalculateCohensD(data[colIndex], data[i]);
-        pValsMatrix[2, i] = SampleSizeDetermination.CalculateHedgesG(data[colIndex], data[i]);
+        alglib.mannwhitneyutest(data[colIndex], data[colIndex].Length, data[i], data[i].Length, out mwuBothtails, out mwuLefttail, out mwuRighttail);
+        ttestLefttail = TTest.Test(data[colIndex], data[i]);
+        pValsMatrix[0, i] = mwuBothtails;
+        pValsMatrix[1, i] = ttestLefttail;
+        pValsMatrix[2, i] = TTest.GetOptimalSampleSize(data[colIndex], data[i]);
+        pValsMatrix[3, i] = SampleSizeDetermination.CalculateCohensD(data[colIndex], data[i]);
+        pValsMatrix[4, i] = SampleSizeDetermination.CalculateHedgesG(data[colIndex], data[i]);
       }
 
Index: /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/TTest.cs
===================================================================
--- /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/TTest.cs	(revision 9336)
+++ /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/TTest.cs	(revision 9336)
@@ -0,0 +1,48 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.AlgorithmBehavior.Analyzers.Views {
+  public class TTest {   
+    public static double Test(double[] data1, double[] data2) {
+      double left, right, both;
+      //TODO: decide what to return
+      alglib.studentttest2(data1, data1.Length, data2, data2.Length, out both, out left, out right);
+      return left;
+    }     
+
+    public static double GetOptimalSampleSize(double[] data1, double[] data2, double conf = 0.95) {
+      double result = 0.0;
+      double t = alglib.invstudenttdistribution(data1.Length * 2 - 2, conf);
+
+      double m1 = data1.Average();
+      double m2 = data2.Average();
+      double s1 = data1.StandardDeviation();
+      double s2 = data2.StandardDeviation();
+
+      result = Math.Pow(t, 2) * (Math.Pow(s1, 2) + Math.Pow(s2, 2)) / Math.Pow(m1 - m2, 2);
+      return result;
+    }
+  }
+}
