Here is the code I showed in the class for evaluation of error function.
Here are the lectures notes I use in the class.
Assignment on MC methods.
Here are the notes I used on statistical error analysis.