Apparently, job level makes a difference! Perhaps there is an unobserved connection between job level and sex that explains the salaries differences. Are there more women in lower levels?Note: a lurking variable is one that's associated with BOTH variables. E.g. men have bigger feet, so foot size is associated with men. But is it associated with salary or job level?The Contingency TableWe need a method to explore relationships among categorical data.Fit y by x, Level by Sex. If you select x and y that are both categorical (of nominal type), the output is is a contingency table and a mosaic plot. Let's focus on the contingency table first. It includes many different percentages. Let's first get rid of all the percentages by unselecting them (red triangle next to "Contigency Table").The entries indicate the number of persons in each category: for example, there are 19 females in the high job level. This particular example is called a two-way table.
But wait! There are many more men (65.91% to 34.09%), so of course there are more men in the high level. We need to see if the percentage of high level women is less than the overall proportion.The following table provides all the evidence needed:Now, each cell contains the count, total %, column % and row % respectively. For example: 37.33% of the women column are mid level, 37.33% are low level, while only 25.33% of the women are high level. In contrast, 51% of the men are high level%. A mosaic plot brings alive the comparison using area and color:If you do Fit Y by X with Sex by Level (reverse), you get this: