Template:Chi-squared test for grouped data