MATLAB: Wilcoxon rank sum test

ranksumttestwilcoxon

Dear all,
I am facing another statistical issue and I hope someone out there can help me 🙂
My data: 2 samples of companies, which were targets of a specific intervention at some point in time. I look at the development of a certain financial ratio in the years subsequent to the event. One sample contains targets of SUCCESSFUL interventions, the other entails targets of UNSUCCESSFUL events.
My task: I want to test for difference in both MEANS and MEDIANS between the ratios for the two samples in the various years subsequent to the event.
My approach: I am using the paired-sample t-test (ttest) for testing the means and the two-sided Wilcoxon rank sum test (ranksum) for testing the medians (as I am of the opinion that I am dealing with two independent samples).
My problem: The t-statistic (testing the difference in means) is very insignificant for all five years ex-post the event, which I was expecting. The z-statistic (ranksum), however, is highly significant for all years in question, even though for two of the five years the medians of the successful and the unsuccessful sample are almost identical.
My questions: Am I using the right tests? If so, can my results (especially for the test of differences in median) be correct and why? Are my samples (companies who have undergone successful interventions vs. unsuccessful interventions) independent? Or should I rather use the Wilcoxon SIGNED rank test?
Any help is much appreciated.
My best, Christian

Best Answer

The t-test assumes your data are normally distributed. The Wilcoxon rank sum test is nonparametric (although the statistic derived from it is normally-distributed, creating the z-score).
I would use histfit to begin with to see how your data are distributed, then choose the appropriate test.