Lectue 5 - Exercise Problems: Solutions

Author

Shunkei Kakimoto

1 User-Defined Functions

1.1 Exercise 1

1.2 Exercise 2 (A Bit Advanced)

2 Loops

2.1 Exercise 1 (Basics)

2.1.1 Problem 1

2.1.2 Problem 2

2.2 Exercise 2

2.3 Exercise 3

2.4 Exercise 4: Functions and Loops (Advanced, Interesting Problem!)

2.5 Exercise 5: Combining Datasets using Loop

3 Monte Carlo Simulation

3.1 Exercise 1: (Weak) Low of Large Number

3.2 Exercise 2: Two estimators to estimate the population mean?