% LMcs100501_4th.m
observed=[70 65;39 28;14 3;13 2];
% From contincy from stixbox toolbox
[p,chi2,expected] = contincy(observed, 'chi2')
[r,c]=size(observed);df=(r-1)*(c-1);
criticalval=chi2inv(.95,df)
if chi2>criticalval
    disp('Reject Ho')
else
    disp('Fail to reject Ho')
end
