Large Deviations in Monte Carlo Methods