Examples and exercises from Robert and Casella's "Introducing Monte Carlo Methods with R"