Skip to content

Various simple experiments with the Metropolis-Hastings algorithm and ordinary Monte Carlo methods. Personal project, autumn 2019.

Notifications You must be signed in to change notification settings

Jsos17/Monte_Carlo

Repository files navigation

Monte_Carlo

Various simple and straightforward experiments with the Metropolis-Hastings algorithm and ordinary Monte Carlo methods. Some highlights:

  • The performance of Metropolis-Hastings algorithm is compared to the inverse transform method and to SciPy's library implementation of the multivariate normal distribution.

  • 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 result is confirmed via Monte Carlo simulation.

  • An extremely simple example of Monte Carlo integration with added comparison of execution time differences between programming in basic style Python versus NumPy style Python.