This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 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 ddimensional 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 setup includes the calculation of probabilities: Say d = 1, and set h ( x ) = 1 { x ≥ K } = 1 if x ≥ K 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 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....
View
Full
Document
This note was uploaded on 01/10/2011 for the course STAT 160A taught by Professor Bonnet during the Winter '10 term at UCSB.
 Winter '10
 bonnet
 Variance

Click to edit the document details