is formula 14.3.3 correct?


misha
05-28-2004, 02:16 AM
in the section 14.3 of Numerical Recipies in C (Are two distributions different?) . When comparing two data sets with unequal numbers of data points I expected the values in denominator scaled:

chi2 = \sum_i (sqrt(S/R)*R_i-sqrt(R/S)*S_i) / ( (S/R)*R_i + (R/S)*S_i)

or (if one scaled second histo to the first one):

chi2 = \sum_i (R_i-(R/S)*S_i) / ( R_i + (R/S)^2*S_i)

Is it correct?