Accord.Tests.Statistics.ZTestTest.ZTestConstructorTest3 C# (CSharp) Method

ZTestConstructorTest3() private method

private ZTestConstructorTest3 ( ) : void
return void
        public void ZTestConstructorTest3()
        {
            // Example from http://science.kennesaw.edu/~jdemaio/1107/hypothesis_testing.htm

            double mean = 53;
            double stdDev = 8;
            int samples = 49;

            double hypothesizedMean = 58;

            // Null Hypothesis: mean = 58
            // Alternative    : mean > 58

            OneSampleHypothesis hypothesis = OneSampleHypothesis.ValueIsGreaterThanHypothesis;
            ZTest target = new ZTest(mean, stdDev, samples, hypothesizedMean, hypothesis);

            Assert.AreEqual(-4.38, target.Statistic, 0.01);
            Assert.AreEqual(OneSampleHypothesis.ValueIsGreaterThanHypothesis, target.Hypothesis);
            Assert.AreEqual(DistributionTail.OneUpper, target.Tail);
            Assert.IsFalse(target.Significant);
        }