## Kruskal-Wallis test: Non Parametric tests

The Kruskal-Wallis test is a nonparametric statistical test used to compare three or more independent groups. It is used when the data does not follow a normal distribution or when the assumptions of a parametric test, such as the ANOVA, are not met.

The Kruskal-Wallis test works by comparing the ranks of the observations in the different groups. It first ranks all the observations from all the groups together and then assigns each observation a rank based on its position in the combined ranked list. The test statistic is then calculated based on the ranks of the observations in the different groups.

Here are the steps to perform the Kruskal-Wallis test:

- State the null hypothesis and the alternative hypothesis. The null hypothesis is that there is no significant difference between the groups, while the alternative hypothesis is that there is a significant difference between the groups.
- Combine the data from all the groups and rank them from lowest to highest. Ties are assigned the average rank.
- Calculate the sum of the ranks for each group.
- Calculate the test statistic based on the ranks of the observations in the different groups.
- Calculate the p-value by comparing the test statistic to the expected distribution of this statistic under the null hypothesis.
- Compare the p-value to the chosen significance level (usually 0.05) to determine if the null hypothesis can be rejected.

If the p-value is less than the chosen significance level, the null hypothesis is rejected, and it is concluded that there is a significant difference between at least two of the groups. If the p-value is greater than the chosen significance level, the null hypothesis is not rejected, and it is concluded that there is no significant difference between the groups.

The Kruskal-Wallis test is commonly used in pharmaceutical research to compare the efficacy or safety of three or more different treatments or interventions. For example, it may be used to compare the effectiveness of three different doses of a drug or to compare the effectiveness of three different drugs. It is also used in other fields, such as psychology and education, where the data may not follow a normal distribution or the assumptions of a parametric test may not be met.

#### Pharmaceutical example of Kruskal-Wallis test

The Kruskal-Wallis test is commonly used in pharmaceutical research to compare the efficacy or safety of three or more different treatments or interventions. For example, it can be used to compare the effectiveness of three different drugs for the treatment of a specific disease.

Suppose a pharmaceutical company wants to test three different drugs (Drug A, Drug B, and Drug C) for their effectiveness in reducing the symptoms of migraine headaches. The company recruits 60 patients with a history of migraines and randomly assigns them to one of the three groups: 20 patients receive Drug A, 20 patients receive Drug B, and 20 patients receive Drug C. After a month of treatment, the patients’ pain scores are recorded on a scale of 0-10, with higher scores indicating more severe pain.

To analyze the data, the company can use the Kruskal-Wallis test to determine if there is a significant difference in pain scores between the three groups. The null hypothesis is that there is no significant difference in pain scores between the three drugs, while the alternative hypothesis is that at least one drug is more effective than the others.

The company can rank the pain scores for all 60 patients together, and then calculate the sum of the ranks for each group. They can then calculate the Kruskal-Wallis test statistic based on the ranks of the observations in the three groups. If the p-value is less than the chosen significance level (usually 0.05), the company can conclude that there is a significant difference in pain scores between the three drugs and perform post-hoc tests to determine which drugs are significantly different from each other. If the p-value is greater than 0.05, the company can conclude that there is no significant difference in pain scores between the three drugs.

**Final Year B Pharm Notes, Syllabus, Books, PDF Subjectwise/Topicwise**

Suggested readings: