How can I perform a paired sample t test with unequal sample sizes ?
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
By definition a paired t-test is performed on two random samples of the same size. If they are not of the same size then you just can't do it.
You could instead compare if the samples come from the same distribution (or whatever it is your are trying to achieve) using a KS test or other some such (then again depending on what you want to actually do).
Math93
on 1 Aug 2017
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
More Answers (2)
Star Strider
on 1 Aug 2017
1 vote
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.
Abubakar Mallam Aliyu
on 10 Sep 2017
Edited: Abubakar Mallam Aliyu
on 10 Sep 2017
0 votes
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.
Categories
Find more on Testing Frameworks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!