private static void testNormal(GeneralContinuousDistribution normal)
{
double mean = normal.Mean; // 4.0
double median = normal.Median; // 4.0
double var = normal.Variance; // 17.64
double cdf = normal.DistributionFunction(x: 1.4); // 0.26794249453351904
double pdf = normal.ProbabilityDensityFunction(x: 1.4); // 0.078423391448155175
double lpdf = normal.LogProbabilityDensityFunction(x: 1.4); // -2.5456330358182586
double ccdf = normal.ComplementaryDistributionFunction(x: 1.4); // 0.732057505466481
double icdf = normal.InverseDistributionFunction(p: cdf); // 1.4
double hf = normal.HazardFunction(x: 1.4); // 0.10712736480747137
double chf = normal.CumulativeHazardFunction(x: 1.4); // 0.31189620872601354
Assert.AreEqual(4.0, mean);
Assert.AreEqual(4.0, median);
Assert.AreEqual(17.64, var);
Assert.AreEqual(0.31189620872601354, chf);
Assert.AreEqual(0.26794249453351904, cdf);
Assert.AreEqual(0.078423391448155175, pdf);
Assert.AreEqual(-2.5456330358182586, lpdf);
Assert.AreEqual(0.10712736480747137, hf);
Assert.AreEqual(0.732057505466481, ccdf);
Assert.AreEqual(1.4, icdf);
}