chi2_goodness(A, B, alpha)
Computes a Chi-Square goodness of fit. Array A stores probabilities and array B stores corresponding observed frequencies. The test uses significance level alpha.
See also chi2_table chi2_independent
Example
p=(.1, .2, .3, .3, .1)
( 0.1 0.2 0.3 0.3 0.1 )
f=(3, 7, 9, 11, 2)
( 3 7 9 11 2 )
chi2_goodness(p,f,.05)
Chi-Square Goodness-of-fit Test.
Hypothesis test for goodness of fit.
Ho : Variable has the specified distribution
Ha : Variable does not have the specified distribution
Significance level : 0.05 (5.0%)
Results:
Test statistics X2 : 0.7604166666666667
Critical right value found is 9.487729036756633
P value is : 0.9436745964852309
Do not reject the null hypothesis.