ParetoDistribution extends AbstractRealDistribution { public double density(double x) { if (x < scale) { return 0; } return FastMath.pow(scale, shape) / FastMath.pow(x, shape + 1) * shape; } ParetoDistribution();  ParetoDistribution(double scale, double shape);  ParetoDistribution(double scale, double shape, double inverseCumAccuracy);  ParetoDistribution(RandomGenerator rng, double scale, double shape);  ParetoDistribution(RandomGenerator rng,
                              double scale,
                              double shape,
                              double inverseCumAccuracy); double getScale(); double getShape(); double density(double x); @Override double logDensity(double x); double cumulativeProbability(double x); @Override @Deprecated double cumulativeProbability(double x0, double x1); double getNumericalMean(); double getNumericalVariance(); double getSupportLowerBound(); double getSupportUpperBound(); boolean isSupportLowerBoundInclusive(); boolean isSupportUpperBoundInclusive(); boolean isSupportConnected(); @Override double sample(); static final double DEFAULT_INVERSE_ABSOLUTE_ACCURACY; }
@Test public void testDensity() { double [] x = new double[]{-2, -1, 0, 1, 2}; checkDensity(1, 1, x, new double[] { 0.00, 0.00, 0.00, 1.00, 0.25 }); checkDensity(1.1, 1, x, new double[] { 0.000, 0.000, 0.000, 0.000, 0.275 }); }