I already have done the least squares fitting on hundreds of data. Now I want to take that data and determine for a few of them if one model is significantly better than the other. I don't use excel and would like to just do this with what I have already calculated and fit using a mathematical expression. I've been looking at the F-test on wikipedia:

http://en.wikipedia.org/wiki/F-test. I already have residuals, so I'd like to use the F=((RSS1-RSS2)/(p2-p1))/(RSS2/(n-p2)) but I'm not sure if I'm doing this correctly. I have 2 models, one with 5 components and 1 with 6. Each spectrum has 229 points in it. RSS is residual sum of squares. So, do I take the fit spectrum - the actual to get residuals, then square each of those residuals (229 of them) and then add them all together. I do this for both model 1 and 2 to get RSS1 and RSS2. p1 and p2 are the parameters in the model, so I think this would be 5 and 6. n is the # of data points, so I believe this is 229. If I'm doing this right, I did it for 2 different experiments and here are the results:

F = ((4.5248e-5-1.3452e-5)/(1))/(1.3452e-5/(229-6))=527.1135

2nd one:

F=((1.3288e-5-1.3197e-5)/1)/(1.3197e-5/(229-6))=1.537697

I then go to an F-table and look for F(1,223). I used this one:

http://www.itl.nist.gov/div898/handbook/eda/section3/eda3673.htm for 5% significance.

It didn't go up to 223, but its not changing much at high #s, so I used 100. THe critical value is 3.936.

So, in the first F-test, can I say the 2nd model is significant with 95% confidence and for the 2nd F-test I calculated I cannot say it is statistically significant and must use the 1st model with only 5 components?

Lisa