Comparing the responses of two groups to a same test I have a very basic question concerning how to compare the responses of two groups of subjects, group = A and group = B, to a same test. The responses are stored in x. 
My starting dataset is in the following form:
id    group    x 
1       A     15
2       A     17
3       A     22
...

50      B     22
51      B     12
52      B     13

...

My initial idea was to split x into two variables xA and xB, and then to sort both of them according to their group, like this:
    xA      xB
    15      12
    17      13     
    22      22     
   ...     ...

Then I wanted to run a simple Pearson's test between the newly created xA and xB.
To me this strategy seems rather artificial: I am sorting the variables before making the comaparison, which makes very likely to find some sort of linear dependence...
I am interested in evaluating whether there is some sort of accordance between the subjects of the two grous in answering to the test. I also thought to adopt a Wilcoxon test on the equality of the medians of the two variables.  
Which  strategy would you suggest? 
 A: So the main methods available would be an independent samples t-test (unpaired t-test) -- which asks whether the sample means for the two groups were likely to arise from two populations with the same means -- or a Wilcoxon-Mann-Whitney test,  (which doesn't technically test whether medians are equivalent in two groups -- see e.g. Why is the Mann–Whitney U test significant when the medians are equal? which links through to a detailed explanation at http://www.ats.ucla.edu/stat/mult_pkg/faq/general/mann-whitney.htm)
Both of these approaches are about asking whether the distribution of scores differs by group, which seems to accord with your question.
When you say you might do a Pearson's test to look at the relationship, do you mean a correlation? That wouldn't make sense, due to arbitrary pairing (which you've kind of identified already). I can't think of any variation on this which would be appropriate for your data, and the above methods would suffice if they match your analysis aims.   
