public void MultinomialTestConstructorTest()
{
// Example from http://www.stat.berkeley.edu/~stark/SticiGui/Text/chiSquare.htm
int[] sample = { 45, 41, 9 };
double[] hypothesizedProportion = { 18 / 38.0, 18 / 38.0, 2 / 38.0 };
MultinomialTest target = new MultinomialTest(sample, hypothesizedProportion);
Assert.AreEqual(18 / 38.0, target.HypothesizedProportions[0]);
Assert.AreEqual(18 / 38.0, target.HypothesizedProportions[1]);
Assert.AreEqual(2 / 38.0, target.HypothesizedProportions[2]);
Assert.AreEqual(45 / 95.0, target.ObservedProportions[0]);
Assert.AreEqual(41 / 95.0, target.ObservedProportions[1]);
Assert.AreEqual(9 / 95.0, target.ObservedProportions[2]);
Assert.AreEqual(3.55555556, target.Statistic, 1e-5);
}