How to test if the change in difference between 2 distributions is significant?

I have 2 different conditions of 'behaviour state' and 2 different people. I'm trying to find a way to test if the difference in distributions (which I'm assuming are approximately normal) changes significantly between these conditions, and cannot for the life of me figure out how to do this (particularly in MATLAB). Each person has a different number of observations, so I can't simply act as if they were matched pairs and subtract.

Or in other words, if the difference $\Delta_1$ between people $X_1$ and $Y_1$ differs significantly between the difference $\Delta_2$ between people $X_2$ and $Y_2$.

If Δ1 and Δ2 can be viewed as two separate samples, you could use a two-sample Kolmogorov-Smirnov test to see if they have different distributions (kstest2 function). Or there are different functions to see if they have different means or medians or whatever.

But I am not sure if I understand correctly. This would not require that Δ1 and Δ2 have the same number of observations, but it would require that X1 and Y1 have the same number and can be subtracted to get Δ1.

• Sorry- I should have clarified better- X1 and Y1 also don't have the same number of data points >.< Apologies for the confusion and very much appreciate the suggestion though! – user41916 Aug 11 '14 at 18:57
• What about this? Stack up all the X and Y data as a single vector. Create predictor P1 that is -1 for X values and +1 for Y values. Create predictor P2 that is -1 for X1/Y1 values and +1 for X2/Y2 values. Do a regression including a constant, P1, P2, and P1*P2. See if the interaction is significant. – Tom Lane Aug 18 '14 at 2:46

Have You tried non-parametric tests? Wilcoxon/Mann-Whitney? If using R programe, them the Command is wilcox.test .

In my experiences, I have found that using Levene's Test works quite well. It does not require the sample sets to have the same number data points and it is not sensitive to non-normality. http://www.itl.nist.gov/div898/handbook/eda/section3/eda35a.htm