This paper presents a permutation test that statistically compares two groups of scanpaths. The test uses normalized Levenshtein distances when the lengths of scanpaths are not the same. This method was applied in a recent eye-tracking experiment in which two groups of chemistry students viewed nuclear magnetic resonance (NMR) spectroscopic signals and chose the corresponding molecular structure from the candidates. A significant difference was detected between the two groups, which is consistent with the fact that students in the expert group showed more efficient scan patterns in the experiment than the novice group. Various numbers of permutations were tested and the results showed that p-values only varied in a small range with different permutation numbers and that the statistical significance was not affected.