Forgive the newbie statistics based question, but why force the user to enter df. Isn't it always the length of the input lists - 1.
The test already requires that the list lengths (observed and expected) be the same, so why ask for the degrees of freedom.
Are there some Chi Squared GOF tests that don't use this convention?