- Observations are two measurements on the same subject (e.g. eye color and hair color)
- Random samples \((X_1,Y_1),\dots,(X_n,Y_n)\)
- \(X\) and \(Y\) with different ranges \(\{1,2,\dots,I\}\) and \(\{1,2,\dots,J\}\)
- Consider hyothesis test: \[ \begin{align} H_0: P(X=i,Y=j) & = P(X=i)P(Y=j) \text{ for all } i \text{ and } j \\ H_A: P(X=i,Y=j) & \ne P(X=i)P(Y=j) \text{ for some } i \text{ and } j \end{align} \]
- Construct contingency table of \(n\) observations \[O_{ij} = \#_{1 \le l \le n} \{ (X_l,Y_l) = (i,j) \}\]