Cluster analysis with chi-squared test (Semestral project)