I have a maxwellian distribution observation that I fit to expected maxwellian distribution. Then I run a chi square test to find out the goodness of the fit. I get excellent results however, I also want to find out the degrees of freedom that the chi square test uses. To quote the documentation chisquare
: The p-value is computed using a chi-squared distribution with k - 1 - ddof degrees of freedom, where k is the number of observed frequencies. The default value of ddof is 0.
What is k exactly here? Is it the total number of data points (41000) that I have? Or is it the frequency per bin?