Cross tabulation of the data

When two variables are measured the relationship between them is often of interest. A contingency table describes the joint distribution of the variables. It can also describe the marginal distributions of each variable, or the conditional distribution of one variable given the other.

  1. Open the file Hair-Eye Color.xlsx.
  2. Click a cell in the dataset.
  3. On the Analyse-it ribbon tab, in the Statistical Analyses group, click Compare Groups, and then click Contingency Table.
    The analysis task pane opens.
  4. In the Y (response) variable drop-down list, select Hair.
  5. In the X (factor) variable drop-down list, Select Eye.
  6. In the Model: Y by X drop-down list, select Frequency
  7. In the Frequency variable drop-down list, select Count.
  8. On the Analyse-it ribbon tab, in the Compare Groups group, click Test Proportion > Pearson X2.

    A Pearson X2 hypothesis test is added to the analysis task pane.

  9. In the Hypothesis drop-down list, select The variables are not independent as the alternative hypothesis .
  10. In the Significance level edit box, enter 5%.
  11. Click Calculate.
    The results are calculated and the analysis report opens.

The contingency table shows the joint distribution of the variables.

(click to enlarge)

The hypothesis test p-value is highlighted as it is less than 5% significance level (the actual p-value is < 0.0001). You can interpret the p-value as indicating a substantial departure from independence.

(click to enlarge)