@Test public void testSd() { System.out.println("sd"); BinomialDistribution instance = new BinomialDistribution(100, 0.3); instance.rand(); assertEquals(Math.sqrt(21.0), instance.sd(), 1E-7); }
@Override public double sd() { return Math.sqrt(n * p * (1 - p)); }
BinomialDistribution extends DiscreteDistribution { @Override public double sd() { return Math.sqrt(n * p * (1 - p)); } }
BinomialDistribution extends DiscreteDistribution { @Override public double sd() { return Math.sqrt(n * p * (1 - p)); } BinomialDistribution(int n, double p); }
BinomialDistribution extends DiscreteDistribution { @Override public double sd() { return Math.sqrt(n * p * (1 - p)); } BinomialDistribution(int n, double p); @Override int length(); @Override double mean(); @Override double variance(); @Override double sd(); @Override double entropy(); @Override String toString(); @Override double p(int k); @Override double logp(int k); @Override double cdf(double k); @Override double quantile(double p); @Override double rand(); }
BinomialDistribution extends DiscreteDistribution { @Override public double sd() { return Math.sqrt(n * p * (1 - p)); } BinomialDistribution(int n, double p); @Override int length(); @Override double mean(); @Override double variance(); @Override double sd(); @Override double entropy(); @Override String toString(); @Override double p(int k); @Override double logp(int k); @Override double cdf(double k); @Override double quantile(double p); @Override double rand(); final double p; final int n; }