there are various statistical tests which determine the differences between groups or more like anova, t-test, f-test, etc. examples on the other hand of test statistics that examine the relationship of variables includes linear regression which tests the r^2 and correlation.