I have two questions:(adsbygoogle = window.adsbygoogle || []).push({});

I have a set of data, a measured spectrum. When I model the spectrum with a function, I calculate r^{2}=1-([itex]\sum[/itex](y-y_{model})^{2}/[itex]\sum[/itex](y-y_{avg})^{2}).

Q1) However, I have reference data now, which is what the spectrum should be. So is it right to use the same calculation on it for r^{2}, but instead of using y_{model}, using y_{reference}?

Q2) The model function I was fitting to the data is

S_{λ}= 2πhc^{2}/λ^{5}(e^{hc/λkT}-1)

Is it correct to calculate goodness of fit in that way for such a distribution?

Here is a plot of my two data sets

thanks!

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# How to compare two data sets with statistics?

**Physics Forums | Science Articles, Homework Help, Discussion**