In-Class Exercise 10
Shih Chien University
2026-09-16
Test for Independence
A survey asked 400 commuters about their main mode of transport and their age group.
| MRT | Bus | Scooter | |
|---|---|---|---|
| Under 35 | 78 | 42 | 90 |
| 35 or over | 62 | 68 | 60 |
Test whether mode of transport is independent of age group at \alpha=0.05.
matrix(..., nrow = 2, byrow = TRUE).chisq.test() and report the test statistic, the degrees of freedom, and the P-value.Expected Frequencies by Hand
For the table in Question 1:
E=\frac{(\text{row total})(\text{column total})}{\text{grand total}}
chisq.test(...)$expected.Test for Homogeneity of Proportions
Three branches were asked whether they met their quarterly target.
| Branch A | Branch B | Branch C | |
|---|---|---|---|
| Met target | 46 | 38 | 55 |
| Did not meet | 34 | 42 | 25 |
Elementary Statistics: A Step by Step Approach