Subjects statistics

Kruskal Wallis Test

Step-by-step solutions with LaTeX - clean, fast, and student-friendly.

Search Solutions

Kruskal Wallis Test


1. **State the problem:** We have frequency data of physical punishment administered by parents in three social classes (Working, Middle, Upper) over a week. We want to determine if the differences in frequencies among these classes are statistically significant. 2. **Identify the test:** Since we have categorical data across three independent groups, we use the **Kruskal-Wallis H test**, a non-parametric method for comparing more than two groups when the data may not be normally distributed. 3. **Data:** - Working Class: $[10, 9, 4, 2, 1]$ - Middle Class: $[11, 10, 5, 2, 0]$ - Upper Class: $[7, 5, 2, 0, 0]$ 4. **Steps for Kruskal-Wallis test:** - Combine all data and rank them from smallest to largest, assigning average ranks for ties. - Calculate the sum of ranks for each group. - Use the formula: $$H = \frac{12}{N(N+1)} \sum \frac{R_i^2}{n_i} - 3(N+1)$$ where $N$ is total observations, $R_i$ is sum of ranks for group $i$, and $n_i$ is size of group $i$. 5. **Rank the combined data:** Data combined: $[10,9,4,2,1,11,10,5,2,0,7,5,2,0,0]$ Sorted with ranks (average for ties): - 0 appears 3 times: ranks 1,2,3 average = 2 - 1: rank 4 - 2 appears 3 times: ranks 5,6,7 average = 6 - 4: rank 8 - 5 appears 2 times: ranks 9,10 average = 9.5 - 7: rank 11 - 9: rank 12 - 10 appears 2 times: ranks 13,14 average = 13.5 - 11: rank 15 Assign ranks to each group: - Working Class ranks: 13.5 (10), 12 (9), 8 (4), 6 (2), 4 (1) sum = 43.5 - Middle Class ranks: 15 (11), 13.5 (10), 9.5 (5), 6 (2), 2 (0) sum = 46 - Upper Class ranks: 11 (7), 9.5 (5), 6 (2), 2 (0), 2 (0) sum = 30.5 6. **Calculate H:** - $N=15$, $n_1=n_2=n_3=5$ - $$H = \frac{12}{15 \times 16} \left( \frac{43.5^2}{5} + \frac{46^2}{5} + \frac{30.5^2}{5} \right) - 3 \times 16$$ - Calculate each term: - $\frac{43.5^2}{5} = \frac{1892.25}{5} = 378.45$ - $\frac{46^2}{5} = \frac{2116}{5} = 423.2$ - $\frac{30.5^2}{5} = \frac{930.25}{5} = 186.05$ - Sum = $378.45 + 423.2 + 186.05 = 987.7$ - $$H = \frac{12}{240} \times 987.7 - 48 = 49.385 - 48 = 1.385$$ 7. **Interpretation:** - Degrees of freedom $df = k - 1 = 3 - 1 = 2$ - Using chi-square distribution table, critical value at $\alpha=0.05$ is 5.991. - Since $H=1.385 < 5.991$, we **fail to reject the null hypothesis**. 8. **Conclusion:** There is no statistically significant difference in the frequency of physical punishment among the three social classes at the 5% significance level.