LogNormalDistribution extends AbstractRealDistribution { public double density(double x) { if (x <= 0) { return 0; } final double x0 = FastMath.log(x) - scale; final double x1 = x0 / shape; return FastMath.exp(-0.5 * x1 * x1) / (shape * SQRT2PI * x); } LogNormalDistribution();  LogNormalDistribution(double scale, double shape);  LogNormalDistribution(double scale, double shape, double inverseCumAccuracy);  LogNormalDistribution(RandomGenerator rng, double scale, double shape);  LogNormalDistribution(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); @Override double probability(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(0, 1, x, new double[] { 0.0000000000, 0.0000000000, 0.0000000000, 0.3989422804, 0.1568740193 }); checkDensity(1.1, 1, x, new double[] { 0.0000000000, 0.0000000000, 0.0000000000, 0.2178521770, 0.1836267118}); }