Large deviations for estimators of unknown probabilities, with applications in risk theory