private void addTest2Out(DiscreteDistr d1, String label, FullResult reference)
        throws Exception
    {
        if ( reference == null ) return;
        DiscreteDistr d2 = reference.get(label);
        if ( d2 == null ) return;
        Set freedom = d1.combinedKeys(d2);
        if ( freedom.size() == 1 ) return;
        double gtest = d1.gtest(d2);
        if ( gtest == Double.POSITIVE_INFINITY ) return;
        double pochisq = SFunc.pochisq(gtest, freedom.size()-1);
        double changePerc = 100.0 * (1.0 - pochisq);
        out.value("_changePerc", String.format(Locale.US, "%.1f", changePerc));
    }