Degree of freedom in chi square