Question: Write function to generate a random sample of size n from the Gamma(, 1) distribution by the acceptance-rejection method. Generate a random sample of size
- Write function to generate a random sample of size n from the Gamma(, 1) distribution by the acceptance-rejection method. Generate a random sample of size 1000 from the Gamma(3,1) distribution. (Hint: you may use g(x) Exp( = 1/) as your proposal distribution, where is the rate parameter. Figure out the appropriate constant c).
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
