@Override
    public double p(double x) {
        double e = Math.exp(-(x - mu) / scale);
        return e / (scale * (1.0 + e) * (1.0 + e));
    }
@Test
    public void testP() {
        System.out.println("p");
        LogisticDistribution instance = new LogisticDistribution(2.0, 1.0);
        instance.rand();
        assertEquals(0.1050736, instance.p(0.001), 1E-7);
        assertEquals(0.1057951, instance.p(0.01), 1E-7);
        assertEquals(0.1131803, instance.p(0.1), 1E-7);
        assertEquals(0.1217293, instance.p(0.2), 1E-7);
        assertEquals(0.1491465, instance.p(0.5), 1E-7);
        assertEquals(0.1966119, instance.p(1.0), 1E-7);
        assertEquals(0.25,      instance.p(2.0), 1E-7);
        assertEquals(0.04517666, instance.p(5.0), 1E-7);
        assertEquals(0.0003352377, instance.p(10.0), 1E-7);
    }