The chi-squared test of independence of categorical variables is used to answer the question of whether the effects of one variable depend on the value of another variable. For example, we could ask if the area of psychology that a person prefers depends on whether they would select a cat or a dog as a pet. (This isn't as odd as it seems. Some areas of psychology tend to be more male dominated while other areas tend to be more female dominated. There also is a difference in which pet males and females prefer.)
1.Write the hypotheses:
H0: The area of primary interest in psychology and type of pet preferred are independent of each other.
H1: The area of primary interest in psychology and type of pet preferred are not independent of each other. That is the primary area of interest in psychology depends on whether you prefer a cat or a dog.
H0: ΣΣ(O - E)2 = 0
H1: ΣΣ(O - E)2 0
H0 states that the variables are independent of each other.
2.Specify the α level: α = .05
3.Calculate the appropriate statistic: