# How to assess Goodness-of-fit

#### dr_rk

##### New Member
I have fitted a set of data points to an exponential decay curve of the equation:
y=A+Be^(-t).

I wish to assess the quality of fit. Is it OK if I did a chi-squared test using
X^2 = sum: (O-E)^2/E and then looked up the critical value?

#### copeg

##### New Member
Provided the errors are normally distributed, the pearson chi-squared goodness of fit test should allow you to test null hypothesis that the predicted and observed are equal.

#### Dason

##### Ambassador to the humans
I really don't think that test applies here (at least in the form the OP wrote it). And even if it did I don't think the null would be that the predicted and observed are equal...

#### copeg

##### New Member
I really don't think that test applies here (at least in the form the OP wrote it). And even if it did I don't think the null would be that the predicted and observed are equal...
Goodness of Fit. Perhaps not exactly as written by the OP, but it looks to me like an appropriate test. Perhaps there is another that you have in mind, or could you clarify why you do not think it applies here?

Last edited:

#### ledzep

##### Point Mass at Zero
Another way to assess the goodness of fit would be to test for the "lack of fit" i.e. test for the deviations about the non-linear model.

You don't say whether you have replicate observations or not. However, you can construct a lack of fit test if you have replicate observations for your x variable.

1) You can estimate the pure error sums of square (SS_pure) by fitting a completely randomised design (i.e. x as a class variable).
2) You can obtain residual sums of square from your non-linear model (SS_nlin).
3) Then Your lack of fit SS will be the difference between 1 and 2.
4) Finally you can partition the residual SS from your non-linear model into pure error and lack of fit and constuct your F test to judge the lack of fit of your non-linear model.

HTH