Korean, Edit

14-3 Lesson. Kruskal-Wallis H test

Recommended Article : 【Statistics】 Lesson 14. Statistical Tests


1. Overview

2. Method



1. Overview

⑴ Definition

① A test method for comparing distributions of three or more groups

② Used for the same purpose as one-way ANOVA in parametric methods

③ Tests whether the group median is the same, not the mean

④ Sample sizes may vary across groups

⑵ (Reference) Choice of Test Method

① Single sample

○ Parametric test : Single sample T-test

○ Non-parametric test : Sign test, Wilcoxon signed rank test

② Two samples (paired samples) : Essentially the same as a single sample

○ Parametric test : Paired sample T-test

○ Non-parametric test : Sign test, Wilcoxon signed rank test

③ Two samples (independent samples)

○ Parametric test : Independent sample T-test

○ Non-parametric test : Wilcoxon rank sum test

④ Analysis of variance

○ Parametric test : ANOVA

○ Non-parametric test : Kruskal-Wallis test

⑤ Randomness

○ Non-parametric test : Run test

⑥ Correlation analysis

○ Pearson correlation coefficient

○ Spearman rank correlation coefficient



2. Method

⑴ Example sample


스크린샷 2023-11-11 오후 8 40 53

Figure. 1. Example sample


Step 1. Set up hypotheses

① Null hypothesis H0 : Medians of each group are the same

② Alternative hypothesis H1 : At least one group’s median is different

Step 2. Assign ranks to 16 data points (four data points from each of four sample groups)

Step 3. Define the test statistic H as follows

image

Step 4. Apply H to the chi-squared test (however, degrees of freedom n-1 = 3)

⑹ Rejection region for significance level α

① If H ≥ h(α, k, (1, 2, ∙∙∙, m)), then reject H0

② h(α, k, (1, 2, ∙∙∙, m)) is the upper 100α percentile of H satisfying P(H ≥ h(α, k, (1, 2, ∙∙∙, m)))

RStudio

kruskal.test(y ~ x, data = my_data)



Posted : 2019.08.24 00:58

results matching ""

    No results matching ""