# A Chi-Squared fit of a general quadratic polynomial is done to ten data points. What is the number of degrees of freedom of this fit?

I think the correct answer is $7$ because the general quadratic is $$y_i=ax_i^2 + bx_i + c$$

Using the formula $$\color{red}{\fbox{Number of degrees of freedom = Number of data points - Number of Parameters}}$$

The $3$ parameters are $y_i,x_i^2,x_i$

So $10-3=7$ degrees of freedom.

The correct answer is indeed $7$; But is this because $x_i^2$ 'counts' as $2$ parameters as it's squared (adding the other $x_i$ to make $3$)?

I am somewhat new to this idea of degrees of freedom; so I'm not really sure which method is valid, if any?

The parameters are $a,b,c$ and not $y_i, x_i, x_i^2$ as you pointed out.

• Are you sure about this as the $a,b,c$ are just constants say $4x^2 + 3x -2$? It is the $y_i, x_i, x_i^2$ that are varying with each $i$. Dec 8, 2015 at 1:22
• $a$, $b$, and $c$ are the parameters you are trying to estimate. ${y_i, x_i, x_i^2}$ is your data. Your estimators $\hat{a}$, $\hat{b}$, and $\hat{c}$ are functions of your data. Your data has 10 degrees of freedom because it has 10 observations. Your model has 3 degrees of freedom because you are estimating three separate values (some people don't count the constant $c$ and call it 2 degrees of freedom). Your residuals have 10 - 3 = 7 degrees of freedom. There are 10 residuals (i.e. the residual vector has 10 dimensions) but they live in a 7 dimensional subspace! Dec 8, 2015 at 3:52
• @right Thanks for your answer, I appreciate that (+1) :) Dec 8, 2015 at 7:56

• $a$, $b$, and $c$ are the parameters you are trying to estimate.
• $\{y_i, x_i, x_i^2\}$ is your data.
• Your estimators $\hat{a}$, $\hat{b}$, and $\hat{c}$ are functions of your data.
• Your model has 3 degrees of freedom because you are estimating three separate values. (Some people don't count the constant $c$ and call it 2 degrees of freedom.)
• Very nicely explained, (+1) just one more question; What is a constraint in this context? Are the $\{y_i, x_i, x_i^2\}$ constraints, probability theory is not my strong point. I have seen another equation that states: $\color{blue}{\fbox{Number of degrees of freedom = Number of data points - Number of Constraints}}$? If this is true then it means that a Constraint is simply a synonym for a Parameter, is this correct? Dec 8, 2015 at 7:54