NormalDistribution extends AbstractRealDistribution { public double density(double x) { return FastMath.exp(logDensity(x)); } NormalDistribution();  NormalDistribution(double mean, double sd);  NormalDistribution(double mean, double sd, double inverseCumAccuracy);  NormalDistribution(RandomGenerator rng, double mean, double sd);  NormalDistribution(RandomGenerator rng,
                              double mean,
                              double sd,
                              double inverseCumAccuracy); double getMean(); double getStandardDeviation(); double density(double x); @Override double logDensity(double x); double cumulativeProbability(double x); @Override double inverseCumulativeProbability(final double p); @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.05399096651, 0.24197072452, 0.39894228040, 0.24197072452, 0.05399096651}); checkDensity(1.1, 1, x, new double[]{0.003266819056,0.043983595980,0.217852177033,0.396952547477,0.266085249899}); }