Understand , it does all these that you mentioned. Along with that we do test statistic(Hypothesis Testing) to check if 2 variables are statistically significant or not. Why do we do this, if we can do it by using correlation, which can check if 2 variables are related or not