using System; using System.Collections.Generic; using System.Linq; using System.Text; using S = Science.Statistics.BasicStatistics; namespace Statistics4Ed.Chapter26.SetC { public class Exercise04 { public Exercise04() { } private string result; public string Result { get{return result;} } public void Compute() { S.StandardDeviationAndAverage sda = new S.StandardDeviationAndAverage(); sda.Average = 50.0; sda.StandardDeviation = 25.0; // null hypothesis S.StandardErrorAndExpectedValue s = new S.StandardErrorAndExpectedValue(sda, 400); S.ObservedValue ov = new S.ObservedValue(); ov.Average = 52.7; S.OneSampleZTest test = new S.OneSampleZTest(s, ov); result += test.zValue.ToString() + " "; result += test.PValue.ToString() + " "; result += test.Conclusion + "\r\n"; } } } /* 2.16 1.53863347841352 Reject null at 5% level. */