@Test
public void univariateMeanTest() {

    // Test that the probability at mean is roughly 1 / sqrt(2 * variance * PI)
    double[][] meanCovN = {
            {0, 1, 100},
            {0, 1, 1000},
            {0, 1, 10000},
            {0, 1, 10001},
            {0, 1, 100001},
            {0, 1, 1000100},
            {0, 1, 10001003},
            {0, 2, 1000100},
            {0, 3, 10001003},
            {1.3, 3, 10001003},
            {1.3, 3.2, 10001003},
            {5.3, 8.2, 10001004},
    };
    MultivariateTDistribution multiT;
    RealVector v = new ArrayRealVector(1);
    for (double[] mCN : meanCovN) {
        v.setEntry(0, mCN[0]);
        double var = mCN[1];
        multiT = new MultivariateTDistribution(
                v,
                MatrixUtils.createRealIdentityMatrix(1).scalarMultiply(var),
                (int) mCN[2]);
        assertEquals(1. / Math.sqrt(2 * var * Math.PI), multiT.density(v), 1e-3);
    }
}