I understanding that if Z1, Z2, …, Zk, are independent standard normal variables, then Z12 + Z22 + … + Zk2 has a χ² distribution with k degrees of freedom.
However, say we have a 2 rows and 3 columns, then we're taking (observed - expected)2 divided by expected for 6 cells. Why then is the degrees of freedom not 6?