Statistics

Mann-Whitney U Test in Python

March 19, 2023
Python
Data Science, Statistics

Let’s say you have a dataset stored as a Pandas dataframe, df, with a numerical column, and another categorical column, and you want to compare the categories to determine if those different categories are statistically different from one another. A Mann-Whitney U test might be appropriate, especially if the fundamental assumptions for the more convention t-test are not met (e.g., variance across the groups are similar, disributions are mostly normal) ...