The Chi-Square Test of Independence:
H0 : Music preference is independent of geographic location.
H1 : Music preference is dependent of geographic location.
X2=i=1∑Rj=1∑Ceij(aij−eij)2
eij=grandtotalrow(i)total⋅col(j)total
grandtotal=700
e11=700230⋅460=151.14 , e12=700230⋅130=42.71 , e13=700230⋅70=23.00, e14=700230⋅40=13.14
e21=700261⋅460=171.51 , e22=700261⋅130=48.47 , e23=700261⋅70=26.10, e24=700261⋅40=14.91
e31=700209⋅460=137.34 , e32=700209⋅130=38.81 , e33=700209⋅70=20.90, e34=700209⋅40=11.94
X2=0.01+2.02+9.78+3.58+3.50+0.01+34.25+2.34+
+4.79+2.50+10.62+0.07=73.47
Degrees of freedom:
df= (number of columns – 1)(number of rows – 1)
df=3⋅2=6
p-value=P(X>73.47)=0
α=0.01 , α> p-value
Since α > p-value, reject H0. This means that the factors are not independent.
Comments