Hypothesis

The Kruskal-Wallis Test has the null and alternative hypotheses as discussed below:

  • The null hypothesis (H0): The median is the same for all the data groups.
  • The alternative hypothesis: (Ha): The median is not equal for all the data groups.

How to Perform a Kruskal-Wallis Test in Python

Kruskal-Wallis test is a non-parametric test and an alternative to One-Way Anova. By non-parametric we mean, the data is not assumed to become from a particular distribution. The main objective of this test is used to determine whether there is a statistical difference between the medians of at least three independent groups. 

Similar Reads

Hypothesis:

The Kruskal-Wallis Test has the null and alternative hypotheses as discussed below:...

Stepwise Implementation:

Let us consider an example in which the Research and Development team wants to determine if applying three different engine oils leads to the difference in the mileage of cars. The team decided to opt for 15 cars of the same brand and break down them into groups of three (5 cars in each group). Now each group is doped with exactly one engine oil (all three engine oils are used). Then they are allowed to run for 20 kilometers on the same track and once their journey gets ended, the mileage was noted down....

Contact Us