Package com.nr.sf

Examples of com.nr.sf.Binomialdist.cdf()


    sum=0.0;
    localflag=false;
    for (i=0;i<n;i++) {
      sum += dist3.p(i);
      c[i]=sum;
      d[i]=dist3.cdf(i+1);
//      System.out.printf(c[i]-d[i]);
      localflag = localflag || abs(c[i]-d[i]) > sbeps;
    }
    globalflag = globalflag || localflag;
    if (localflag) {
View Full Code Here


    n=10; p=0.4;
    Binomialdist normc=new Binomialdist(n,p);
    sbeps=5.0e-14;
    localflag=false;
    for (i=1;i<10;i++) {
      a=normc.cdf(i);
      jb=normc.invcdf(a);
//      if (abs(i-jb) > sbeps) {
//        System.out.printf(setprecision(15) << i << " %f\n", jb << " %f\n", abs(i-jb));
//      }
      localflag = localflag || (i-jb) != 0 && (i-jb-1) != 0;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.