Accord.Tests.Statistics.BinomialTestTest.BinomialTestConstructorTest6 C# (CSharp) Method

BinomialTestConstructorTest6() private method

private BinomialTestConstructorTest6 ( ) : void
return void
        public void BinomialTestConstructorTest6()
        {
            double[] expected =
            {
                0.000000000000, 0.00000000000, 0.0000001539975, 0.00592949743, 
                0.514242625443, 0.25905439494, 0.0053806543164, 0.00001078919,
                0.000000003115, 0.00000000000, 0.0000000000000
            };

            for (int i = 0; i <= 10; i++)
            {
                double p = i / 100.0 * 5;
                BinomialTest target = new BinomialTest(51, 235, p);

                Assert.AreEqual(DistributionTail.TwoTail, target.Tail);
                Assert.AreEqual(expected[i], target.PValue, 1e-5);
            }
        }