chi mat test to use square matrix