Use a chi-square test of independence, since we are testing whether two categorical variables are related: gender and library location preference.
Observed counts:
- Men: North 45, South 30
- Women: North 50, South 25
Totals:
- Men total = 75
- Women total = 75
- North total = 95
- South total = 55
- Grand total = 150
A. Show calculations
Step 1: State the hypotheses.
Null hypothesis: gender and library location preference are independent.
Alternative hypothesis: gender and library location preference are related.
Step 2: Find the expected counts.
Expected count = (row total × column total) / grand total
For Men, North:
Expected = (75 × 95) / 150 = 47.5
For Men, South:
Expected = (75 × 55) / 150 = 27.5
For Women, North:
Expected = (75 × 95) / 150 = 47.5
For Women, South:
Expected = (75 × 55) / 150 = 27.5
Expected table:
- Men: North 47.5, South 27.5
- Women: North 47.5, South 27.5
Step 3: Compute the chi-square test statistic.
Chi-square = sum of (Observed - Expected)^2 / Expected
Men, North:
(45 - 47.5)^2 / 47.5 = 6.25 / 47.5 = 0.1316
Men, South:
(30 - 27.5)^2 / 27.5 = 6.25 / 27.5 = 0.2273
Women, North:
(50 - 47.5)^2 / 47.5 = 6.25 / 47.5 = 0.1316
Women, South:
(25 - 27.5)^2 / 27.5 = 6.25 / 27.5 = 0.2273
Add them up:
Chi-square = 0.1316 + 0.2273 + 0.1316 + 0.2273 = 0.7178
So the test statistic is about 0.718.
Step 4: Find the degrees of freedom.
Degrees of freedom = (number of rows - 1)(number of columns - 1)
There are 2 rows and 2 columns, so:
df = (2 - 1)(2 - 1) = 1
Step 5: Find the critical value or p-value.
At alpha = 0.05 with 1 degree of freedom, the critical chi-square value is 3.841.
Since 0.718 is less than 3.841, we fail to reject the null hypothesis.
The p-value is also greater than 0.05.
B. Answer the question
There is not enough evidence at the 0.05 level of significance to conclude that gender is related to preference for library location.
In other words, based on this sample, there is no statistically significant difference between men and women in their preference for a north or south location.
A good concluding sentence for homework or a report would be:
A chi-square test of independence showed no significant association between gender and preferred library location, chi-square = 0.718, df = 1, p > 0.05.