@Test public void testP() { System.out.println("p"); TDistribution instance = new TDistribution(20); instance.rand(); assertEquals(2.660085e-09, instance.p(-10.0), 1E-16); assertEquals(0.05808722, instance.p(-2.0), 1E-7); assertEquals(0.2360456, instance.p(-1.0), 1E-7); assertEquals(0.3939886, instance.p(0.0), 1E-7); assertEquals(0.2360456, instance.p(1.0), 1E-7); assertEquals(0.05808722, instance.p(2.0), 1E-7); assertEquals(2.660085e-09, instance.p(10.0), 1E-16); }
@Override public double p(double x) { return Math.exp(-np * Math.log(1.0 + x * x / nu) + fac) / Math.sqrt(Math.PI * nu); }
TDistribution extends AbstractDistribution { @Override public double p(double x) { return Math.exp(-np * Math.log(1.0 + x * x / nu) + fac) / Math.sqrt(Math.PI * nu); } }
TDistribution extends AbstractDistribution { @Override public double p(double x) { return Math.exp(-np * Math.log(1.0 + x * x / nu) + fac) / Math.sqrt(Math.PI * nu); } TDistribution(int nu); }
TDistribution extends AbstractDistribution { @Override public double p(double x) { return Math.exp(-np * Math.log(1.0 + x * x / nu) + fac) / Math.sqrt(Math.PI * nu); } TDistribution(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); double cdf2tiled(double x); double quantile2tiled(double p); }
TDistribution extends AbstractDistribution { @Override public double p(double x) { return Math.exp(-np * Math.log(1.0 + x * x / nu) + fac) / Math.sqrt(Math.PI * nu); } TDistribution(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); double cdf2tiled(double x); double quantile2tiled(double p); final int nu; }