Monte Carlo
摘要
The movie Oppenheimer, directed by Christopher Nolan, is a great hit, bagging a whopping seven Academy Awards including Best Picture, Best Director, Best Actor, and Best Supporting Actor. The movie unfolds against the backdrop of the Manhattan Project. During the famous Manhattan Project, computer simulations were used to simulate nuclear chain reactions. The Monte Carlo method was invented at the same time by Stanislaw Ulam and John von Neumann. In this chapter, we will learn how to generate random numbers and test their uniformity and independence statistically. We will also see Monte Carlo in action: from finding the value of π to solving integrals. We will further introduce the Markov Chain Monte Carlo and one of its applications: drawing samples from a probability density function using the Metropolis–Hastings algorithm. We will conclude the chapter by presenting an application of Monte Carlo in simulating the endemic.