I was doing some least-squares homework when I saw this term "fitting parameters".
I was asked to implement the leas-squares fit using polynomials of $p-th$ degree to a generic dataset. This is done.
But then I was asked to calculate $\displaystyle \bar\chi^2 = \frac{\chi^2}{N-N_p}$ where $N_p = p + 1$ is the number of fitting parameters.
As I see from the formula, $N$ is the number of samples and $N_p$ is the degree of the polynomial + 1.
Is this right?
Best Answer
Yes, that's right. In general, you are trying to 'fit' the data with some simple function (here, a degree-$p$ polynomial), which will have some number of parameters (here, the $p+1$ coefficients).