Package org.jquantlib.math.distributions

Examples of org.jquantlib.math.distributions.BivariateNormalDistribution$Eqn3


      final double y = 0.0;

      final double tolerance = 1.0e-15;
      for (final double element : rho) {
          for (Integer sgn=-1; sgn < 2; sgn+=2) {
              final BivariateNormalDistribution bvn= new BivariateNormalDistribution(sgn*element);
              final double expected = 0.25 + Math.asin(sgn*element) / (2*Math.PI) ;
              final double realised = bvn.op(x,y);

              if (Math.abs(realised-expected)>=tolerance)
                fail(" bivariate cumulative distribution\n"
                            + "    rho: " + sgn*element + "\n"
                            + "    expected:  " + expected + "\n"
View Full Code Here


        final double a = values[i][0];
        final double b = values[i][1];
        final double rho = values[i][2];
        final double result = values[i][3];

          final BivariateNormalDistribution bcd = new BivariateNormalDistribution(rho);
          final double value = bcd.op(a, b);

          final double tolerance = 1.0e-6;
          if (Math.abs(value-result) >= tolerance)
            fail(" bivariate cumulative distribution\n"
                      + "    case: " + i+1 + "\n"
View Full Code Here

TOP

Related Classes of org.jquantlib.math.distributions.BivariateNormalDistribution$Eqn3

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.