The chi-squared test for association measures the association between two variables. It is distinct from a chi-squared test for independence, which is non-parametric, and from a goodness-of-fit test, which measures how strongly two variables are correlated (Gravetter and Wallnau, 2013).
Gravetter, F. J., & Wallnau, L. B. (2013). Statistics for the Behavioral Sciences. Wadsworth, CA: Cengage Learning.
Open Source: https://en.wikipedia.org/wiki/Chi-squared_test