A limit theorem and its applications