public void StuartMaxwellTestConstructorTest()
{
// Example from http://www.john-uebersax.com/stat/mcnemar.htm#stuart
int[,] matrix =
{
{ 20, 10, 5 },
{ 3, 30, 15 },
{ 0, 5, 40 },
};
GeneralConfusionMatrix a = new GeneralConfusionMatrix(matrix);
StuartMaxwellTest target = new StuartMaxwellTest(a);
Assert.AreEqual(13.76, target.Statistic, 0.01);
Assert.AreEqual(2, target.DegreesOfFreedom);
Assert.AreEqual(0.001, target.PValue, 1e-4);
Assert.IsFalse(double.IsNaN(target.Statistic));
Assert.IsFalse(double.IsNaN(target.PValue));
}