@Override
    public double mean() {
        if (nu == 1) {
            throw new UnsupportedOperationException("Mean is undefined for T distribution with nu = 1");
        }

        return 0.0;
    }
@Test
    public void testMean() {
        System.out.println("mean");
        TDistribution instance = new TDistribution(20);
        instance.rand();
        assertEquals(0.0, instance.mean(), 1E-7);
    }