In this case, the expected value would be 5/10 × (-2) + 2/10 × 1 + 3/10 × 0 = -0.8. How do you calculate the expected value in a chi-square? To calculate the expected value for a given cell in a two-way table: Sum the numbers in the cell's row. Sum the numbers ...
chi-square statistic goes with col 1 much more and col 2 much less than expected (unless Mike flipped columns) and the P-value on 2 df is negligible: : chi2tail(2, sum((f - fhat):^2 :/ fhat)) 0 : strofreal(chi2tail(2, sum((f - fhat):^2 :/ fhat)), "%21x") +...
Use a table (or computer program) to calculate the P value. You need to know that the number of degrees of freedom equals the number of categories minus 1. When there are only two categories, some statisticians recommend using the Yates' correction. Reduces the value of chi-square so incre...