"Chi-squared goodness of fit tests with applications"