using System; using System.Collections.Generic; using System.Linq; using System.Text; using S = Science.Statistics.BasicStatistics; namespace Statistics4Ed.Chapter23.SetA { public class Exercise06 { public Exercise06() { } private string result; public string Result { get{return result;} } public void Compute() { S.BoxModel model = new S.BoxModel(); model.AddTicket(1.0); model.AddTicket(2.0); model.AddTicket(3.0); model.AddTicket(4.0); model.NumberOfDraws = 50; S.StandardErrorAndExpectedValue s = new S.StandardErrorAndExpectedValue(model); result += s.ExpectedValueForAverage.ToString() + " "; result += s.StandardErrorForAverage.ToString() + "\r\n"; S.NormalCurve nc = new S.NormalCurve(); double su = (2.75 - s.ExpectedValueForAverage) / s.StandardErrorForAverage; double area = nc.AreaBetween(-su, su); result += (area).ToString(); } } } /* 2.5 0.158113883008419 88.6153701993637 */