private void btnStat_Click(object sender, EventArgs e) { if (chart1.Series.Count != 2) { _MessageService.ShowWarning(this, "Two series are required!"); } else { var xx = (from pt in chart1.Series[0].Points select pt.YValues[0]).ToArray(); var yy = (from pt in chart1.Series[1].Points select pt.YValues[0]).ToArray(); if (xx.Length != yy.Length) { return; } lvStatistics.Items[0].SubItems[3].Text = MyStatisticsMath.Mse(xx, yy).ToString("F3"); lvStatistics.Items[1].SubItems[3].Text = MyStatisticsMath.RMse(xx, yy).ToString("F3"); lvStatistics.Items[2].SubItems[3].Text = MyStatisticsMath.Correlation(xx, yy).ToString("F3"); lvStatistics.Items[3].SubItems[3].Text = MyStatisticsMath.NashStucliffeR(xx, yy).ToString("F3"); // lvStatistics.Items[4].SubItems[3].Text = MyStatisticsMath.GetSimilarityScore(xx, yy).ToString("F3"); } }