# How to corretly scale sum of squared residuals of two different sets of data in order to compare them?

I did numerical simulations of two different systems that returned me N=1000 histograms expressed as $\{x,y,y'\}$, where $x$ is the independent variable, $y=P(x)$ is the probability distribution (frequency of x), $y'=P_0(x)$ is the theoretical probability which is a Chi-Squared Distribuion with parameter one (this is just the distribution function that my histograms must fit. I call it Porter-Thomas distribution in the context of my area of study).

For each histogram, I got the residual sum of squares:

$$RSS(n)=\frac{1}{M}\sum_{i}^{M}(y-y')^2$$

here $M$ is the total number of bins and $n=1,\cdots,N$ is the index of the histogram. Now, I have a plot $n\times RSS(n)$ which shows me how the fit with a theoretical curve gets better as $n\rightarrow\infty$.

I used the same curve for the 1000 histograms of each system and I should observe the same tendence of reducing residue in both.

This tendence is present as expected but the problem is that the two plots of RSS(n) are in totally different scales. I noticed it is in some way proportional to $M$ and also to the variance of the input data before the frequency couting (there are 2000 different variances, one for each system, I could not normalize them).

This is just my guess. I'm a amateur in statistics and I don't even know how this method of analysis is called. Maybe I am completely lost. If someone could help me to get RSS(n) plots correctly scaled so that I can compare them (which one gets a good fit faster or which one have a mean RSS greater) or give me the name of good books related to the thopic I would be very thankful.

• By 'residue' in your title, do you mean 'residual'? If not, could you clarify what it means? – Glen_b Jun 30 '14 at 10:53
• I mean sum of squared residuals (y-y'). Sorry, I thought it was the same. – user49234 Jun 30 '14 at 14:08
• It may simply be a term that I'm unaware of. – Glen_b Jun 30 '14 at 14:09