Examples - pi.science.hypothesistesting.PIJarqueBera
1. How to check if sample belongs to a normal distribution using Jarque-Bera test ?
PIVariable var = new PIVariable(); var.AddValues( new int[] { 56, 58, 60, 64, 54, 52, 50, 40, 57, 53, 65, 50, 53, 52, 66, 45, 55, 54, 65, 56, 55, 57, 48, 63, 51, 55, 44, 58, 54, 60 } ); PIJarqueBera test = new PIJarqueBera( var ); test.Evaluate(); Console.WriteLine( "Z value = " + test.Z ); Console.WriteLine( "p-value = " + test.PValue ); Console.WriteLine( test.ToString() );
Output:
Z value = 0,248769461010152 p-value = 0,883040043079875 The sample belongs to a normal distribution -> accepted (0,05).