Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 8. Formatting Variables, Recodin... > 8.8 Case Study 2: Monte Carlo Integr...

8.8 Case Study 2: Monte Carlo Integration to Estimate an Integral

Another really cool thing to do is estimate integrals using stochastic methods. The area (volume) under a curve (surface) can be estimated from the proportion of points randomly generated in some space that lie beneath the curve (surface) multiplied by the area (volume) of the space. To make this concrete, consider the problem of estimating the area under a standard normal density function between 0 and 1.645. You probably already know the answer—you can read the table. But, let's see how to implement a stochastic solution. The rough idea of a stochastic solution is described in Display 8.41.

Display 8.41. Pseudocode for stochastic solution (the Monte Carlo integration)



  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint