using System; using System.Collections.Generic; using S = Science.Statistics.BasicStatistics; namespace ScienceTest.StatisticsTest.BasicStatisticsTest { public class CentralLimitTheoremRouletteTest { public CentralLimitTheoremRouletteTest() { } private string result; public string Result { get{return result;} } public void Compute() { S.BoxModel roulette = new S.BoxModel(); roulette.AddTicket(-1.0, 20); roulette.AddTicket(1.0, 18); roulette.NumberOfDraws = 100; S.StandardErrorAndExpectedValue se = new S.StandardErrorAndExpectedValue(roulette); S.CentralLimitTheorem th = new S.CentralLimitTheorem(roulette); result += (50.0 - th.AreaBetween(se.ExpectedValueForSum, 0.0)).ToString() + " "; result += se.ExpectedValueForSum.ToString() + "\r\n"; } } } // 29.908072634178 -5.26315789473684