@Test public void testVariance() { System.out.println("variance"); ShiftedGeometricDistribution instance = new ShiftedGeometricDistribution(0.3); instance.rand(); assertEquals(0.7/0.09, instance.variance(), 1E-7); }
@Override public double variance() { return (1 - p) / (p * p); }
ShiftedGeometricDistribution extends DiscreteDistribution implements DiscreteExponentialFamily { @Override public double variance() { return (1 - p) / (p * p); } }
ShiftedGeometricDistribution extends DiscreteDistribution implements DiscreteExponentialFamily { @Override public double variance() { return (1 - p) / (p * p); } ShiftedGeometricDistribution(double p); }
ShiftedGeometricDistribution extends DiscreteDistribution implements DiscreteExponentialFamily { @Override public double variance() { return (1 - p) / (p * p); } ShiftedGeometricDistribution(double p); static ShiftedGeometricDistribution fit(int[] data); @Override int length(); @Override double mean(); @Override double variance(); @Override double sd(); @Override double entropy(); @Override String toString(); @Override double rand(); @Override double p(int k); @Override double logp(int k); @Override double cdf(double k); @Override double quantile(double p); @Override DiscreteMixture.Component M(int[] x, double[] posteriori); }
ShiftedGeometricDistribution extends DiscreteDistribution implements DiscreteExponentialFamily { @Override public double variance() { return (1 - p) / (p * p); } ShiftedGeometricDistribution(double p); static ShiftedGeometricDistribution fit(int[] data); @Override int length(); @Override double mean(); @Override double variance(); @Override double sd(); @Override double entropy(); @Override String toString(); @Override double rand(); @Override double p(int k); @Override double logp(int k); @Override double cdf(double k); @Override double quantile(double p); @Override DiscreteMixture.Component M(int[] x, double[] posteriori); final double p; }