Sampling Methods: Exercises and Solutions