How to Run Wilcoxon Signed-Rank Test in Exploratory

Wilcoxon Singed-Rank Test is often used as an alternative to T Test, when the data cannot be assumed to be distributed normally.

Here is an example of running it in Exploratory.

We have air quality data for May (Month 5) and August (Month 8).

Let’s test if Ozone levels are significantly different between May and August.

Add a custom command as a step to build a Wilcoxon Test model. Click Add button, and select Custom R Command menu like following screenshot.

Custom Command dialog will show up. Type in the following R command in it.

do(model=wilcox.test(Ozone~Month, data=.))

When done, click Run button. This Custom Step will create a model column like this screenshot.

To retrieve test result, add another Custom Step with the following command.

tidy(model)

tidy is a function from a R package called Broom. Broom package contains a various set of functions that help you work with statistical / machine learning models easily by converting them into a tidy format. tidy function extracts the model summary information and put it in a data frame.


The step will turn the data frame into summary of test results like following.

With the very low P value, we can tell that the month being May or August has statistically significant relationship with Ozone level.