@Override
    public double sd() {
        return Math.sqrt(r * (1 - p)) / p;
    }
@Test
    public void testSd() {
        System.out.println("sd");
        NegativeBinomialDistribution instance = new NegativeBinomialDistribution(3, 0.3);
        instance.rand();
        assertEquals(Math.sqrt(7/0.3), instance.sd(), 1E-7);
    }