Statistical inference for Rayleigh distributions