throws NotPositiveException, NotStrictlyPositiveException,
DimensionMismatchException, MaxCountExceededException {
ChiSquaredDistribution distribution =
new ChiSquaredDistribution(expected.length - 1.0);
return 1.0 - distribution.cumulativeProbability(chiSquare(expected, observed));
}
/**
* Performs a <a href="http://www.itl.nist.gov/div898/handbook/eda/section3/eda35f.htm">
* Chi-square goodness of fit test</a> evaluating the null hypothesis that the