Application of stochastic processes for some effects in quantum optics