@Override
    public double mean() {
        return (1 - p) / p;
    }
@Test
    public void testMean() {
        System.out.println("mean");
        GeometricDistribution instance = new GeometricDistribution(0.3);
        instance.rand();
        assertEquals(2.333333, instance.mean(), 1E-6);
    }