Lets assume we are performing an physical experiment and in that experiment we get $10^{6}$ number of data values. All those data values follows some distribution function. Now, in next step what we are doing is, we are picking random sample data sets of sample size "n" (e.g.,n=5,10,...etc.) and for each random sample we defined this random variable (which can be seen as a measure of mismatch between experimental results with respect to theoretical expectation),
$$ \Delta=\sum_{i=1}^{N}\left ( \frac{f_{i}}{n}-w_{i} \right )^{2} $$
Now let's spend some time to understand above equation. At first we will divide whole permissible spectrum of experimental data into N equal sized bins. $f_{i}$ is experimental count for $i^{th}$ bin for that specific chosen random sample. $w_{i}$ is theoretical expected relative count.
Now I will explain what I have observed. Here apparently there are two parameters for random variable $\Delta$. Those are n and N. At first I fix the value of n at 10 and change the value of N from 10 to 800. And distributions of $\Delta$ are shown in figures. Here error distribution means I have obtained sufficient number of random samples from total data set (containing $10^{6}$) and for each random sample I have calculated $\Delta$ and finally we got distributions in terms of histograms where on x-axis error is plotted and on y-axis we have count.
Now here are my questions,
(a) In generally, I want to know what types mathematics (statistics) I am dealing with. In other words I want to know what are good references where I can find similar (or exactly same) things what I am doing here.
(b) I can understand why initially we have spiky sort of distribution and then for medium values of N we have roughly normal distribution (I have check 67-95-99.5 rule for those distributions). Arrival of normal distribution is understandable from `Central Limit Theorem'. But I can't understand why I am getting oscillatory distribution for large values of N. Is that due to some intrinsic programming error or there is any real statistical reasons for getting that.
N.B.:: If any anyone wants information about theoretical distribution function (which decides $w_{i}$ coefficients) then I can provide that info. Also I know something about chi-square distribution and I think the quantity which I have defined is closely related to chi-square definition.
THANK YOU IN ADVANCE!!