Accord.Tests.Statistics.ChiSquareTestTest.ConstructorTest_WithZero_NoNaN C# (CSharp) Method

ConstructorTest_WithZero_NoNaN() private method

private ConstructorTest_WithZero_NoNaN ( ) : void
return void
        public void ConstructorTest_WithZero_NoNaN()
        {
            double[] observed = { 639, 0 };
            double[] expected = { 660, 0 };

            int degreesOfFreedom = 1;
            var chi = new ChiSquareTest(expected, observed, degreesOfFreedom);

            Assert.AreEqual(0.66818181818181821, chi.Statistic, 0.015);
            Assert.AreEqual(1, chi.DegreesOfFreedom);
            Assert.AreEqual(0.41368622699316782, chi.PValue, 1e-4);
        }
    }