On a nonparametric test for linear relationships