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 9936)
+++ branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/HeuristicLab.Analysis.Statistics-3.3.csproj	(revision 9937)
@@ -47,4 +47,9 @@
     </Reference>
     <Reference Include="HeuristicLab.Analysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Analysis.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Analysis.Views-3.3.dll</HintPath>
       <Private>False</Private>
     </Reference>
Index: branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/StatisticalTestingView.cs
===================================================================
--- branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/StatisticalTestingView.cs	(revision 9936)
+++ branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/StatisticalTestingView.cs	(revision 9937)
@@ -25,4 +25,5 @@
 using System.Threading.Tasks;
 using System.Windows.Forms;
+using HeuristicLab.Collections;
 using HeuristicLab.Core.Views;
 using HeuristicLab.Data;
@@ -70,7 +71,7 @@
     protected override void RegisterContentEvents() {
       base.RegisterContentEvents();
-      Content.ItemsAdded += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded);
-      Content.ItemsRemoved += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
-      Content.CollectionReset += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
+      Content.ItemsAdded += new CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded);
+      Content.ItemsRemoved += new CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
+      Content.CollectionReset += new CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
       Content.UpdateOfRunsInProgressChanged += Content_UpdateOfRunsInProgressChanged;
     }
@@ -78,19 +79,19 @@
     protected override void DeregisterContentEvents() {
       base.DeregisterContentEvents();
-      Content.ItemsAdded -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded);
-      Content.ItemsRemoved -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
-      Content.CollectionReset -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
+      Content.ItemsAdded -= new CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded);
+      Content.ItemsRemoved -= new CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
+      Content.CollectionReset -= new CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
       Content.UpdateOfRunsInProgressChanged -= Content_UpdateOfRunsInProgressChanged;
     }
 
-    private void Content_CollectionReset(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
+    private void Content_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) {
       RebuildDataTable();
     }
 
-    private void Content_ItemsRemoved(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
+    private void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IRun> e) {
       RebuildDataTable();
     }
 
-    private void Content_ItemsAdded(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
+    private void Content_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IRun> e) {
       RebuildDataTable();
     }
@@ -186,18 +187,22 @@
         DoubleMatrix dt = new DoubleMatrix(groups.Select(x => x.Count()).Max(), columnNames.Count());
         dt.ColumnNames = columnNames;
-
-        int i = 0;
-        int j = 0;
-        foreach (string columnName in columnNames) {
-          j = 0;
+        DataTable histogramDataTable = new DataTable(resultName);
+
+        for (int i = 0; i < columnNames.Count(); i++) {
+          int j = 0;
           data[i] = new double[groups[i].Count()];
+          DataRow row = new DataRow(columnNames[i]);
+          row.VisualProperties.ChartType = DataRowVisualProperties.DataRowChartType.Histogram;
+          histogramDataTable.Rows.Add(row);
+
           foreach (IRun run in groups[i]) {
             dt[j, i] = (double)((dynamic)run.Results[resultName]).Value;
             data[i][j] = dt[j, i];
+            row.Values.Add(dt[j, i]);
             j++;
           }
-          i++;
-        }
-
+        }
+
+        dataTableView.Content = histogramDataTable;
         stringConvertibleMatrixView.Content = dt;
       }
@@ -237,5 +242,22 @@
     }
 
+    private bool VerifyDataLength(bool showMessage) {
+      if (data == null || data.Length == 0)
+        return false;
+
+      //alglib needs at least 5 samples for computation
+      if (data.Any(x => x.Length <= 5)) {
+        if (showMessage)
+          MessageBox.Show(this, "You need to choose samples with a size greater 5.", "HeuristicLab", MessageBoxButtons.OK,
+            MessageBoxIcon.Error);
+        return false;
+      }
+      return true;
+    }
+
     private void CalculateValues() {
+      if (!VerifyDataLength(true))
+        return;
+
       if (data != null) {
         MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>()
@@ -258,4 +280,7 @@
 
     private void CalculatePairwise(string groupName) {
+      if (!VerifyDataLength(false))
+        return;
+
       MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, "Calculating...");
       Task.Factory.StartNew(() => CalculatePairwiseAsync(groupName));
Index: branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/StatisticalTestingView.designer.cs
===================================================================
--- branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/StatisticalTestingView.designer.cs	(revision 9936)
+++ branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/StatisticalTestingView.designer.cs	(revision 9937)
@@ -71,4 +71,8 @@
       this.normalityLabel = new System.Windows.Forms.Label();
       this.selectDataGroupBox = new System.Windows.Forms.GroupBox();
+      this.tabControl = new System.Windows.Forms.TabControl();
+      this.tabPage1 = new System.Windows.Forms.TabPage();
+      this.tabPage2 = new System.Windows.Forms.TabPage();
+      this.dataTableView = new HeuristicLab.Analysis.Views.DataTableView();
       this.contextMenuStrip1.SuspendLayout();
       ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
@@ -84,4 +88,7 @@
       this.normalityGroupBox.SuspendLayout();
       this.selectDataGroupBox.SuspendLayout();
+      this.tabControl.SuspendLayout();
+      this.tabPage1.SuspendLayout();
+      this.tabPage2.SuspendLayout();
       this.SuspendLayout();
       // 
@@ -99,5 +106,5 @@
       this.stringConvertibleMatrixView.ShowRowsAndColumnsTextBox = false;
       this.stringConvertibleMatrixView.ShowStatisticalInformation = true;
-      this.stringConvertibleMatrixView.Size = new System.Drawing.Size(674, 534);
+      this.stringConvertibleMatrixView.Size = new System.Drawing.Size(567, 523);
       this.stringConvertibleMatrixView.TabIndex = 0;
       // 
@@ -145,5 +152,5 @@
       this.resultComboBox.Location = new System.Drawing.Point(62, 3);
       this.resultComboBox.Name = "resultComboBox";
-      this.resultComboBox.Size = new System.Drawing.Size(311, 21);
+      this.resultComboBox.Size = new System.Drawing.Size(250, 21);
       this.resultComboBox.TabIndex = 5;
       this.resultComboBox.SelectedValueChanged += new System.EventHandler(this.resultComboBox_SelectedValueChanged);
@@ -168,5 +175,5 @@
       this.pValTextBox.Name = "pValTextBox";
       this.pValTextBox.ReadOnly = true;
-      this.pValTextBox.Size = new System.Drawing.Size(302, 20);
+      this.pValTextBox.Size = new System.Drawing.Size(241, 20);
       this.pValTextBox.TabIndex = 13;
       // 
@@ -180,5 +187,5 @@
       this.groupComboBox.Location = new System.Drawing.Point(62, 3);
       this.groupComboBox.Name = "groupComboBox";
-      this.groupComboBox.Size = new System.Drawing.Size(311, 21);
+      this.groupComboBox.Size = new System.Drawing.Size(250, 21);
       this.groupComboBox.TabIndex = 14;
       this.groupComboBox.SelectedValueChanged += new System.EventHandler(this.groupComboBox_SelectedValueChanged);
@@ -202,5 +209,5 @@
       this.splitContainer1.Panel2.Controls.Add(this.groupByLabel);
       this.splitContainer1.Panel2.Controls.Add(this.groupComboBox);
-      this.splitContainer1.Size = new System.Drawing.Size(376, 54);
+      this.splitContainer1.Size = new System.Drawing.Size(315, 54);
       this.splitContainer1.SplitterDistance = 25;
       this.splitContainer1.TabIndex = 18;
@@ -211,5 +218,5 @@
             | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
-      this.splitContainer3.Location = new System.Drawing.Point(8, 3);
+      this.splitContainer3.Location = new System.Drawing.Point(6, 6);
       this.splitContainer3.Name = "splitContainer3";
       // 
@@ -224,6 +231,6 @@
       this.splitContainer3.Panel2.Controls.Add(this.normalityGroupBox);
       this.splitContainer3.Panel2.Controls.Add(this.selectDataGroupBox);
-      this.splitContainer3.Size = new System.Drawing.Size(1078, 540);
-      this.splitContainer3.SplitterDistance = 680;
+      this.splitContainer3.Size = new System.Drawing.Size(910, 529);
+      this.splitContainer3.SplitterDistance = 573;
       this.splitContainer3.TabIndex = 20;
       // 
@@ -242,5 +249,5 @@
       this.pairwiseTestGroupBox.Location = new System.Drawing.Point(3, 289);
       this.pairwiseTestGroupBox.Name = "pairwiseTestGroupBox";
-      this.pairwiseTestGroupBox.Size = new System.Drawing.Size(388, 229);
+      this.pairwiseTestGroupBox.Size = new System.Drawing.Size(327, 218);
       this.pairwiseTestGroupBox.TabIndex = 22;
       this.pairwiseTestGroupBox.TabStop = false;
@@ -260,5 +267,5 @@
       this.pairwiseStringConvertibleMatrixView.ShowRowsAndColumnsTextBox = false;
       this.pairwiseStringConvertibleMatrixView.ShowStatisticalInformation = false;
-      this.pairwiseStringConvertibleMatrixView.Size = new System.Drawing.Size(376, 151);
+      this.pairwiseStringConvertibleMatrixView.Size = new System.Drawing.Size(315, 140);
       this.pairwiseStringConvertibleMatrixView.TabIndex = 19;
       // 
@@ -267,5 +274,5 @@
       this.pairwiseLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
       this.pairwiseLabel.AutoSize = true;
-      this.pairwiseLabel.Location = new System.Drawing.Point(366, 47);
+      this.pairwiseLabel.Location = new System.Drawing.Point(305, 47);
       this.pairwiseLabel.MaximumSize = new System.Drawing.Size(16, 16);
       this.pairwiseLabel.MinimumSize = new System.Drawing.Size(16, 16);
@@ -293,5 +300,5 @@
       this.equalDistsTextBox.Name = "equalDistsTextBox";
       this.equalDistsTextBox.ReadOnly = true;
-      this.equalDistsTextBox.Size = new System.Drawing.Size(274, 20);
+      this.equalDistsTextBox.Size = new System.Drawing.Size(213, 20);
       this.equalDistsTextBox.TabIndex = 18;
       // 
@@ -315,5 +322,5 @@
       this.groupCompComboBox.Location = new System.Drawing.Point(123, 19);
       this.groupCompComboBox.Name = "groupCompComboBox";
-      this.groupCompComboBox.Size = new System.Drawing.Size(259, 21);
+      this.groupCompComboBox.Size = new System.Drawing.Size(198, 21);
       this.groupCompComboBox.TabIndex = 17;
       this.groupCompComboBox.SelectedValueChanged += new System.EventHandler(this.groupCompComboBox_SelectedValueChanged);
@@ -329,5 +336,5 @@
       this.allGroupTestGroupBox.Location = new System.Drawing.Point(3, 237);
       this.allGroupTestGroupBox.Name = "allGroupTestGroupBox";
-      this.allGroupTestGroupBox.Size = new System.Drawing.Size(388, 46);
+      this.allGroupTestGroupBox.Size = new System.Drawing.Size(327, 46);
       this.allGroupTestGroupBox.TabIndex = 21;
       this.allGroupTestGroupBox.TabStop = false;
@@ -338,5 +345,5 @@
       this.groupCompLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
       this.groupCompLabel.AutoSize = true;
-      this.groupCompLabel.Location = new System.Drawing.Point(366, 22);
+      this.groupCompLabel.Location = new System.Drawing.Point(305, 22);
       this.groupCompLabel.MaximumSize = new System.Drawing.Size(16, 16);
       this.groupCompLabel.MinimumSize = new System.Drawing.Size(16, 16);
@@ -355,5 +362,5 @@
       this.normalityGroupBox.Location = new System.Drawing.Point(3, 88);
       this.normalityGroupBox.Name = "normalityGroupBox";
-      this.normalityGroupBox.Size = new System.Drawing.Size(388, 143);
+      this.normalityGroupBox.Size = new System.Drawing.Size(327, 143);
       this.normalityGroupBox.TabIndex = 20;
       this.normalityGroupBox.TabStop = false;
@@ -383,5 +390,5 @@
       this.normalityStringConvertibleMatrixView.ShowRowsAndColumnsTextBox = false;
       this.normalityStringConvertibleMatrixView.ShowStatisticalInformation = false;
-      this.normalityStringConvertibleMatrixView.Size = new System.Drawing.Size(373, 102);
+      this.normalityStringConvertibleMatrixView.Size = new System.Drawing.Size(312, 102);
       this.normalityStringConvertibleMatrixView.TabIndex = 17;
       // 
@@ -404,14 +411,62 @@
       this.selectDataGroupBox.Location = new System.Drawing.Point(3, 3);
       this.selectDataGroupBox.Name = "selectDataGroupBox";
-      this.selectDataGroupBox.Size = new System.Drawing.Size(388, 79);
+      this.selectDataGroupBox.Size = new System.Drawing.Size(327, 79);
       this.selectDataGroupBox.TabIndex = 19;
       this.selectDataGroupBox.TabStop = false;
       this.selectDataGroupBox.Text = "1. Select Data";
       // 
+      // tabControl
+      // 
+      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);
+      this.tabControl.Controls.Add(this.tabPage2);
+      this.tabControl.Location = new System.Drawing.Point(3, 3);
+      this.tabControl.Name = "tabControl";
+      this.tabControl.SelectedIndex = 0;
+      this.tabControl.Size = new System.Drawing.Size(930, 567);
+      this.tabControl.TabIndex = 21;
+      // 
+      // tabPage1
+      // 
+      this.tabPage1.Controls.Add(this.splitContainer3);
+      this.tabPage1.Location = new System.Drawing.Point(4, 22);
+      this.tabPage1.Name = "tabPage1";
+      this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
+      this.tabPage1.Size = new System.Drawing.Size(922, 541);
+      this.tabPage1.TabIndex = 0;
+      this.tabPage1.Text = "Tests";
+      this.tabPage1.UseVisualStyleBackColor = true;
+      // 
+      // tabPage2
+      // 
+      this.tabPage2.Controls.Add(this.dataTableView);
+      this.tabPage2.Location = new System.Drawing.Point(4, 22);
+      this.tabPage2.Name = "tabPage2";
+      this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
+      this.tabPage2.Size = new System.Drawing.Size(922, 541);
+      this.tabPage2.TabIndex = 1;
+      this.tabPage2.Text = "Histogram";
+      this.tabPage2.UseVisualStyleBackColor = true;
+      // 
+      // dataTableView
+      // 
+      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";
+      this.dataTableView.Content = null;
+      this.dataTableView.Location = new System.Drawing.Point(6, 6);
+      this.dataTableView.Name = "dataTableView";
+      this.dataTableView.ReadOnly = false;
+      this.dataTableView.Size = new System.Drawing.Size(910, 529);
+      this.dataTableView.TabIndex = 0;
+      // 
       // StatisticalTestingView
       // 
-      this.Controls.Add(this.splitContainer3);
+      this.Controls.Add(this.tabControl);
       this.Name = "StatisticalTestingView";
-      this.Size = new System.Drawing.Size(1089, 546);
+      this.Size = new System.Drawing.Size(936, 573);
       this.contextMenuStrip1.ResumeLayout(false);
       this.splitContainer1.Panel1.ResumeLayout(false);
@@ -432,4 +487,7 @@
       this.normalityGroupBox.PerformLayout();
       this.selectDataGroupBox.ResumeLayout(false);
+      this.tabControl.ResumeLayout(false);
+      this.tabPage1.ResumeLayout(false);
+      this.tabPage2.ResumeLayout(false);
       this.ResumeLayout(false);
 
@@ -462,4 +520,8 @@
     private Data.Views.StringConvertibleMatrixView pairwiseStringConvertibleMatrixView;
     private System.Windows.Forms.Label label4;
+    private System.Windows.Forms.TabControl tabControl;
+    private System.Windows.Forms.TabPage tabPage1;
+    private System.Windows.Forms.TabPage tabPage2;
+    private Views.DataTableView dataTableView;
   }
 }
Index: branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/StatisticalTestingView.resx
===================================================================
--- branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/StatisticalTestingView.resx	(revision 9936)
+++ branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/StatisticalTestingView.resx	(revision 9937)
@@ -119,8 +119,8 @@
   </resheader>
   <metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>133, 17</value>
+    <value>28, 18</value>
   </metadata>
   <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>54</value>
+    <value>50</value>
   </metadata>
 </root>
