Elements of Probabilistic Analysis with Applications