Package org.jquantlib.math.distributions

Examples of org.jquantlib.math.distributions.InverseCumulativePoisson


    }

    @Test
    public void testInverseCumulativePoissonDistribution() {
        QL.info("running InverseCumulativePoissonDistribution test ....");
        final InverseCumulativePoisson icp = new InverseCumulativePoisson(1.0);
        final double data[] = { 0.2, 0.5, 0.9, 0.98, 0.99, 0.999, 0.9999, 0.99995,
                0.99999, 0.999999, 0.9999999, 0.99999999 };

        for (int i = 0; i < data.length; i++) {
            if (!Closeness.isClose(icp.op(data[i]), i)) {
                fail("failed to reproduce known value for x = " + data[i]
                                                                       + "\n" + "calculated: " + data[i] + "\n" + "expected: "
                                                                       + i);
            }
        }
View Full Code Here


     NonCentralChiSquaredDistribution ncd = new NonCentralChiSquaredDistribution(df,ncp);
     return ncd.op(x);

}
    public static double evaluateInverseCumulativePoisson(double lambda, double x) {
        InverseCumulativePoisson icp = new InverseCumulativePoisson(lambda);
        return icp.op(x);

    }
View Full Code Here

TOP

Related Classes of org.jquantlib.math.distributions.InverseCumulativePoisson

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.