Techniques for Probabilistic Analysis and Randomness-Efficient Computation