### Question:
LogNormalDistribution extends AbstractContinuousDistribution { @Override public double density(double x) { if (x <= 0) { return 0; } final double x0 = Math.log(x) - scale; final double x1 = x0 / shape; return Math.exp(-0.5 * x1 * x1) / (shape * SQRT2PI * x); } LogNormalDistribution(double scale,
                                 double shape); double getScale(); double getShape(); @Override double density(double x); @Override double logDensity(double x); @Override double cumulativeProbability(double x); @Override double probability(double x0,
                              double x1); @Override double getMean(); @Override double getVariance(); @Override double getSupportLowerBound(); @Override double getSupportUpperBound(); @Override boolean isSupportConnected(); @Override ContinuousDistribution.Sampler createSampler(final UniformRandomProvider rng);  }### Answer:
@Test void testDensity() { final 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}); }