@Test public void testP() { System.out.println("p"); ChiSquareDistribution instance = new ChiSquareDistribution(20); instance.rand(); assertEquals(0.0, instance.p(0), 1E-7); assertEquals(2.559896e-18, instance.p(0.1), 1E-22); assertEquals(1.632262e-09, instance.p(1), 1E-15); assertEquals(0.01813279, instance.p(10), 1E-7); assertEquals(0.0625550, instance.p(20), 1E-7); assertEquals(7.2997e-05, instance.p(50), 1E-10); assertEquals(5.190544e-13, instance.p(100), 1E-18); }
@Override public double p(double x) { if (x <= 0) { return 0.0; } else { return Math.exp(logp(x)); } }
ChiSquareDistribution extends AbstractDistribution implements ExponentialFamily { @Override public double p(double x) { if (x <= 0) { return 0.0; } else { return Math.exp(logp(x)); } } }
ChiSquareDistribution extends AbstractDistribution implements ExponentialFamily { @Override public double p(double x) { if (x <= 0) { return 0.0; } else { return Math.exp(logp(x)); } } ChiSquareDistribution(int nu); }
ChiSquareDistribution extends AbstractDistribution implements ExponentialFamily { @Override public double p(double x) { if (x <= 0) { return 0.0; } else { return Math.exp(logp(x)); } } ChiSquareDistribution(int nu); @Override int length(); @Override double mean(); @Override double variance(); @Override double sd(); @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); @Override Mixture.Component M(double[] x, double[] posteriori); }
ChiSquareDistribution extends AbstractDistribution implements ExponentialFamily { @Override public double p(double x) { if (x <= 0) { return 0.0; } else { return Math.exp(logp(x)); } } ChiSquareDistribution(int nu); @Override int length(); @Override double mean(); @Override double variance(); @Override double sd(); @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); @Override Mixture.Component M(double[] x, double[] posteriori); final int nu; }