Citation:
A test of independence is a statistical hypothesis test used to determine whether two categorical variables are independent or related. It examines if the observed frequencies in a contingency table differ significantly from the expected frequencies under the assumption of independence.