{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "chart-statistical-analysis-chart-statistical-formulas",
  "framework": "winforms",
  "type": "registry:component",
  "component": "Chart",
  "variant": "statistical-analysis-chart-statistical-formulas",
  "dependencies": [
    "Syncfusion.Chart.Windows"
  ],
  "description": "Chart that runs Syncfusion's statistical formula engine such as mean, median, standard deviation and histograms on the bound data.",
  "meta": {
    "essentialStudioRelease": "2026 Volume 3 (v35.1.37)",
    "license": "commercial-or-community",
    "licenseNote": "The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md",
    "requiresLicenseKey": true,
    "requiresServerEndpoint": false,
    "platformIndex": "https://ai.syncfusion.com/winforms/llms.txt",
    "skillPack": "syncfusion/winforms-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/winforms/chart-statistical-analysis-chart-statistical-formulas.md"
  },
  "files": [
    {
      "target": "src/components/chart-statistical-analysis-chart-statistical-formulas/chart.Designer.cs",
      "content": "using System;\nusing System.Collections;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Windows.Forms;\nusing System.Data;\nusing Syncfusion.Windows.Forms;\nusing Syncfusion.Windows.Forms.Chart;\nusing Syncfusion.Drawing;\n\nnamespace StatisticalAnalysisChartStatisticalFormulas\n{\n    public partial class Form1 : Syncfusion.Windows.Forms.MetroForm\n    {\n        #region Windows Form Designer generated code\n        /// <summary>\n        /// Required method for Designer support - do not modify\n        /// the contents of this method with the code editor.\n        /// </summary>\n        private void InitializeComponent()\n        {\n            this.components = new System.ComponentModel.Container();\n            this.richTextBox1 = new System.Windows.Forms.RichTextBox();\n            this.Panel2 = new Syncfusion.Windows.Forms.Tools.GradientPanel();\n            this.label31 = new System.Windows.Forms.Label();\n            this.numericUpDown6 = new System.Windows.Forms.NumericUpDown();\n            this.checkBox1 = new System.Windows.Forms.CheckBox();\n            this.label7 = new System.Windows.Forms.Label();\n            this.button1 = new System.Windows.Forms.Button();\n            this.label6 = new System.Windows.Forms.Label();\n            this.comboBox1 = new System.Windows.Forms.ComboBox();\n            this.numericUpDown4 = new System.Windows.Forms.NumericUpDown();\n            this.numericUpDown3 = new System.Windows.Forms.NumericUpDown();\n            this.numericUpDown5 = new System.Windows.Forms.NumericUpDown();\n            this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();\n            this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();\n            this.label5 = new System.Windows.Forms.Label();\n            this.label4 = new System.Windows.Forms.Label();\n            this.label3 = new System.Windows.Forms.Label();\n            this.label2 = new System.Windows.Forms.Label();\n            this.label1 = new System.Windows.Forms.Label();\n            this.button2 = new System.Windows.Forms.Button();\n            this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);\n            this.label8 = new System.Windows.Forms.Label();\n            this.panel1 = new System.Windows.Forms.Panel();\n            this.chartControl1 = new Syncfusion.Windows.Forms.Chart.ChartControl();\n            ((System.ComponentModel.ISupportInitialize)(this.Panel2)).BeginInit();\n            this.Panel2.SuspendLayout();\n            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown6)).BeginInit();\n            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).BeginInit();\n            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).BeginInit();\n            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).BeginInit();\n            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();\n            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();\n            this.panel1.SuspendLayout();\n            this.SuspendLayout();\n            // \n            // richTextBox1\n            // \n            this.richTextBox1.BackColor = System.Drawing.Color.WhiteSmoke;\n            this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\n            this.richTextBox1.Font = new System.Drawing.Font(\"Segoe UI\", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.richTextBox1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));\n            this.richTextBox1.Location = new System.Drawing.Point(35, 604);\n            this.richTextBox1.Name = \"richTextBox1\";\n            this.richTextBox1.ReadOnly = true;\n            this.richTextBox1.Size = new System.Drawing.Size(168, 101);\n            this.richTextBox1.TabIndex = 1;\n            this.richTextBox1.Text = \"\";\n            // \n            // Panel2\n            // \n            this.Panel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));\n            this.Panel2.BackColor = System.Drawing.Color.WhiteSmoke;\n            this.Panel2.BackgroundColor = new Syncfusion.Drawing.BrushInfo(System.Drawing.Color.Transparent);\n            this.Panel2.Border3DStyle = System.Windows.Forms.Border3DStyle.RaisedOuter;\n            this.Panel2.BorderColor = System.Drawing.Color.Transparent;\n            this.Panel2.BorderStyle = System.Windows.Forms.BorderStyle.None;\n            this.Panel2.Controls.Add(this.label31);\n            this.Panel2.Controls.Add(this.numericUpDown6);\n            this.Panel2.Controls.Add(this.checkBox1);\n            this.Panel2.Controls.Add(this.label7);\n            this.Panel2.Controls.Add(this.button1);\n            this.Panel2.Controls.Add(this.label6);\n            this.Panel2.Controls.Add(this.comboBox1);\n            this.Panel2.Controls.Add(this.numericUpDown4);\n            this.Panel2.Controls.Add(this.numericUpDown3);\n            this.Panel2.Controls.Add(this.numericUpDown5);\n            this.Panel2.Controls.Add(this.numericUpDown2);\n            this.Panel2.Controls.Add(this.numericUpDown1);\n            this.Panel2.Controls.Add(this.label5);\n            this.Panel2.Controls.Add(this.label4);\n            this.Panel2.Controls.Add(this.label3);\n            this.Panel2.Controls.Add(this.label2);\n            this.Panel2.Controls.Add(this.label1);\n            this.Panel2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));\n            this.Panel2.Location = new System.Drawing.Point(-13, 3);\n            this.Panel2.Name = \"Panel2\";\n            this.Panel2.Size = new System.Drawing.Size(247, 564);\n            this.Panel2.TabIndex = 2;\n            // \n            // label31\n            // \n            this.label31.BackColor = System.Drawing.Color.Transparent;\n            this.label31.Font = new System.Drawing.Font(\"Segoe UI\", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.label31.Location = new System.Drawing.Point(32, 678);\n            this.label31.Name = \"label31\";\n            this.label31.Size = new System.Drawing.Size(20, 20);\n            this.label31.TabIndex = 41;\n            this.toolTip1.SetToolTip(this.label31, \"Tests if the samples means difference is equal to Hyphotetized mean difference.\");\n            // \n            // numericUpDown6\n            // \n            this.numericUpDown6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));\n            this.numericUpDown6.BackColor = System.Drawing.Color.WhiteSmoke;\n            this.numericUpDown6.Font = new System.Drawing.Font(\"Segoe UI\", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.numericUpDown6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));\n            this.numericUpDown6.Location = new System.Drawing.Point(63, 470);\n            this.numericUpDown6.Minimum = new decimal(new int[] {\n            1,\n            0,\n            0,\n            0});\n            this.numericUpDown6.Name = \"numericUpDown6\";\n            this.numericUpDown6.ReadOnly = true;\n            this.numericUpDown6.Size = new System.Drawing.Size(168, 27);\n            this.numericUpDown6.TabIndex = 12;\n            this.numericUpDown6.Value = new decimal(new int[] {\n            1,\n            0,\n            0,\n            0});\n            this.numericUpDown6.ValueChanged += new System.EventHandler(this.numericUpDown6_ValueChanged);\n            // \n            // checkBox1\n            // \n            this.checkBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));\n            this.checkBox1.AutoSize = true;\n            this.checkBox1.BackColor = System.Drawing.Color.Transparent;\n            this.checkBox1.FlatStyle = System.Windows.Forms.FlatStyle.System;\n            this.checkBox1.Font = new System.Drawing.Font(\"Segoe UI\", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.checkBox1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));\n            this.checkBox1.Location = new System.Drawing.Point(63, 503);\n            this.checkBox1.Name = \"checkBox1\";\n            this.checkBox1.Size = new System.Drawing.Size(89, 25);\n            this.checkBox1.TabIndex = 4;\n            this.checkBox1.Text = \"3D View\";\n            this.checkBox1.UseVisualStyleBackColor = false;\n            this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);\n            // \n            // label7\n            // \n            this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));\n            this.label7.BackColor = System.Drawing.Color.Transparent;\n            this.label7.Font = new System.Drawing.Font(\"Segoe UI\", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.label7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));\n            this.label7.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;\n            this.label7.Location = new System.Drawing.Point(59, 30);\n            this.label7.Name = \"label7\";\n            this.label7.RightToLeft = System.Windows.Forms.RightToLeft.Yes;\n            this.label7.Size = new System.Drawing.Size(166, 24);\n            this.label7.TabIndex = 5;\n            this.label7.Text = \"Statistical Tests\";\n            this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight;\n            // \n            // button1\n            // \n            this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));\n            this.button1.BackColor = System.Drawing.Color.Gray;\n            this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\n            this.button1.Font = new System.Drawing.Font(\"Segoe UI\", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.button1.ForeColor = System.Drawing.Color.White;\n            this.button1.Location = new System.Drawing.Point(63, 532);\n            this.button1.Name = \"button1\";\n            this.button1.Size = new System.Drawing.Size(174, 29);\n            this.button1.TabIndex = 10;\n            this.button1.Text = \"PERFORM T TEST\";\n            this.button1.UseVisualStyleBackColor = false;\n            this.button1.Click += new System.EventHandler(this.button1_Click);\n            // \n            // label6\n            // \n            this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));\n            this.label6.AutoSize = true;\n            this.label6.BackColor = System.Drawing.Color.WhiteSmoke;\n            this.label6.Font = new System.Drawing.Font(\"Segoe UI\", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.label6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));\n            this.label6.Location = new System.Drawing.Point(59, 443);\n            this.label6.Name = \"label6\";\n            this.label6.Size = new System.Drawing.Size(139, 20);\n            this.label6.TabIndex = 11;\n            this.label6.Text = \"Sample 3 Deviation\";\n            // \n            // comboBox1\n            // \n            this.comboBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));\n            this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\n            this.comboBox1.Font = new System.Drawing.Font(\"Segoe UI\", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.comboBox1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));\n            this.comboBox1.Location = new System.Drawing.Point(63, 56);\n            this.comboBox1.Name = \"comboBox1\";\n            this.comboBox1.Size = new System.Drawing.Size(168, 28);\n            this.comboBox1.TabIndex = 3;\n            this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);\n            // \n            // numericUpDown4\n            // \n            this.numericUpDown4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));\n            this.numericUpDown4.BackColor = System.Drawing.Color.WhiteSmoke;\n            this.numericUpDown4.Font = new System.Drawing.Font(\"Segoe UI\", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.numericUpDown4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));\n            this.numericUpDown4.Location = new System.Drawing.Point(63, 315);\n            this.numericUpDown4.Minimum = new decimal(new int[] {\n            1,\n            0,\n            0,\n            0});\n            this.numericUpDown4.Name = \"numericUpDown4\";\n            this.numericUpDown4.ReadOnly = true;\n            this.numericUpDown4.Size = new System.Drawing.Size(168, 27);\n            this.numericUpDown4.TabIndex = 8;\n            this.numericUpDown4.Value = new decimal(new int[] {\n            1,\n            0,\n            0,\n            0});\n            this.numericUpDown4.ValueChanged += new System.EventHandler(this.numericUpDown4_ValueChanged);\n            // \n            // numericUpDown3\n            // \n            this.numericUpDown3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));\n            this.numericUpDown3.BackColor = System.Drawing.Color.WhiteSmoke;\n            this.numericUpDown3.Font = new System.Drawing.Font(\"Segoe UI\", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.numericUpDown3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));\n            this.numericUpDown3.Location = new System.Drawing.Point(63, 250);\n            this.numericUpDown3.Minimum = new decimal(new int[] {\n            1,\n            0,\n            0,\n            0});\n            this.numericUpDown3.Name = \"numericUpDown3\";\n            this.numericUpDown3.ReadOnly = true;\n            this.numericUpDown3.Size = new System.Drawing.Size(168, 27);\n            this.numericUpDown3.TabIndex = 7;\n            this.numericUpDown3.Value = new decimal(new int[] {\n            1,\n            0,\n            0,\n            0});\n            this.numericUpDown3.ValueChanged += new System.EventHandler(this.numericUpDown3_ValueChanged);\n            // \n            // numericUpDown5\n            // \n            this.numericUpDown5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));\n            this.numericUpDown5.BackColor = System.Drawing.Color.WhiteSmoke;\n            this.numericUpDown5.Font = new System.Drawing.Font(\"Segoe UI\", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.numericUpDown5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));\n            this.numericUpDown5.Location = new System.Drawing.Point(63, 404);\n            this.numericUpDown5.Minimum = new decimal(new int[] {\n            1,\n            0,\n            0,\n            0});\n            this.numericUpDown5.Name = \"numericUpDown5\";\n            this.numericUpDown5.ReadOnly = true;\n            this.numericUpDown5.Size = new System.Drawing.Size(168, 27);\n            this.numericUpDown5.TabIndex = 9;\n            this.numericUpDown5.Value = new decimal(new int[] {\n            1,\n            0,\n            0,\n            0});\n            this.numericUpDown5.ValueChanged += new System.EventHandler(this.numericUpDown5_ValueChanged);\n            // \n            // numericUpDown2\n            // \n            this.numericUpDown2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));\n            this.numericUpDown2.BackColor = System.Drawing.Color.WhiteSmoke;\n            this.numericUpDown2.Font = new System.Drawing.Font(\"Segoe UI\", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.numericUpDown2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));\n            this.numericUpDown2.Location = new System.Drawing.Point(63, 186);\n            this.numericUpDown2.Minimum = new decimal(new int[] {\n            1,\n            0,\n            0,\n            0});\n            this.numericUpDown2.Name = \"numericUpDown2\";\n            this.numericUpDown2.ReadOnly = true;\n            this.numericUpDown2.Size = new System.Drawing.Size(168, 27);\n            this.numericUpDown2.TabIndex = 6;\n            this.numericUpDown2.Value = new decimal(new int[] {\n            1,\n            0,\n            0,\n            0});\n            this.numericUpDown2.ValueChanged += new System.EventHandler(this.numericUpDown2_ValueChanged);\n            // \n            // numericUpDown1\n            // \n            this.numericUpDown1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));\n            this.numericUpDown1.BackColor = System.Drawing.Color.WhiteSmoke;\n            this.numericUpDown1.Font = new System.Drawing.Font(\"Segoe UI\", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.numericUpDown1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));\n            this.numericUpDown1.Location = new System.Drawing.Point(63, 119);\n            this.numericUpDown1.Name = \"numericUpDown1\";\n            this.numericUpDown1.ReadOnly = true;\n            this.numericUpDown1.Size = new System.Drawing.Size(168, 27);\n            this.numericUpDown1.TabIndex = 5;\n            this.numericUpDown1.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged);\n            // \n            // label5\n            // \n            this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));\n            this.label5.AutoSize = true;\n            this.label5.BackColor = System.Drawing.Color.WhiteSmoke;\n            this.label5.FlatStyle = System.Windows.Forms.FlatStyle.System;\n            this.label5.Font = new System.Drawing.Font(\"Segoe UI\", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.label5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));\n            this.label5.Location = new System.Drawing.Point(63, 355);\n            this.label5.Name = \"label5\";\n            this.label5.Size = new System.Drawing.Size(144, 40);\n            this.label5.TabIndex = 4;\n            this.label5.Text = \"Hyphotetized mean \\r\\nDifference\";\n            // \n            // label4\n            // \n            this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));\n            this.label4.AutoSize = true;\n            this.label4.BackColor = System.Drawing.Color.WhiteSmoke;\n            this.label4.FlatStyle = System.Windows.Forms.FlatStyle.System;\n            this.label4.Font = new System.Drawing.Font(\"Segoe UI\", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.label4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));\n            this.label4.Location = new System.Drawing.Point(63, 288);\n            this.label4.Name = \"label4\";\n            this.label4.Size = new System.Drawing.Size(139, 20);\n            this.label4.TabIndex = 3;\n            this.label4.Text = \"Sample 2 Deviation\";\n            // \n            // label3\n            // \n            this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));\n            this.label3.AutoSize = true;\n            this.label3.BackColor = System.Drawing.Color.WhiteSmoke;\n            this.label3.FlatStyle = System.Windows.Forms.FlatStyle.System;\n            this.label3.Font = new System.Drawing.Font(\"Segoe UI\", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.label3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));\n            this.label3.Location = new System.Drawing.Point(63, 224);\n            this.label3.Name = \"label3\";\n            this.label3.Size = new System.Drawing.Size(112, 20);\n            this.label3.TabIndex = 2;\n            this.label3.Text = \"Sample 2 Mean\";\n            // \n            // label2\n            // \n            this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));\n            this.label2.AutoSize = true;\n            this.label2.BackColor = System.Drawing.Color.WhiteSmoke;\n            this.label2.FlatStyle = System.Windows.Forms.FlatStyle.System;\n            this.label2.Font = new System.Drawing.Font(\"Segoe UI\", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));\n            this.label2.Location = new System.Drawing.Point(63, 156);\n            this.label2.Name = \"label2\";\n            this.label2.Size = new System.Drawing.Size(139, 20);\n            this.label2.TabIndex = 1;\n            this.label2.Text = \"Sample 1 Deviation\";\n            // \n            // label1\n            // \n            this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));\n            this.label1.AutoSize = true;\n            this.label1.BackColor = System.Drawing.Color.WhiteSmoke;\n            this.label1.FlatStyle = System.Windows.Forms.FlatStyle.System;\n            this.label1.Font = new System.Drawing.Font(\"Segoe UI\", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));\n            this.label1.Location = new System.Drawing.Point(63, 94);\n            this.label1.Name = \"label1\";\n            this.label1.Size = new System.Drawing.Size(112, 20);\n            this.label1.TabIndex = 0;\n            this.label1.Text = \"Sample 1 Mean\";\n            // \n            // button2\n            // \n            this.button2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(224)))), ((int)(((byte)(192)))));\n            this.button2.FlatStyle = System.Windows.Forms.FlatStyle.System;\n            this.button2.ForeColor = System.Drawing.Color.MidnightBlue;\n            this.button2.Location = new System.Drawing.Point(15, 360);\n            this.button2.Name = \"button2\";\n            this.button2.Size = new System.Drawing.Size(102, 30);\n            this.button2.TabIndex = 11;\n            this.button2.Text = \"Exchange Samples\";\n            this.button2.UseVisualStyleBackColor = false;\n            this.button2.Click += new System.EventHandler(this.button2_Click);\n            // \n            // label8\n            // \n            this.label8.Font = new System.Drawing.Font(\"Segoe UI\", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.label8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));\n            this.label8.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;\n            this.label8.Location = new System.Drawing.Point(30, 570);\n            this.label8.Name = \"label8\";\n            this.label8.RightToLeft = System.Windows.Forms.RightToLeft.Yes;\n            this.label8.Size = new System.Drawing.Size(131, 24);\n            this.label8.TabIndex = 6;\n            this.label8.Text = \"Test Result\";\n            this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight;\n            // \n            // panel1\n            // \n            this.panel1.Dock = DockStyle.Right;\n            this.panel1.AutoScroll = true;\n            this.panel1.AutoScrollMargin = new System.Drawing.Size(0, 20);\n            this.panel1.BackColor = System.Drawing.Color.WhiteSmoke;\n            this.panel1.Controls.Add(this.label8);\n            this.panel1.Controls.Add(this.Panel2);\n            this.panel1.Controls.Add(this.richTextBox1);\n            this.panel1.Location = new System.Drawing.Point(709, 0);\n            this.panel1.Name = \"panel1\";\n            this.panel1.Size = new System.Drawing.Size(253, 590);\n            this.panel1.TabIndex = 7;\n            // \n            // chartControl1\n            // \n            this.chartControl1.ChartArea.CursorLocation = new System.Drawing.Point(0, 0);\n            this.chartControl1.ChartArea.CursorReDraw = false;\n            this.chartControl1.DataSourceName = \"\";\n            this.chartControl1.IsWindowLess = false;\n            // \n            // \n            // \n            this.chartControl1.Legend.BackInterior = new Syncfusion.Drawing.BrushInfo(Syncfusion.Drawing.GradientStyle.Vertical, System.Drawing.Color.Transparent, System.Drawing.Color.Transparent);\n            this.chartControl1.Legend.Font = new System.Drawing.Font(\"Microsoft Sans Serif\", 10F);\n            this.chartControl1.Legend.Location = new System.Drawing.Point(58, 495);\n            this.chartControl1.Legend.Orientation = Syncfusion.Windows.Forms.Chart.ChartOrientation.Horizontal;\n            this.chartControl1.Legend.Position = Syncfusion.Windows.Forms.Chart.ChartDock.Bottom;\n            this.chartControl1.Localize = null;\n            this.chartControl1.Location = new System.Drawing.Point(-1, 3);\n            this.chartControl1.Name = \"chartControl1\";\n            this.chartControl1.PrimaryXAxis.Crossing = double.NaN;\n            this.chartControl1.PrimaryXAxis.Margin = true;\n            this.chartControl1.PrimaryYAxis.Crossing = double.NaN;\n            this.chartControl1.PrimaryYAxis.Margin = true;\n            this.chartControl1.Size = new System.Drawing.Size(704, 572);\n            this.chartControl1.TabIndex = 8;\n            this.chartControl1.Text = \"chartControl1\";\n            // \n            // \n            // \n            this.chartControl1.Title.Name = \"Def_title\";\n            this.chartControl1.Title.Text = \"chartControl1\";\n            this.chartControl1.Titles.Add(this.chartControl1.Title);\n            // \n            // Form1\n            // \n            this.BackColor = System.Drawing.Color.White;\n            this.ClientSize = new System.Drawing.Size(958, 584);\n            this.Controls.Add(this.chartControl1);\n            this.Controls.Add(this.panel1);\n            this.MinimumSize = new System.Drawing.Size(668, 620);\n            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\n            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n            this.Name = \"Form1\";\n            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;\n            this.Text = \"Statistical Formulas\";\n            this.Load += new System.EventHandler(this.Form1_Load);\n            ((System.ComponentModel.ISupportInitialize)(this.Panel2)).EndInit();\n            this.Panel2.ResumeLayout(false);\n            this.Panel2.PerformLayout();\n            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown6)).EndInit();\n            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).EndInit();\n            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).EndInit();\n            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).EndInit();\n            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();\n            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();\n            this.panel1.ResumeLayout(false);\n            this.ResumeLayout(false);\n\n        }\n\n        #endregion\n\n        #region Private Members\n        private ChartSeries series1;\n        private ChartSeries series2;\n        private ChartSeries series3;\n        private double sqrtVarianceOfFirstSeries; //Standard deviation of the first series.\n        private double sqrtVarianceOfSecondSeries; //Standard deviation of the second series.\n        private double sqrtVarianceOfThirdSeries; //Standard deviation of the third series.\n        private double meanOfFirstSeries; //Mean of the first series.\n        private double meanOfSecondSeries; //Mean of the second series.\n        private double meanOfThirdSeries; //Mean of the third series.\n        private System.Windows.Forms.RichTextBox richTextBox1;\n        private Syncfusion.Windows.Forms.Tools.GradientPanel Panel2;\n        private System.Windows.Forms.Label label1;\n        private System.Windows.Forms.Label label2;\n        private System.Windows.Forms.Label label3;\n        private System.Windows.Forms.Label label4;\n        private System.Windows.Forms.Label label5;\n        private System.Windows.Forms.NumericUpDown numericUpDown1;\n        private System.Windows.Forms.NumericUpDown numericUpDown2;\n        private System.Windows.Forms.NumericUpDown numericUpDown3;\n        private System.Windows.Forms.NumericUpDown numericUpDown4;\n        private System.Windows.Forms.NumericUpDown numericUpDown5;\n        private System.Windows.Forms.Button button1;\n        private System.Windows.Forms.ComboBox comboBox1;\n        private System.Windows.Forms.Button button2;\n        private System.Windows.Forms.Label label6;\n        private System.Windows.Forms.NumericUpDown numericUpDown6;\n        private System.Windows.Forms.CheckBox checkBox1;\n        private Label label31;\n        private ToolTip toolTip1;\n        private Label label7;\n        private Label label8;\n        private Panel panel1;\n        private ChartControl chartControl1;\n        private IContainer components;\n\n        #endregion\n\n        /// <summary>\n        /// Clean up any resources being used.\n        /// </summary>\n        protected override void Dispose(bool disposing)\n        {\n            if (disposing && (components != null))\n            {\n                components.Dispose();\n            }\n            base.Dispose(disposing);\n        }\n    }\n}\n"
    },
    {
      "target": "src/components/chart-statistical-analysis-chart-statistical-formulas/chart.cs",
      "content": "﻿using System;\nusing System.Drawing;\nusing System.Collections;\nusing System.Windows.Forms;\nusing System.Data;\nusing Syncfusion.Windows.Forms.Chart;\nusing Syncfusion.Windows.Forms.Chart.Statistics;\nusing Syncfusion.Drawing;\nusing Syncfusion.Windows.Forms;\n\nnamespace StatisticalAnalysisChartStatisticalFormulas\n{\n    public partial class Form1 : Syncfusion.Windows.Forms.MetroForm\n    {\n        #region Form Constructor\n\n        public Form1()\n        {\n            BorderColor = Color.FromArgb(0xFF, 0xCD, 0xCD, 0xCD);\n            BorderThickness = 3;\n            CaptionBarHeight = 75;\n            CaptionBarColor = Color.FromArgb(0xFF, 0x1B, 0xA1, 0xE2);\n            CaptionFont = new Font(\"Segoe UI\", 22.0f);\n            CaptionForeColor = Color.White;\n            CaptionAlign = HorizontalAlignment.Left;\n            ShowIcon = false;\n            CaptionButtonColor = Color.White;\n            CaptionButtonHoverColor = Color.White;\n            InitializeComponent();\n        }\n\n        #endregion\n\n        #region Form1 Load\n        private void Form1_Load(object sender, System.EventArgs e)\n        {\n            this.chartControl1.PrimaryXAxis.Title = \"Sample X values\";\n            this.chartControl1.PrimaryYAxis.Title = \"Frequency of occurrence\";\n            sqrtVarianceOfFirstSeries = 10;\n            sqrtVarianceOfSecondSeries = 5;\n            meanOfFirstSeries = 15;\n            meanOfSecondSeries = 1;\n            sqrtVarianceOfThirdSeries = 7;\n            meanOfThirdSeries = 4;\n            FillControl();\n            UpdateChart();\n            this.chartControl1.Dock = DockStyle.Fill;\n            this.chartControl1.Skins = Skins.Metro;\n        }\n        #endregion\n\n        #region Helper Methods\n        #region FillControl\n        /// <summary>\n        /// Fills the combobox.\n        /// </summary>\n        protected void FillControl()\n        {\n            this.comboBox1.Items.Add(\"Statistical Functions\");\n            this.comboBox1.Items.Add(\"Perform Anova Test\");\n            this.comboBox1.Items.Add(\"Perform F Test\");\n            this.comboBox1.Items.Add(\"Perform T Test\");\n            this.comboBox1.Items.Add(\"Perform Z Test\");\n            this.comboBox1.SelectedIndex = 0;\n        }\n        #endregion\n\n        #region UpdateChart\n        /// <summary>\n        /// Designs the side panel and updates the chartcontrol.\n        /// </summary>\n        protected void UpdateChart()\n        {\n            this.SuspendLayout();\n\n            if (!this.Contains(this.Panel2))\n                this.Controls.Add(this.Panel2);\n            if (!this.Panel2.Contains(this.label5))\n            {\n                this.Panel2.Controls.Add(this.label5);\n                this.Panel2.Controls.Add(this.numericUpDown5);\n                this.Panel2.Controls.Remove(this.button2);\n                this.Panel2.Controls.Remove(this.label6);\n                this.Panel2.Controls.Remove(this.numericUpDown6);\n            }\n            this.richTextBox1.Clear();\n            switch (this.comboBox1.SelectedIndex)\n            {\n                case 0:\n                    InitializeChartBasicStatisticalFunctions();\n                    break;\n                case 1:\n                    InitializeAnovaChartData();\n                    Color[] color3 = new Color[] { Color.FromArgb(255, 153, 53), Color.FromArgb(253, 205, 154), Color.FromArgb(255, 153, 53) };\n                    this.chartControl1.Series[2].Style.Interior = new BrushInfo(Color.FromArgb(200, 199, 23, 33));\n                    this.chartControl1.Series[2].Style.Border.Color = Color.Gray;\n\n                    break;\n                case 2:\n                    InitializeFTestChartData();\n                    break;\n                case 3:\n                    InitializeTTestChartData();\n                    break;\n                case 4:\n                    InitializeZTestChartData();\n                    break;\n                default:\n                    InitializeChartBasicStatisticalFunctions();\n                    break;\n            }\n\n            this.ResumeLayout();\n            ChartAppearance.ApplyChartStyles(this.chartControl1);\n        }\n        #endregion\n\n        #region InitializeChartData\n        /// <summary>\n        /// Initializes chart data.\n        /// </summary>\n        /// <param name=\"numPoints\"></param>\n        /// <param name=\"hintervals\"></param>\n        protected void InitializeChartData(int numPoints, int hintervals)\n        {\n            //Clears the series collection of the chartcontrol.\n            chartControl1.Series.Clear();\n\n            //Initializes a new series with chart type as Histogram.\n            series1 = new ChartSeries();\n            series1.Name = \"Sample 1\";\n            series1.Type = ChartSeriesType.Histogram;\n            series1.Text = series1.Name;\n\n            for (int j = 0; j < numPoints; j++)\n            {\n                //making normally distributed sample with meanOfFirstSeries as Mean, and sqrtVarianceOfFirstSeries as Standard deviation\n                double p = 1.0 / (numPoints * numPoints) + ((double)j) / (numPoints);\n                double x = meanOfFirstSeries + sqrtVarianceOfFirstSeries * UtilityFunctions.InverseNormalDistribution(p);\n\n                //Adds the data point.\n                series1.Points.Add(x, 0);\n            }\n\n            //Turns on the histogram normal distribution curve.\n            series1.ConfigItems.HistogramItem.ShowNormalDistribution = true;\n\n            //Specifies the number of histogram intervals to be drawn.\n            series1.ConfigItems.HistogramItem.NumberOfIntervals = hintervals;\n\n            //Adds the series to the series collection of the chartcontrol.\n            this.chartControl1.Series.Add(series1);\n\n            //Initializes a new series with chart type as Histogram.\n            series2 = new ChartSeries();\n            series2.Name = \"Sample 2\";\n            series2.Type = ChartSeriesType.Histogram;\n            series2.Text = series2.Name;\n\n            for (int j = 0; j < numPoints; j++)\n            {\n                //making normally distributed sample\n                double p = 1.0 / (numPoints * numPoints) + ((double)j) / (numPoints);\n                double x = meanOfSecondSeries + sqrtVarianceOfSecondSeries * UtilityFunctions.InverseNormalDistribution(p);\n\n                //Adds the data point.\n                series2.Points.Add(x, 0);\n            }\n\n            //Turns on the histogram normal distribution curve.\n            series2.ConfigItems.HistogramItem.ShowNormalDistribution = true;\n\n            //Specifies the number of histogram intervals to be drawn.\n            series2.ConfigItems.HistogramItem.NumberOfIntervals = hintervals;\n\n            //Adds the series to the series collection of the chartcontrol.\n            this.chartControl1.Series.Add(series2);\n\n            if (this.comboBox1.SelectedIndex == 1)\n            {\n                //Initializes a new series with chart type as Histogram.\n                series3 = new ChartSeries();\n                series3.Name = \"sample 3\";\n                series3.Type = ChartSeriesType.Histogram;\n                series3.Text = series3.Name;\n\n                for (int j = 0; j < numPoints; j++)\n                {\n                    //making normally distributed sample\n                    double p = 1.0 / (numPoints * numPoints) + ((double)j) / (numPoints);\n                    double x = meanOfThirdSeries + sqrtVarianceOfThirdSeries * UtilityFunctions.InverseNormalDistribution(p);\n\n                    //Adds the data point.\n                    series3.Points.Add(x, 0);\n                }\n\n                //Turns on the histogram normal distribution curve.\n                series3.ConfigItems.HistogramItem.ShowNormalDistribution = true;\n\n                //Specifies the number of histogram intervals to be drawn.\n                series3.ConfigItems.HistogramItem.NumberOfIntervals = hintervals;\n\n                //Adds the series to the series collection of the chartcontrol.\n                this.chartControl1.Series.Add(series3);\n            }\n        }\n        #endregion\n\n        #region InitializeAnovaChartData\n        /// <summary>\n        /// Performes Anova Test on Chart Data.\n        /// </summary>\n        protected void InitializeAnovaChartData()\n        {\n            label5.Enabled = true;\n            numericUpDown5.Enabled = true;\n            label6.Enabled = true;\n            numericUpDown6.Enabled = true;\n\n            InitializeChartData(3, 50);\n\n            this.chartControl1.Text = \"ANOVA Test Sample\";\n            this.label5.Text = \"Sample 3 Mean\";\n            this.button1.Text = \"Perform Anova Test\";\n            this.toolTip1.SetToolTip(this.label31, \"Tests if the samples means are equal (The number of samples can be bigger than 2)\");\n        }\n        #endregion\n\n        #region InitializeFTestChartData\n        /// <summary>\n        /// Performes F Test of chart data.\n        /// </summary>\n        protected void InitializeFTestChartData()\n        {\n            if (!this.Panel2.Contains(this.button2))\n            {\n                label5.Enabled = false;\n                numericUpDown5.Enabled = false;\n                label6.Enabled = false;\n                numericUpDown6.Enabled = false;                \n            }\n\n            InitializeChartData(5, 40);\n            this.numericUpDown5.Visible = true;\n            this.chartControl1.Text = \"F Test Sample\";\n            this.button1.Text = \"Perform F Test\";\n            this.toolTip1.SetToolTip(this.label31, \"Tests if the samples variances are equal\");\n        }\n        #endregion\n\n        #region InitializeTTestChartData\n        /// <summary>\n        /// Performes T Test on Chart data.\n        /// </summary>\n        protected void InitializeTTestChartData()\n        {\n            InitializeChartData(5, 40);\n            label5.Enabled = true;\n            numericUpDown5.Enabled = true;\n            label6.Enabled = true;\n            numericUpDown6.Enabled = true;\n            this.chartControl1.Text = \"T Test Sample\";\n            this.label5.Text = \"Hyphotetized mean\\nDifference\";\n            this.button1.Text = \"Perform T Test\";\n            this.toolTip1.SetToolTip(this.label31, \"Tests if the samples means difference is equal to Hyphotetized mean difference\");\n        }\n        #endregion\n\n        #region InitializeZTestChartData\n        /// <summary>\n        /// Performes Z Test on Chart Data.\n        /// </summary>\n        protected void InitializeZTestChartData()\n        {\n            InitializeChartData(5, 40);\n            label5.Enabled = true;\n            numericUpDown5.Enabled = true;\n            label6.Enabled = true;\n            numericUpDown6.Enabled = true;\n            this.chartControl1.Text = \"Z Test Sample\";\n            this.label5.Text = \"Hyphotetized mean\\nDifference\";\n            this.button1.Text = \"Perform Z Test\";\n            this.toolTip1.SetToolTip(this.label31, \"Tests if the samples means difference is equal to Hyphotetized mean difference\");\n        }\n        #endregion\n\n        #region InitializeChartBasicStatisticalFunctions\n        /// <summary>\n        /// Performes basic statistical calculations on Chart data.\n        /// </summary>\n        protected void InitializeChartBasicStatisticalFunctions()\n        {\n            label5.Enabled = true;\n            numericUpDown5.Enabled = true;\n            label6.Enabled = true;\n            numericUpDown6.Enabled = true;\n\n            this.chartControl1.Series.Clear();\n\n            //Initializes a Column chart.\n            series1 = new ChartSeries();\n            series1.Name = \"Sample 1\";\n            series1.Type = ChartSeriesType.Column;\n            series1.Text = series1.Name;\n\n            //Adds the datapoints to the series.\n            series1.Points.Add(1, 345);\n            series1.Points.Add(2, 256);\n            series1.Points.Add(3, 491);\n            series1.Points.Add(4, 382);\n            series1.Points.Add(5, 437);\n\n            //Adds the series to the series collection of the chartcontrol.\n            this.chartControl1.Series.Add(series1);\n\n            //Initializes a Column chart.\n            series2 = new ChartSeries();\n            series2.Name = \"Sample 2\";\n            series2.Type = ChartSeriesType.Column;\n            series2.Text = series2.Name;\n\n            //Adds the datapoints to the series.\n            series2.Points.Add(1, 245);\n            series2.Points.Add(2, 156);\n            series2.Points.Add(3, 391);\n            series2.Points.Add(4, 282);\n            series2.Points.Add(5, 337);\n\n            //Adds the series to the series collection of the chartcontrol.\n            this.chartControl1.Series.Add(series2);\n\n            this.chartControl1.PrimaryXAxis.Title = \"X Values\";\n            this.chartControl1.PrimaryYAxis.Title = \"Y Values\";\n            this.chartControl1.Text = \"Basic Statistical Functions\";\n            this.label5.Text = \"Hyphotetized mean \\nDifference\";\n            CalculateValues(series1);\n        }\n        #endregion\n\n        #region CalculateValues\n        //Calculates and displays the statistical values.\n        protected void CalculateValues(ChartSeries series)\n        {\n            string val = \"\";\n\n            val += \"Mean = \" + BasicStatisticalFormulas.Mean(series).ToString() + \"\\r\\n\";\n            val += \"Median = \" + BasicStatisticalFormulas.Median(series).ToString() + \"\\r\\n\";\n            val += \"Standard Deviation = \" + BasicStatisticalFormulas.StandardDeviation(series, true).ToString() + \"\\r\\n\";\n            val += \"Variance = \" + BasicStatisticalFormulas.Variance(series, true).ToString() + \"\\r\\n\";\n            val += \"Variance Based Estimator = \" + BasicStatisticalFormulas.VarianceBiasedEstimator(series).ToString() + \"\\r\\n\";\n            val += \"Variance UnBased Estimator = \" + BasicStatisticalFormulas.VarianceUnbiasedEstimator(series).ToString() + \"\\r\\n\";\n            val += \"Correlation Co-efficient = \" + BasicStatisticalFormulas.Correlation(this.chartControl1.Series[0], this.chartControl1.Series[1]).ToString() + \"\\r\\n\";\n            val += \"Covariance = \" + BasicStatisticalFormulas.Covariance(this.chartControl1.Series[0], this.chartControl1.Series[1]).ToString() + \"\\r\\n\";\n\n            this.richTextBox1.Text = val;\n        }\n        #endregion\n        #endregion\n\n        #region Events\n        private void numericUpDown1_ValueChanged(object sender, System.EventArgs e)\n        {\n            meanOfFirstSeries = (double)numericUpDown1.Value;\n            UpdateChart();\n        }\n\n        private void numericUpDown2_ValueChanged(object sender, System.EventArgs e)\n        {\n            meanOfSecondSeries = (double)numericUpDown2.Value;\n            UpdateChart();\n        }\n\n        private void numericUpDown3_ValueChanged(object sender, System.EventArgs e)\n        {\n            sqrtVarianceOfFirstSeries = (double)numericUpDown3.Value;\n            UpdateChart();\n        }\n\n        private void numericUpDown4_ValueChanged(object sender, System.EventArgs e)\n        {\n            sqrtVarianceOfSecondSeries = (double)numericUpDown4.Value;\n            UpdateChart();\n        }\n\n        private void comboBox1_SelectedIndexChanged(object sender, System.EventArgs e)\n        {\n            if (this.comboBox1.SelectedIndex == 0)\n                this.button1.Enabled = false;\n            else\n                this.button1.Enabled = true;\n            UpdateChart();\n        }\n\n        private void button1_Click(object sender, System.EventArgs e)\n        {\n            richTextBox1.Text = \"\";\n            double confidenceLevel = 0.05;\n            string s = \"\";\n\n            if (this.comboBox1.SelectedIndex == 4)\n            {\n                //Thus, lets perform the ZTest to test whether the difference is really guessed correctly.\n                ZTestResult ztr = BasicStatisticalFormulas.ZTest((double)numericUpDown5.Value,\n                    sqrtVarianceOfFirstSeries * sqrtVarianceOfFirstSeries,\n                    sqrtVarianceOfSecondSeries * sqrtVarianceOfSecondSeries,\n                    0.05,\n                    series1,\n                    series2);\n\n                s += \"ZValue = \" + ztr.ZValue.ToString() + \"\\n\";\n                s += \"ZCriticalValueOneTail = \" + ztr.ZCriticalValueOneTail.ToString() + \"\\n\";\n                s += \"ZCriticalValueTwoTail = \" + ztr.ZCriticalValueTwoTail.ToString() + \"\\n\";\n                s += \"ProbabilityZOneTail = \" + ztr.ProbabilityZOneTail.ToString() + \"\\n\";\n                s += \"ProbabilityZTwoTail = \" + ztr.ProbabilityZTwoTail.ToString() + \"\\n\";\n                s += \"FirstSeriesMean = \" + ztr.FirstSeriesMean.ToString() + \"\\n\";\n                s += \"FirstSeriesVariance = \" + ztr.FirstSeriesVariance.ToString() + \"\\n\";\n                s += \"SecondSeriesMean = \" + ztr.SecondSeriesMean.ToString() + \"\\n\";\n                s += \"SecondSeriesVariance = \" + ztr.SecondSeriesVariance.ToString() + \"\\n\";\n                s += \"\\n\";\n\n                if (Math.Abs(ztr.ZValue) < ztr.ZCriticalValueTwoTail)\n                {\n                    s += \"Z Test fails to prove that hyphotetized mean is wrong.\\n\";\n                    s += \"\\n\";\n                    s += \"Because ZValue is closer to zero than ZCriticalValueTwoTail, we can't deduce that hypothetized mean difference is wrong. \";\n                    s += \" Thus, there is probability that they are close to each other.\";\n                    s += \" This don't automatically proves that our sample means are equal, but rather indicates that we don't have enough data to prove that means are different or close enough. \";\n                }\n                else\n                {\n                    s += \"Z Test succeeds to prove that hyphotetized mean is wrong with probability \" + ((1.0 - 0.05).ToString()) + \".\\n\";\n                    s += \"\\n\";\n                    s += \"Because ZValue is farther from zero than ZCriticalValueTwoTail, we can deduce that hypothetized mean difference is wrong. \";\n                }\n            }\n            else if (this.comboBox1.SelectedIndex == 3)\n            {\n                //Thus, lets perform the TTest to test whether the difference is really guessed correctly.\n                TTestResult ttr = BasicStatisticalFormulas.TTestUnEqualVariances((double)numericUpDown5.Value,\n                    0.05,\n                    series1,\n                    series2);\n\n                s += \"TValue = \" + ttr.TValue.ToString() + \"\\n\";\n                s += \"TCriticalValueOneTail = \" + ttr.TCriticalValueOneTail.ToString() + \"\\n\";\n                s += \"TCriticalValueTwoTail = \" + ttr.TCriticalValueTwoTail.ToString() + \"\\n\";\n                s += \"ProbabilityTOneTail = \" + ttr.ProbabilityTOneTail.ToString() + \"\\n\";\n                s += \"ProbabilityTTwoTail = \" + ttr.ProbabilityTTwoTail.ToString() + \"\\n\";\n                s += \"FirstSeriesMean = \" + ttr.FirstSeriesMean.ToString() + \"\\n\";\n                s += \"FirstSeriesVariance = \" + ttr.FirstSeriesVariance.ToString() + \"\\n\";\n                s += \"SecondSeriesMean = \" + ttr.SecondSeriesMean.ToString() + \"\\n\";\n                s += \"SecondSeriesVariance = \" + ttr.SecondSeriesVariance.ToString() + \"\\n\";\n                s += \"\\n\";\n\n                if (Math.Abs(ttr.TValue) < ttr.TCriticalValueTwoTail)\n                {\n                    s += \"T Test fails to prove that hyphotetized mean is wrong.\\n\";\n                    s += \"\\n\";\n                    s += \"Because TValue is closer to zero than TCriticalValueTwoTail, we can't deduce that hypothetized mean difference is wrong. \";\n                    s += \" Thus, there is probability that they are close to each other.\";\n                    s += \" This don't automatically proves that our sample means are equal, but rather indicates that we don't have enough data to prove that means are different or close enough. \";\n                }\n                else\n                {\n                    s += \"T Test succeeds to prove that hyphotetized mean is wrong with probability \" + ((1.0 - 0.05).ToString()) + \".\\n\";\n                    s += \"\\n\";\n                    s += \"Because TValue is farther from zero than TCriticalValueTwoTail, we can deduce that hypothetized mean difference is wrong. \";\n                }\n            }\n\n            else if (this.comboBox1.SelectedIndex == 2)\n            {\n                //Thus, lets perform the FTest to test whether the difference is really guessed correctly.\n                FTestResult ttr = BasicStatisticalFormulas.FTest(\n                    confidenceLevel,\n                    series1,\n                    series2);\n\n                s += \"FValue = \" + ttr.FValue.ToString() + \"\\n\";\n                s += \"FCriticalValueOneTail = \" + ttr.FCriticalValueOneTail.ToString() + \"\\n\";\n                s += \"ProbabilityFOneTail = \" + ttr.ProbabilityFOneTail.ToString() + \"\\n\";\n                s += \"FirstSeriesMean = \" + ttr.FirstSeriesMean.ToString() + \"\\n\";\n                s += \"FirstSeriesVariance = \" + ttr.FirstSeriesVariance.ToString() + \"\\n\";\n                s += \"SecondSeriesMean = \" + ttr.SecondSeriesMean.ToString() + \"\\n\";\n                s += \"SecondSeriesVariance = \" + ttr.SecondSeriesVariance.ToString() + \"\\n\";\n                s += \"\\n\";\n\n                if (ttr.FValue <= 1.0)\n                {\n                    if (Math.Abs(ttr.FValue - 1.0) < Math.Abs(ttr.FCriticalValueOneTail - 1.0))\n                    {\n                        s += \"F Test fails to prove that first variance is smaller than second.\\n\";\n                        s += \"\\n\";\n                        s += \"Because FValue is closer to unity than FCriticalValueOneTail, we can't be sure enough that first sample variance is smaller than second. \";\n                    }\n                    else\n                    {\n                        s += \"F Test succeeds to prove (with probability \" + (1.0 - confidenceLevel).ToString() + \") that first sample variance is smaller than second.\\n\";\n                        s += \"\\n\";\n                        s += \"Because FValue is farther from unity than FCriticalValueOneTail, we can deduce that first sample variance is smaller than second.\\n\";\n                    }\n                }\n                else\n                {\n                    s += \"FValue is bigger than 1.0. So it is possible that first sample variance is bigger than second. \\n\";\n                    s += \"Exchange the sample order and test if the second sample variance is smaller than first sample variance.\\n\";\n                    s += \"\\n\";\n                }\n\n            }\n            else if (this.comboBox1.SelectedIndex == 1)\n            {\n                //Thus, lets perform the Anova Test to test whether the difference is really guessed correctly.\n                AnovaResult ar = BasicStatisticalFormulas.Anova(\n                    confidenceLevel,\n                    new ChartSeries[]{ series1,\n\t\t\t\t\t\t\t\t\t\t series2,\n\t\t\t\t\t\t\t\t\t\t series3});\n\n                s += \"FRatio = \" + ar.FRatio.ToString() + \"\\n\";\n                s += \"FCriticalValue = \" + ar.FCriticalValue.ToString() + \"\\n\";\n                s += \"DegreeOfFreedomBetweenGroups = \" + ar.DegreeOfFreedomBetweenGroups.ToString() + \"\\n\";\n                s += \"DegreeOfFreedomWithinGroups = \" + ar.DegreeOfFreedomWithinGroups.ToString() + \"\\n\";\n                s += \"DegreeOfFreedomTotal = \" + ar.DegreeOfFreedomTotal.ToString() + \"\\n\";\n                s += \"MeanSquareVarianceBetweenGroups = \" + ar.MeanSquareVarianceBetweenGroups.ToString() + \"\\n\";\n                s += \"MeanSquareVarianceWithinGroups = \" + ar.MeanSquareVarianceWithinGroups.ToString() + \"\\n\";\n                s += \"SumOfSquaresBetweenGroups = \" + ar.SumOfSquaresBetweenGroups.ToString() + \"\\n\";\n                s += \"SumOfSquaresWithinGroups = \" + ar.SumOfSquaresWithinGroups.ToString() + \"\\n\";\n                s += \"SumOfSquaresTotal = \" + ar.SumOfSquaresTotal.ToString() + \"\\n\";\n                s += \"\\n\";\n\n                if (ar.FRatio < ar.FCriticalValue)\n                {\n                    s += \"Anova test fails to prove that there is inequality between sample means.\\n\";\n                    s += \"\\n\";\n                    s += \"Because FRatio is smaller than FCriticalValue, we can't be sure enough that means are unequal. \";\n                }\n                else\n                {\n                    s += \"Anova succeeds to prove (with probability \" + (1.0 - confidenceLevel).ToString() + \") that first there is inequality between sample means.\\n\";\n                    s += \"\\n\";\n                    s += \"Because FRatio is bigger than FCriticalValue, we can deduce that there is at least one inequality between means.\\n\";\n                }\n            }\n            richTextBox1.Text = s;\n            if (this.comboBox1.SelectedIndex == 0)\n                CalculateValues(this.chartControl1.Series[0]);\n        }\n\n        private void button2_Click(object sender, System.EventArgs e)\n        {\n\n            double tvar = sqrtVarianceOfSecondSeries;\n            double tmean = meanOfSecondSeries;\n\n            sqrtVarianceOfSecondSeries = sqrtVarianceOfFirstSeries;\n            meanOfSecondSeries = meanOfFirstSeries;\n\n            sqrtVarianceOfFirstSeries = tvar;\n            meanOfFirstSeries = tmean;\n\n            InitializeFTestChartData();\n            RefreshNumerciUpDowns();\n        }\n\n        /// <summary>\n        /// Refreshes numeric up down controls for F Test on chart data.\n        /// </summary>\n        private void RefreshNumerciUpDowns()\n        {\n            numericUpDown1.Value = (int)meanOfFirstSeries;\n            numericUpDown2.Value = (int)meanOfSecondSeries;\n            numericUpDown3.Value = (int)sqrtVarianceOfFirstSeries;\n            numericUpDown4.Value = (int)sqrtVarianceOfSecondSeries;\n        }\n\n        private void numericUpDown6_ValueChanged(object sender, System.EventArgs e)\n        {\n            meanOfThirdSeries = (double)numericUpDown6.Value;\n            UpdateChart();\n        }\n\n        private void numericUpDown5_ValueChanged(object sender, System.EventArgs e)\n        {\n            sqrtVarianceOfThirdSeries = (double)numericUpDown5.Value;\n            UpdateChart();\n        }\n\n        private void checkBox1_CheckedChanged(object sender, System.EventArgs e)\n        {\n            this.chartControl1.Series3D = this.checkBox1.Checked;\n        }\n        #endregion\n               \n    }\n}\n"
    }
  ]
}