Examples - pi.science.hypothesistesting.PIDAgostinoPearson
1. How to check if sample belongs to a normal distribution using D`Agostino-Pearson test ?
PIVariable var = new PIVariable();
var.AddValues( new int[] { 34, 56, 39, 71, 84, 92, 44, 67, 98, 49, 55, 73,
50, 62, 75, 44, 88, 53, 61, 25, 36, 66, 77, 35 } );
PIDAgostinoPearson test = new PIDAgostinoPearson( var );
test.Evaluate();
Console.WriteLine( "Z value = " + test.Z );
Console.WriteLine( "p-value = " + test.PValue );
Console.WriteLine( test.ToString() );
Output:
Z value = 0,90425586277437
p-value = 0,636272765260617
The sample belongs to a normal distribution -> accepted (0,05).