How can I perform a paired sample t test with unequal sample sizes ?

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).
Hi José-Luis, thank you for your answer !
Basically I believe my samples are paired and unequal because I am testing the mean differences between two parts of one group of companies, using a sorting rule such as: sub sample one is made out of all companies < or = to ... total assets, and sub sample two is made out of all companies > than ... total assets which then gives me two sub-samples of different size but that I believed are still paired because they come from the sample primer sample.
Is there anyway that even tough two samples come from the same primar sample they are not paired ?
Best
Math93
I am not sure I follow. But that is not what a paired sample means.
A typical example are before/after values, e.g. the weight if a group of people before and after a diet/workout regimen.
Then again, I am not certain I follow what you mean.
I am just unsure of which category my two samples belong too but they are not a before/after type of sample so I'll consider them as independent.
Thank you for your help José-Luis !
@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.

Sign in to comment.

 Accepted Answer

Use interp1 and get the data sets to same dimensions.....Read about interp1

2 Comments

Hello KSSV,
Thank you for the tip, I tried to interpolate but sadly it just deletes part of my second samples (i.e. if my samples were n=30 and n=35 it will just cut 5 observations from n=35 to n=30).
No it sould not...it depends on what x you have chosen.

Sign in to comment.

More Answers (2)

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.
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

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.

Sign in to comment.

Categories

Asked:

on 1 Aug 2017

Commented:

on 10 Sep 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!