chi-squared test for specific graph