Chi squared goodness of fit