DecimalFormat df = new DecimalFormat("#.##");
msgBuffer.append("Chisquare test failed");
msgBuffer.append(" p-value = ");
msgBuffer.append(chiSquareTest.chiSquareTest(expected, observed));
msgBuffer.append(" chisquare statistic = ");
msgBuffer.append(chiSquareTest.chiSquare(expected, observed));
msgBuffer.append(". \n");
msgBuffer.append("value\texpected\tobserved\n");
for (int i = 0; i < expected.length; i++) {
msgBuffer.append(valueLabels[i]);
msgBuffer.append("\t");