## Mann-Whitney test :

The Mann-Whitney test, also known as the Wilcoxon rank-sum test, is a non-parametric statistical test used to compare the medians of two independent samples. This test is often used when the samples do not follow a normal distribution or when the variances of the samples are not equal.

One example of the use of the Mann-Whitney test is in comparing the effectiveness of two medical treatments. Let’s say a study is conducted with 100 patients, with 50 assigned to Treatment A and 50 assigned to Treatment B. The researchers want to know if there is a significant difference in the effectiveness of the two treatments. The researchers would collect the data on the patients’ symptoms before and after treatment, and use the Mann-Whitney test to compare the medians of the two samples. If the test shows a significant difference between the medians, it can be concluded that there is a significant difference in the effectiveness of the two treatments.

Another example of the use of the Mann-Whitney test is in comparing the salaries of two groups of employees. Let’s say a company has 100 employees, with 50 in Sales and 50 in Marketing. The company wants to know if there is a significant difference in the salaries of the two groups. The researchers would collect the data on the salaries of the employees in each group, and use the Mann-Whitney test to compare the medians of the two samples. If the test shows a significant difference between the medians, it can be concluded that there is a significant difference in the salaries of the two groups.

The Mann-Whitney test is a non-parametric test, meaning it does not assume that the data follows a specific distribution. This is useful in cases where the data does not follow a normal distribution, or when the variances of the two samples are not equal. In contrast, parametric tests, such as the t-test, assume that the data follows a normal distribution and have equal variances.

The Mann-Whitney test is performed by ranking the values in each sample and then comparing the ranks of the two samples. The test statistic is the sum of the ranks in one sample, and the significance of the test is determined by comparing the observed value of the test statistic to the expected value under the null hypothesis. The null hypothesis is the assumption that the two samples come from the same population and therefore have the same median.

If the observed value of the test statistic is significantly different from the expected value, the null hypothesis is rejected and it can be concluded that there is a significant difference between the medians of the two samples. The p-value is used to determine the significance of the test, with a p-value less than 0.05 indicating a significant difference.

In summary, the Mann-Whitney test is a non-parametric statistical test used to compare the medians of two independent samples. It is useful in cases where the data does not follow a normal distribution or when the variances of the samples are not equal. The test is performed by ranking the values in each sample and comparing the ranks of the two samples, with a significant difference in the observed and expected values indicating a significant difference in the medians of the two samples.