Kruskal Wallis Test interpretation I am asked to compare following 4 samples.:
$\begin{matrix}
G1& G2&G3&G4\\
2 & 3& 3 &4\\
3 &4 &5& 6\\
1 &2& 1& 2\\
1& 1& 2 &2\\
1 &1 &2& 3\\
2 &2 &2& 2\\
\end{matrix}
$
I did the test and found a H value of 3.755, which with 3 DF is nowhere near significant. However, shouldnt there be a difference between G1 and G4? If i was just to do a rank sum test between G1 and G4 it would be significant. 
Does the Kruskal Wallis test not interpret any difference between any group? Or did I just make a mistake in the analysis?
Any help appreciated!
 A: I got an $H$ value of $4.1343$ using the R implementation of the Kruskal-Wallis test, for a p-value of $0.2473$, which is not significant (as you said). Like you, when I test G$1$ against G$4$ then I get a much more significant result (p-value $0.0539$).
The reason for the discrepancy is that the Kruskall-Wallis test is automatically correcting for the fact that we are testing multiple hypotheses at the same time. We are testing if there is a difference between the means of $1$ and $2$, and at the same time we are testing if there is a difference between the means of $1$ and $3$, while also testing for a difference between the means of $1$ and $4$, and so on. By just looking at one pair of samples and ignoring the others you are very likely to believe there is a difference just due to random sampling error. With $4$ data sets, at least one pair are quite likely to look different just by random chance, and the Kruskall-Wallis test accounts for this.
An illustrative example from the Wikipedia page on the multiple testing problem:

Suppose the treatment is a new way of teaching writing to students, and the control is the standard way of teaching writing. Students in the two groups can be compared in terms of grammar, spelling, organization, content, and so on. As more attributes are compared, it becomes increasingly likely that the treatment and control groups will appear to differ on at least one attribute due to random sampling error alone.

R code for testing for the two tests that I performed:
g1 = c(2, 3, 1, 1, 1, 2)
g2 = c(3, 4, 2, 1, 1, 2)
g3 = c(3, 5, 1, 2, 2, 2)
g4 = c(4, 6, 2, 2, 3, 2)
kruskal.test(list(g1, g2, g3, g4))

Output:
Kruskal-Wallis rank sum test

data:  list(g1, g2, g3, g4)
Kruskal-Wallis chi-squared = 4.1343, df = 3, p-value = 0.2473

Just comparing G$1$ and G$4$:
kruskal.test(list(g1, g4))

Output:
Kruskal-Wallis rank sum test

data:  list(g1, g4)
Kruskal-Wallis chi-squared = 3.7158, df = 1, p-value = 0.0539

