How can I perform a paired sample t test with unequal sample sizes ?
20 views (last 30 days)
Show older comments
Dear all,
I have two samples with different sizes and would like to run a mean difference using a paired t-test,
my problem is that I cannot find any tests proposed on Matlab that allow me to run a paired t-test for samples with unequal sizes.
Thank you for your help !
5 Comments
Star Strider
on 3 Aug 2017
@Math93 —
Please do not ever create data that do not exist using interpolation (or any other method)!
Data are data, and interpolating just to provide equal sample sizes will lead to unusable results. There are several statistical methods to deal with unequal sample sizes, one of which I mentioned in my Answer.
Accepted Answer
KSSV
on 1 Aug 2017
Use interp1 and get the data sets to same dimensions.....Read about interp1
2 Comments
More Answers (2)
Star Strider
on 1 Aug 2017
I would use the Wilcoxon rank sum test for your data. This assumes that they are (1) independent, and (2) identically distributed, but the distribution itself is irrelevant. Use the ranksum function for the test.
0 Comments
Abubakar Mallam Aliyu
on 10 Sep 2017
Edited: Abubakar Mallam Aliyu
on 10 Sep 2017
The simplest way to solve this problem is by reducing the number of your observations to become equal and is possible through random selection. Follow this link for reference. Watch video 1 and 2. dealing with unequal sample size in paired sampled test 2
1 Comment
Star Strider
on 10 Sep 2017
Wrong!
The simplest correct way to solve the problem is to use an unpaired test. Paired data are always equal-sized because you are testing the results of some intervention on the same group.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!