Rayleigh statistic working