160a_ho3 - Pstat160a Handout 3 Simulation of discrete...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Pstat160a Handout 3 Simulation of discrete random variable Content: I. Main motivations II. Random number generator III. Inverse transform method IV. Rejection method V. Variance reduction VI. Reference to the book and reading assignment I. Main motivations One of the main application of simulation arise in the situation when we are interested in finding the value θ where, for X a d -dimensional random vector X = ( X 1 , · · · , X d ) (typically), θ = E [ h ( X )] . In almost any cases but few “textbook” distributions, the expected value cannot be explicitly calculated. The main idea of Monte Carlo methods is to simulate a large number of realization X 1 , · · · X n of X (be careful, here we denote by X i the i th observation in a random sample with i.i.d observation with the same distribution as X not to be confused with X j , the j th coordinate of X ) and use the law of large number: ˆ θ = 1 n n X i =1 h ( X i ) -→ n →∞ E [ h ( X )] = θ, which is interpreted as 1 n n i =1 h ( X i ) E [ h ( X )] or ˆ θ θ when n is large. Note that this set-up includes the calculation of probabilities: Say d = 1, and set h ( x ) = 1 { x K } = 1 if x K 0 otherwise , then E [ h ( X )] = P ( X K ). In this case the law of large numbers means # { X i K } n P ( X K ), that is the proportion higher than K is approximately, when n is large, the probability to exceed K . Example: Probability of aggregate loss exceeding a threshold. In actuarial science (insurance) the number of claims of a given customer (or a group, or of all customers) during a given year is a random variable N . Claims (amount filled to the insurance company), indexed by i are i.i.d random variables X i , independent of N . The aggregated loss S is the total amount filled to the insurance, so S = N i =1 X i . Note that S is a compound random variable (random sum of random variables). One is interested in finding the probability of exceeding a (typically) large threshold. As an example, let N be Poisson with λ = 5, X i geometric with p = . 3, threshold K = 25. The Matlab function ‘compoundgeo.m’ gives the output below for a choice of n = 20 (way too low!), run twice. Notice the variability in the output (estimates are .10 and .25). In Matlab 1
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 However, for n = 50 , 000, the estimates are much more stable. In Matlab From this simulation, we estimate that the probability that S exceed 25 is a bit over 17%. For this sample size ( n = 50 , 000), a histogram and a smooth estimate of the pdf of S is given below. In Matlab II. Random number generator The starting point of any simulation procedure is a sequence of independent uniform U (0 , 1) random numbers. We will always assume that we have a method at our disposal to generate such sequence. In Matlab Developing and implementing efficient algorithms to create random number generator is a very important issue that is beyond the purpose of this class.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern