@Test public void testCdf() { System.out.println("cdf"); WeibullDistribution instance = new WeibullDistribution(1.5, 1.0); instance.rand(); assertEquals(0.0, instance.cdf(0.0), 1E-7); assertEquals(0.03112801, instance.cdf(0.1), 1E-7); assertEquals(0.08555936, instance.cdf(0.2), 1E-7); assertEquals(0.2978115, instance.cdf(0.5), 1E-7); assertEquals(0.8407241, instance.cdf(1.5), 1E-7); assertEquals(0.9808, instance.cdf(2.5), 1E-7); assertEquals(0.999986, instance.cdf(5.0), 1E-6); }
@Override public double cdf(double x) { if (x <= 0) { return 0.0; } else { return 1 - Math.exp(-Math.pow(x / lambda, k)); } }
WeibullDistribution extends AbstractDistribution { @Override public double cdf(double x) { if (x <= 0) { return 0.0; } else { return 1 - Math.exp(-Math.pow(x / lambda, k)); } } }
WeibullDistribution extends AbstractDistribution { @Override public double cdf(double x) { if (x <= 0) { return 0.0; } else { return 1 - Math.exp(-Math.pow(x / lambda, k)); } } WeibullDistribution(double k);  WeibullDistribution(double k, double lambda); }
WeibullDistribution extends AbstractDistribution { @Override public double cdf(double x) { if (x <= 0) { return 0.0; } else { return 1 - Math.exp(-Math.pow(x / lambda, k)); } } WeibullDistribution(double k);  WeibullDistribution(double k, double lambda); @Override int length(); @Override double mean(); @Override double variance(); @Override double entropy(); @Override String toString(); @Override double rand(); @Override double p(double x); @Override double logp(double x); @Override double cdf(double x); @Override double quantile(double p); }
WeibullDistribution extends AbstractDistribution { @Override public double cdf(double x) { if (x <= 0) { return 0.0; } else { return 1 - Math.exp(-Math.pow(x / lambda, k)); } } WeibullDistribution(double k);  WeibullDistribution(double k, double lambda); @Override int length(); @Override double mean(); @Override double variance(); @Override double entropy(); @Override String toString(); @Override double rand(); @Override double p(double x); @Override double logp(double x); @Override double cdf(double x); @Override double quantile(double p); final double k; final double lambda; }