public NormalDistStats scaleBy(double v) {
        double newMean = mean * v;
        double shiftAmount = newMean - mean;
        return new NormalDistStats(Math.max(0, mean + shiftAmount), stddev,
            Math.max(0, min + shiftAmount), Math.max(0, max + shiftAmount));
    }
@Test
    public void scaleBy() {
        NormalDistStats orig = new NormalDistStats(1.0, 0.5, 0.0, 2.0);
        assertNDSEquals(orig, orig.scaleBy(1.0));
        NormalDistStats expectedDouble = new NormalDistStats(2.0, 0.5, 1.0, 3.0);
        assertNDSEquals(expectedDouble, orig.scaleBy(2.0));
        NormalDistStats expectedHalf = new NormalDistStats(0.5, 0.5, 0.0, 1.5);
        assertNDSEquals(expectedHalf, orig.scaleBy(0.5));
    }