@Override
    public double variance() {
        return (1 - p) / (p * p);
    }
@Test
    public void testVariance() {
        System.out.println("variance");
        GeometricDistribution instance = new GeometricDistribution(0.3);
        instance.rand();
        assertEquals(0.7/0.09, instance.variance(), 1E-7);
    }