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

ConstructorTest4() private method

private ConstructorTest4 ( ) : void
return void
        public void ConstructorTest4()
        {
            double[] sample = 
            { 
                0.621, 0.503, 0.203, 0.477, 0.710, 0.581, 0.329, 0.480, 0.554, 0.382
            };

            var distribution = UniformContinuousDistribution.Standard;

            var chi = new ChiSquareTest(sample, distribution);

            Assert.AreEqual(0, chi.Statistic, 1e-6);
            Assert.AreEqual(3, chi.DegreesOfFreedom);
            Assert.AreEqual(1, chi.PValue, 1e-4);
            Assert.IsFalse(chi.Significant);
        }