Index: branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/DensityDataTableView.cs
===================================================================
--- branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/DensityDataTableView.cs	(revision 11601)
+++ branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/DensityDataTableView.cs	(revision 11601)
@@ -0,0 +1,52 @@
+﻿#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.Linq;
+using System.Windows.Forms.DataVisualization.Charting;
+using HeuristicLab.Analysis.Views;
+
+namespace HeuristicLab.Analysis.Statistics {
+  public class DensityDataTableView : DataTableView {
+
+    protected override void CalculateHistogram(Series series, DataRow row) {
+      base.CalculateHistogram(series, row);
+
+      string densitySeriesName = "Density " + row.Name;
+      double stepWidth = series.Points[1].XValue - series.Points[0].XValue;
+
+      if (chart.Series.Any(x => x.Name == densitySeriesName)) {
+        var ds = chart.Series.Single(x => x.Name == densitySeriesName);
+        chart.Series.Remove(ds);
+      }
+
+      var res = NormalDistribution.Density(row.Values.ToArray(), row.Values.Count, stepWidth);
+
+      Series newSeries = new Series(densitySeriesName);
+      newSeries.Color = series.Color;
+      newSeries.ChartType = SeriesChartType.FastLine;
+      foreach (var r in res) {
+        newSeries.Points.Add(new DataPoint(r.Item1, r.Item2));
+      }
+
+      chart.Series.Add(newSeries);
+    }
+  }
+}
Index: branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/HeuristicLab.Analysis.Statistics-3.3.csproj
===================================================================
--- branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/HeuristicLab.Analysis.Statistics-3.3.csproj	(revision 11598)
+++ branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/HeuristicLab.Analysis.Statistics-3.3.csproj	(revision 11601)
@@ -120,7 +120,11 @@
   <ItemGroup>
     <Compile Include="BonferroniHolm.cs" />
+    <Compile Include="DensityDataTableView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
     <Compile Include="EnumerableStatisticsExtension.cs" />
     <Compile Include="ExpFitting.cs" />
     <Compile Include="IFitting.cs" />
+    <Compile Include="NormalDistribution.cs" />
     <Compile Include="LinearLeastSquaresFitting.cs" />
     <Compile Include="LogFitting.cs" />
Index: branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/NormalDistribution.cs
===================================================================
--- branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/NormalDistribution.cs	(revision 11601)
+++ branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/NormalDistribution.cs	(revision 11601)
@@ -0,0 +1,67 @@
+﻿#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 NormalDistribution {
+    public static double[] Density(double[] x, double mean, double stdDev) {
+      double[] result = new double[x.Length];
+
+      for (int i = 0; i < x.Length; i++) {
+        result[i] = (1.0 / (stdDev * Math.Sqrt(2.0 * Math.PI))) *
+                    Math.Exp(-((Math.Pow(x[i] - mean, 2.0)) /
+                               (2.0 * Math.Pow(stdDev, 2.0))));
+      }
+
+      return result;
+    }
+
+    // based on the idea from http://www.statmethods.net/graphs/density.html
+    public static List<Tuple<double, double>> Density(double[] x, int nrOfPoints, double stepWidth) {
+      double[] newX = new double[nrOfPoints];
+      double mean = x.Average();
+      double stdDev = x.StandardDeviation();
+
+      double dataMin = x.Min();
+      double dataMax = x.Max();
+      double stepWith = (dataMax - dataMin) / nrOfPoints;
+      double cur = x.Min();
+      newX[0] = cur;
+      for (int i = 1; i < nrOfPoints; i++) {
+        cur += stepWith;
+        newX[i] = cur;
+      }
+
+      var y = Density(newX, mean, stdDev).Select(k => k * stepWidth * x.Length).ToList();
+
+      var points = new List<Tuple<double, double>>();
+      for (int i = 0; i < newX.Length; i++) {
+        points.Add(new Tuple<double, double>(newX[i], y[i]));
+      }
+
+      return points;
+    }
+  }
+}
Index: branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/StatisticalTestingView.cs
===================================================================
--- branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/StatisticalTestingView.cs	(revision 11598)
+++ branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/StatisticalTestingView.cs	(revision 11601)
@@ -333,5 +333,8 @@
       }
 
-      this.Invoke(new Action(() => { normalityStringConvertibleMatrixView.Content = pValsMatrix; }));
+      this.Invoke(new Action(() => {
+        normalityStringConvertibleMatrixView.Content = pValsMatrix;
+        normalityStringConvertibleMatrixView.DataGridView.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
+      }));
     }
 
@@ -459,5 +462,8 @@
       }
 
-      this.Invoke(new Action(() => { pairwiseStringConvertibleMatrixView.Content = pValsMatrix; }));
+      this.Invoke(new Action(() => {
+        pairwiseStringConvertibleMatrixView.Content = pValsMatrix;
+        pairwiseStringConvertibleMatrixView.DataGridView.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
+      }));
     }
 
Index: branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/StatisticalTestingView.designer.cs
===================================================================
--- branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/StatisticalTestingView.designer.cs	(revision 11598)
+++ branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/StatisticalTestingView.designer.cs	(revision 11601)
@@ -74,5 +74,5 @@
       this.tabPage1 = new System.Windows.Forms.TabPage();
       this.tabPage2 = new System.Windows.Forms.TabPage();
-      this.dataTableView = new HeuristicLab.Analysis.Views.DataTableView();
+      this.dataTableView = new DensityDataTableView();
       this.contextMenuStrip1.SuspendLayout();
       ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
@@ -95,6 +95,6 @@
       // stringConvertibleMatrixView
       // 
-      this.stringConvertibleMatrixView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
+      this.stringConvertibleMatrixView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.stringConvertibleMatrixView.Caption = "StringConvertibleMatrix View";
@@ -145,5 +145,5 @@
       // resultComboBox
       // 
-      this.resultComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+      this.resultComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.resultComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
@@ -169,5 +169,5 @@
       // pValTextBox
       // 
-      this.pValTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+      this.pValTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.pValTextBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@@ -180,5 +180,5 @@
       // groupComboBox
       // 
-      this.groupComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+      this.groupComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.groupComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
@@ -193,6 +193,6 @@
       // splitContainer1
       // 
-      this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
+      this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.splitContainer1.Location = new System.Drawing.Point(6, 19);
@@ -215,6 +215,6 @@
       // splitContainer3
       // 
-      this.splitContainer3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
+      this.splitContainer3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.splitContainer3.Location = new System.Drawing.Point(6, 6);
@@ -237,6 +237,6 @@
       // pairwiseTestGroupBox
       // 
-      this.pairwiseTestGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
+      this.pairwiseTestGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.pairwiseTestGroupBox.Controls.Add(this.pairwiseStringConvertibleMatrixView);
@@ -256,6 +256,6 @@
       // pairwiseStringConvertibleMatrixView
       // 
-      this.pairwiseStringConvertibleMatrixView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
+      this.pairwiseStringConvertibleMatrixView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.pairwiseStringConvertibleMatrixView.Caption = "StringConvertibleMatrix View";
@@ -294,5 +294,5 @@
       // equalDistsTextBox
       // 
-      this.equalDistsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+      this.equalDistsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.equalDistsTextBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@@ -315,5 +315,5 @@
       // groupCompComboBox
       // 
-      this.groupCompComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+      this.groupCompComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.groupCompComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
@@ -328,5 +328,5 @@
       // allGroupTestGroupBox
       // 
-      this.allGroupTestGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+      this.allGroupTestGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.allGroupTestGroupBox.Controls.Add(this.groupCompLabel);
@@ -354,5 +354,5 @@
       // normalityGroupBox
       // 
-      this.normalityGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+      this.normalityGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.normalityGroupBox.Controls.Add(this.label4);
@@ -379,6 +379,6 @@
       // normalityStringConvertibleMatrixView
       // 
-      this.normalityStringConvertibleMatrixView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
+      this.normalityStringConvertibleMatrixView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.normalityStringConvertibleMatrixView.Caption = "StringConvertibleMatrix View";
@@ -405,5 +405,5 @@
       // selectDataGroupBox
       // 
-      this.selectDataGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+      this.selectDataGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.selectDataGroupBox.Controls.Add(this.splitContainer1);
@@ -418,6 +418,6 @@
       // tabControl
       // 
-      this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
+      this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.tabControl.Controls.Add(this.tabPage1);
@@ -453,6 +453,6 @@
       // dataTableView
       // 
-      this.dataTableView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
+      this.dataTableView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.dataTableView.Caption = "DataTable View";
@@ -523,5 +523,5 @@
     private System.Windows.Forms.TabPage tabPage1;
     private System.Windows.Forms.TabPage tabPage2;
-    private Views.DataTableView dataTableView;
+    private DensityDataTableView dataTableView;
   }
 }
