To calculate the Mann-Whitney U statistic:
\[ U = n1 \cdot n2 + \frac{n1 \cdot (n1 + 1)}{2} - R1 \]
Where:
A Mann-Whitney U test, also known as the Wilcoxon rank-sum test, is a nonparametric statistical test used to determine if there are differences between two independent groups in terms of their ranks on a particular variable. It is often used when the data does not meet the assumptions of a standard t-test, such as normal distribution. The test ranks all the data from both groups together, then compares the sum of ranks for each group to see if they significantly differ from what would be expected if the groups were identical.
Example 1: If the sample size of the first group (n1) is 10, the sample size of the second group (n2) is 12, and the sum of ranks in the first group (R1) is 45:
\[ U = 10 \cdot 12 + \frac{10 \cdot (10 + 1)}{2} - 45 = 120 + 55 - 45 = 130 \]
The Mann-Whitney U statistic is 130.
Example 2: If the sample size of the first group (n1) is 8, the sample size of the second group (n2) is 7, and the sum of ranks in the first group (R1) is 30:
\[ U = 8 \cdot 7 + \frac{8 \cdot (8 + 1)}{2} - 30 = 56 + 36 - 30 = 62 \]
The Mann-Whitney U statistic is 62.