Thanks for the answer Gustavo, I solved with this:
ascisse = Table[sort[[i]][[1]], {i, 1, npunti}];
ascisse2 = DeleteDuplicates[ascisse];
nscisse2 = Length[ascisse2];
vettoreord = Table[{}];
For[i = 1, i < nscisse2 + 1, i++,
riga = Cases[sort, {ascisse2[[i]], , }];
ordinateriga = Table[riga[[i]][[2]], {i, 1, Length[riga]}];
psi = Table[riga[[i]][[3]], {i, 1, Length[riga]}];
mediaord = Mean[ordinateriga];
vettoreord = Append[vettoreord, mediaord]];
The problem was that some abscissa were assosiated to more ordinates.
Really thank you for yours advice.