public void BinomialTestConstructorTest8()
{
// Example from Jeffrey S. Simonoff, Analyzing Categorical Data, pg 64
// Preview available: http://books.google.com.br/books?id=G8w_rifweAoC
BinomialTest target = new BinomialTest(8, 10, hypothesizedProbability: 0.4);
Assert.AreEqual(OneSampleHypothesis.ValueIsDifferentFromHypothesis, target.Hypothesis);
Assert.AreEqual(DistributionTail.TwoTail, target.Tail);
Assert.AreEqual(0.018236313600000005, target.PValue, 1e-4);
Assert.IsTrue(target.Significant);
target = new BinomialTest(7, 10, hypothesizedProbability: 0.4);
Assert.AreEqual(0.1010144256, target.PValue, 1e-4);
Assert.IsFalse(target.Significant);
target = new BinomialTest(9, 10, hypothesizedProbability: 0.4);
Assert.AreEqual(0.0015728640000000009, target.PValue, 1e-4);
Assert.IsTrue(target.Significant);
}