using System; using System.Collections.Generic; using S = Science.Statistics.BasicStatistics; namespace ScienceTest.StatisticsTest.BasicStatisticsTest { public class OneSampleChiSquareTestTest { public OneSampleChiSquareTestTest() { } private string result; public string Result { get{return result;} } public void Compute() { S.FrequencyTable table = new S.FrequencyTable(); table.Add(4, 10); table.Add(6, 10); table.Add(17, 10); table.Add(16, 10); table.Add(8, 10); table.Add(9, 10); result += table.ToString(); S.OneSampleChiSquareTest chitest = new S.OneSampleChiSquareTest(table, 5); result += chitest.DegreesOfFreedom.ToString() + " "; result += chitest.ChiSquare.ToString() + " "; result += chitest.PValue + "\r\n"; } } } /* 4 10 6 10 17 10 16 10 8 10 9 10 5 14.2 1.43876781765694 */