# Kruskal-Wallis Test

One-way ANOVA on ranks - nonparametric test
Checks the null assumption that when selecting a value from each of n groups, each of these groups will have an equal probability of containing the highest value.
Calculates the KW test and multiple comparisons and validates the data normality, test power, outliers and generates the R syntax.
Enter raw data directly
Enter raw data from excel

## Enter sample data directly

Header: You may change groups' name to the real names.
Data: When entering data, press Enter or , (comma) after each value.

 Groups Group1 Group2 Group3 Data
Empty cells or non-numeric cells will be ignored

## Enter sample data from excel

You may copy the data from Excel, Google sheets or any tool that separate data with Tab and Line Feed.
Copy one block of 2 consecutive columns includes the header, and paste below. Click to see example:
The tool will ignore empty cells or non-numeric cells

R code.
mmmm

### Multiple comparisons

Compares any pair of groups using the Kruskal Wallis test. In this case, the test is identical to the Mann-Whitney U test with normal approximation.

## Information

Target: To check if the difference between the ranks of two or more groups is significant, using a sample data
The Kruskal-Wallis test is a non parametric test.
When the groups have a similar distribution shape, the null assumption is stronger and states that the medians of the groups are equal.

When performing Kruskal-Wallis test, we try to determine if the difference between the ranks reflects a real difference between the groups, or is due to the random noise inside each group. The Chi-square statistic is an approximation for the exact calculation.

Right-tailed the Kruskal-Wallis test you can use only the right tail. Why?
Hypotheses
H0: MR1 = .. = MRk
H1: not(MR1 = .. = MRk)
MR - Mean rank.
Test statistic
 H'= 12 Σ( Rj2 ) - 3(n+1) n(n+1) nj
 H= H' 1 - correction
Rj - the rank sum of group j.
nj - the sample size of group j.
n - the total sample size across all groups, n = n1 +...+ nj.
χ2 distribution

## Assumptions

 Independent samples from independent groups. One subject can't be in more than one group.

## Required Sample Data

 Sample data from all compared groups.

## R Code

The following R code should produce the same results