public static TestResult RunPairedTest(List <double> x, List <double> y, PairedTest pt) { BivariateSample s = new BivariateSample(); s.Add(x, y); switch (pt) { case PairedTest.KendallTau: return(s.KendallTauTest()); case PairedTest.PearsonR: return(s.PearsonRTest()); case PairedTest.SpearmanRho: return(s.SpearmanRhoTest()); case PairedTest.StudentT: return(s.PairedStudentTTest()); default: return(null); } }
protected void TestDoWorkPaired(PairedTest pt) { List <double> x = new List <double> (); List <double> y = new List <double> (); ExtractXYLists(DataToProcess.GetRankedList(), x, y); TestResult ts = StatsTester.RunPairedTest(x, y, pt); Gtk.Application.Invoke(delegate { covStatLabel.Text = ts.Statistic.ToString("G7"); covLProbLabel.Text = ts.LeftProbability.ToString("e2"); covRProbLabel.Text = ts.RightProbability.ToString("e2"); if (ts.Statistic > 0) { covRProbLabel.Text += " *"; } else { covLProbLabel.Text += " *"; } }); }