@Test
public void testCDF() throws Exception {

    NormalDist dist = new NormalDist();
    double cdf;
    cdf = dist.cdf(0.0, 1.0, 0.5);
    assertEquals(0.6915, cdf, 0.001);
    cdf = dist.cdf(5.0, 2.0, 4.0);
    assertEquals(0.3085, cdf, 0.001);
    // Test interpolation
    cdf = dist.cdf(0.0, 1.0, 0.755);
    assertEquals(0.7749, cdf, 0.001);
    // Test max z-score
    cdf = dist.cdf(0.0, 1.0, 4.0);
    assertEquals(1.0, cdf, 0.001);
    // Test min z-score
    cdf = dist.cdf(0.0, 1.0, -4.0);
    assertEquals(0.0, cdf, 0.001);
}