Replace Gaussian fitting with chi-square test and N(mu, sigma)