I have two samples x=[7,6,4] and y=[5,9] and I want to test the hypothesis of them having equal means versus the hypothesis that the distribution of y being stochastically larger than the distribution of x, using a permutation test. The empirical distribution functions suggest that y is stochastically larger than x but it is very close. I am supposed to use the test statistic T=mean(y)-mean(x). How would this test statistic contain information about whether Y is stochastically larger than X or not?
Thanks in advance.
Re: Permutation test
If you are using a permutation test, you will get a distribution of values for mean(y) - mean(x) and within this distribution, you want to find the values of this distribution where alpha/2 in probability are to the left of one critical value and alpha/2 are to the right of another critical.
If the two are equal, it means that 0 will be in the interval not corresponding to the tails and if not, it won't.
Specifically, lets say your left hand critical value is A and the right hand critical value is B, then your confidence interval for alpha will be [A,B]. If the difference of the population means that correspond to a hypothesis is in this interval you fail to reject, but otherwise you have evidence to reject that hypothesis.
Since you are looking at them being the same, you are testing with 0 is in this interval.