acceptance rejection method
play

Acceptance-Rejection method The acceptance-rejection method is - PowerPoint PPT Presentation

Acceptance-Rejection Method Acceptance-Rejection method The acceptance-rejection method is usually used when the inverse transform method is not directly applicable or is inefficient. To simulate a sample x of X with pdf f X . Aim: 1 Consider a


  1. Acceptance-Rejection Method Acceptance-Rejection method The acceptance-rejection method is usually used when the inverse transform method is not directly applicable or is inefficient. To simulate a sample x of X with pdf f X . Aim: 1 Consider a random variable Y with pdf f Y whose sample can be simulated. R.B. Lenin (rblenin@daiict.ac.in) () Random Variate Generation Autumn 2007 38 / 46

  2. Acceptance-Rejection Method Acceptance-Rejection method The acceptance-rejection method is usually used when the inverse transform method is not directly applicable or is inefficient. To simulate a sample x of X with pdf f X . Aim: 1 Consider a random variable Y with pdf f Y whose sample can be simulated. 2 Choose a constant c such that f X ( t ) ≤ cf Y ( t ) , ∀ t . The random variable Y is said to majorize X . R.B. Lenin (rblenin@daiict.ac.in) () Random Variate Generation Autumn 2007 38 / 46

  3. Acceptance-Rejection Method Acceptance-Rejection method The acceptance-rejection method is usually used when the inverse transform method is not directly applicable or is inefficient. To simulate a sample x of X with pdf f X . Aim: 1 Consider a random variable Y with pdf f Y whose sample can be simulated. 2 Choose a constant c such that f X ( t ) ≤ cf Y ( t ) , ∀ t . The random variable Y is said to majorize X . Suppose X and Y are discrete random variables with pmfs 1 p i = Pr { X = i } , q i = Pr { Y = i } . Then c can be chosen as follows: � p j � c = max : j ≥ 1 q j R.B. Lenin (rblenin@daiict.ac.in) () Random Variate Generation Autumn 2007 38 / 46

  4. Acceptance-Rejection Method Acceptance-Rejection method The acceptance-rejection method is usually used when the inverse transform method is not directly applicable or is inefficient. To simulate a sample x of X with pdf f X . Aim: 1 Consider a random variable Y with pdf f Y whose sample can be simulated. 2 Choose a constant c such that f X ( t ) ≤ cf Y ( t ) , ∀ t . The random variable Y is said to majorize X . Suppose X and Y are discrete random variables with pmfs 1 p i = Pr { X = i } , q i = Pr { Y = i } . Then c can be chosen as follows: � p j � c = max : j ≥ 1 q j Suppose X and Y are continuous random variables with PDFs f X and f Y . 2 Then c can be chosen as � f X ( x ) � c = max f Y ( x ) : ∀ x . R.B. Lenin (rblenin@daiict.ac.in) () Random Variate Generation Autumn 2007 38 / 46

  5. Acceptance-Rejection Method Acceptance-Rejection method · · · Figure: Acceptance-Rejection method R.B. Lenin (rblenin@daiict.ac.in) () Random Variate Generation Autumn 2007 39 / 46

  6. Acceptance-Rejection Method Acceptance-Rejection method · · · The algorithm for this method is as follows: 1 Generate a random variate y 1 from the distribution of Y . R.B. Lenin (rblenin@daiict.ac.in) () Random Variate Generation Autumn 2007 40 / 46

  7. Acceptance-Rejection Method Acceptance-Rejection method · · · The algorithm for this method is as follows: 1 Generate a random variate y 1 from the distribution of Y . 2 Generate a uniform random number variate y 2 between 0 and cf Y ( y 1 ) as follows: R.B. Lenin (rblenin@daiict.ac.in) () Random Variate Generation Autumn 2007 40 / 46

  8. Acceptance-Rejection Method Acceptance-Rejection method · · · The algorithm for this method is as follows: 1 Generate a random variate y 1 from the distribution of Y . 2 Generate a uniform random number variate y 2 between 0 and cf Y ( y 1 ) as follows: Generate a uniform random number r . 1 R.B. Lenin (rblenin@daiict.ac.in) () Random Variate Generation Autumn 2007 40 / 46

  9. Acceptance-Rejection Method Acceptance-Rejection method · · · The algorithm for this method is as follows: 1 Generate a random variate y 1 from the distribution of Y . 2 Generate a uniform random number variate y 2 between 0 and cf Y ( y 1 ) as follows: Generate a uniform random number r . 1 Compute y 2 = 0 + ( cf Y ( y 1 ) − 0) r = cf Y ( y 1 ) r . 2 R.B. Lenin (rblenin@daiict.ac.in) () Random Variate Generation Autumn 2007 40 / 46

  10. Acceptance-Rejection Method Acceptance-Rejection method · · · The algorithm for this method is as follows: 1 Generate a random variate y 1 from the distribution of Y . 2 Generate a uniform random number variate y 2 between 0 and cf Y ( y 1 ) as follows: Generate a uniform random number r . 1 Compute y 2 = 0 + ( cf Y ( y 1 ) − 0) r = cf Y ( y 1 ) r . 2 3 If y 2 < f X ( y 1 ), then x = y 1 , else go to Step 1. R.B. Lenin (rblenin@daiict.ac.in) () Random Variate Generation Autumn 2007 40 / 46

  11. Acceptance-Rejection Method Acceptance-Rejection method · · · The above algorithm is equivalent to the following: steps: R.B. Lenin (rblenin@daiict.ac.in) () Random Variate Generation Autumn 2007 41 / 46

  12. Acceptance-Rejection Method Acceptance-Rejection method · · · The above algorithm is equivalent to the following: steps: 1 Generate a random variate y 1 from the distribution of Y . 2 Generate a uniform random number r in [0 , 1]. R.B. Lenin (rblenin@daiict.ac.in) () Random Variate Generation Autumn 2007 41 / 46

  13. Acceptance-Rejection Method Acceptance-Rejection method · · · The above algorithm is equivalent to the following: steps: 1 Generate a random variate y 1 from the distribution of Y . 2 Generate a uniform random number r in [0 , 1]. 3 If r ≤ f X ( y 1 ) cf Y ( y 1 ), then x = y 1 , else go back to step 1. R.B. Lenin (rblenin@daiict.ac.in) () Random Variate Generation Autumn 2007 41 / 46

  14. Acceptance-Rejection Method Gamma random variate Gamma random variate for 1 < k < 5 The variate is generated by the acceptance-rejection method, where the majorizing distribution is Erlang with parameter λ and k , where k = ⌊ k ⌋ . Figure: Gamma random variate for k = 2 . 5 and λ = 1 R.B. Lenin (rblenin@daiict.ac.in) () Random Variate Generation Autumn 2007 42 / 46

  15. Acceptance-Rejection Method Gamma random variate Gamma random variate for k < 1 Let X be a gamma random variable with parameters λ, k . 1 Generate two random numbers r 1 and r 2 . R.B. Lenin (rblenin@daiict.ac.in) () Random Variate Generation Autumn 2007 43 / 46

  16. Acceptance-Rejection Method Gamma random variate Gamma random variate for k < 1 Let X be a gamma random variable with parameters λ, k . 1 Generate two random numbers r 1 and r 2 . 1 1 2 Compute x 1 = r 1 − k 1 , x 2 = r k . 2 R.B. Lenin (rblenin@daiict.ac.in) () Random Variate Generation Autumn 2007 43 / 46

  17. Acceptance-Rejection Method Gamma random variate Gamma random variate for k < 1 Let X be a gamma random variable with parameters λ, k . 1 Generate two random numbers r 1 and r 2 . 1 1 2 Compute x 1 = r 1 − k 1 , x 2 = r k . 2 3 Generate an exponential random variate with parameter λ , say, y . R.B. Lenin (rblenin@daiict.ac.in) () Random Variate Generation Autumn 2007 43 / 46

  18. Acceptance-Rejection Method Gamma random variate Gamma random variate for k < 1 Let X be a gamma random variable with parameters λ, k . 1 Generate two random numbers r 1 and r 2 . 1 1 2 Compute x 1 = r 1 − k 1 , x 2 = r k . 2 3 Generate an exponential random variate with parameter λ , say, y . yx 1 4 Then the sample x of X is x = . x 1 + x 2 R.B. Lenin (rblenin@daiict.ac.in) () Random Variate Generation Autumn 2007 43 / 46

  19. Acceptance-Rejection Method Gamma random variate Gamma random variate for k > 5 Let a = ⌊ k ⌋ . Then choose the sample x of X randomly 1 from Erlang with parameters λ, a with probability 1 − ( k − a ). R.B. Lenin (rblenin@daiict.ac.in) () Random Variate Generation Autumn 2007 44 / 46

  20. Acceptance-Rejection Method Gamma random variate Gamma random variate for k > 5 Let a = ⌊ k ⌋ . Then choose the sample x of X randomly 1 from Erlang with parameters λ, a with probability 1 − ( k − a ). 2 from Erlang with parameters λ, a + 1 with probability k − a . R.B. Lenin (rblenin@daiict.ac.in) () Random Variate Generation Autumn 2007 44 / 46

  21. Acceptance-Rejection Method Normal random variate Normal random variate - Polar form (Box-Muller form) 1 Generate two uniform random numbers r 1 and r 2 in [0 , 1]. Define v i = 2 r i − 1 , i = 1 , 2 and let w = v 2 1 + v 2 2 . R.B. Lenin (rblenin@daiict.ac.in) () Random Variate Generation Autumn 2007 45 / 46

  22. Acceptance-Rejection Method Normal random variate Normal random variate - Polar form (Box-Muller form) 1 Generate two uniform random numbers r 1 and r 2 in [0 , 1]. Define v i = 2 r i − 1 , i = 1 , 2 and let w = v 2 1 + v 2 2 . 2 If w = 0 or w > 1, go back to step 1. R.B. Lenin (rblenin@daiict.ac.in) () Random Variate Generation Autumn 2007 45 / 46

  23. Acceptance-Rejection Method Normal random variate Normal random variate - Polar form (Box-Muller form) 1 Generate two uniform random numbers r 1 and r 2 in [0 , 1]. Define v i = 2 r i − 1 , i = 1 , 2 and let w = v 2 1 + v 2 2 . 2 If w = 0 or w > 1, go back to step 1. � − 2 log w 3 Let y = , x 1 = v 1 y and x 2 = v 2 y . Then x 1 and x 2 are IID w N (0 , 1) random variates. R.B. Lenin (rblenin@daiict.ac.in) () Random Variate Generation Autumn 2007 45 / 46

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend