Various simple and straightforward experiments with the Metropolis-Hastings algorithm and ordinary Monte Carlo methods. Some highlights:
-
The performance of Metropolis-Hastings algorithm is and to .
-
If X and Y are two independent exponentially distributed random variables with parameter 1, then X / (X Y) is uniformly distributed over the open interval (0,1). This analytically derived .
-
with added comparison of execution time differences between programming in basic style Python versus NumPy style Python.