Determining the degree of freedom for a chi-squared test on a strict avalanche criterion matrix I have read that the degree of freedom is calculated by subtracting 1 from the number of states a random variable can be in. I am performing a goodness of fit test on a 64*32 strict avalanche criterion matrix where the expected frequency of any a[i,j] is 50000 and the observed frequency can lie between [0,100000].What I am confused about is that how do I calculate the degree of freedom? Since the observed value might range from 0-100000, will my degree of freedom be equal to (100000-1)? Please advise.
you have $n=64\times 32$ random variables so your degrees of freedom should be $n-1=2047.$