Accord.Tests.Statistics.FDistributionTest.InverseDistributionFunctionTest C# (CSharp) Method

InverseDistributionFunctionTest() private method

private InverseDistributionFunctionTest ( ) : void
return void
        public void InverseDistributionFunctionTest()
        {

            double[] cdf = 
            {
                0.231238, 0.404508, 0.605516, 0.86038, 1.20711, 1.71825, 2.5611, 4.23607, 9.24342
            };

            FDistribution target = new FDistribution(4, 2);

            for (int i = 0; i < cdf.Length; i++)
            {
                double x = (i + 1) / 10.0;
                double actual = target.InverseDistributionFunction(x);
                double expected = cdf[i];

                Assert.AreEqual(expected, actual, 1e-5);
                Assert.IsFalse(double.IsNaN(actual));
            }
        }