Consider a Chi-squared test where we have a sample of data and we’re interested in whether that data follows some distribution.
If we have a reason to believe that the data follows a distribution with specific parameters - e.g. - then the number of degrees of freedom to use in the Chi-squared test is the number of columns (frequency bands) minus one, as, knowing the total sample size, the frequency of the last column can be determined based on the other columns.
If we don’t know what parameters the distribution follows, then we estimate the parameters. This reduces the number of degrees of freedom by for each estimated parameter, as given all but two columns, it is possible to determine both remaining values based on a parameter and the total sample size.