The degree of freedom for a Person's X^2 test is (I-1)*(J-1) and it is obtained by (IJ-1) -([I-1]+[J-1]) =(I-1)(J-1).
I am just wondering why it is (IJ-1) -([I-1]+[J-1])??
What is (IJ-1) referred to and what is [I-1]+[J-1] referred to and why do we use the difference of those two terms?
I go through some online material, but most of them just directly state that the df is (I-1)(J-1) without process.
My personal thought is (IJ-1) is refers to the situation when the X Y variable is independent and (I-1)(J-1)is referred to the situation when they are not independent.
I am just quite curious about the process and I am not very familiar with X^2 distribution and degree of freedom.
Thank you. : )