chi2_yates(M, alpha)

Computes a Chi-Square independence test using the Yates continuity correction. The contingency table is stored in matrix M and alpha is the significance level.


See also chi2_goodness chi2_yates chi2_table chi2_totable 


Example


M

     0      "Abstain" "1-60" "Over 60" "Total" 

  "Single"     67      213      74       354   

  "Married"    411     633      129     1173   

  "Widowed"    85       51       7       143   

 "Divorced"    27       60      15       102   

  "Total"      590     957      225     1772   


chi2_yates(M, .05)


Chi-Square Independence Test.

Hypothesis test for association.

Ho : The two variables are not associated

Ha : The two variables are associated

Significance level : 0.05 (5.0%)

Results:

Test statistics X2 : 90.7632811398081

Critical right value found is 12.591587243731063

P value is : 0.0

Reject the null hypothesis.