Doubly type II censoring occurs when the first lifetimes and the last lifetimes out of n inspected items are missing. In the paper, we propose an unbiased and consistent estimator of parameters of Rayleigh distributions. Then confidence intervals for parameters of Rayleigh distributions are constructed and prediction intervals for future observations are established based on doubly type II censored samples.