Page 1 of 1

Suppose X is a continuous random variable on (0,0) with probability density func- tion aBr-1 g(x) x>0, (3+c^?? where a >

Posted: Thu Apr 28, 2022 7:43 am
by answerhappygod
Suppose X Is A Continuous Random Variable On 0 0 With Probability Density Func Tion Abr 1 G X X 0 3 C Where A 1
Suppose X Is A Continuous Random Variable On 0 0 With Probability Density Func Tion Abr 1 G X X 0 3 C Where A 1 (90.32 KiB) Viewed 26 times
Suppose X is a continuous random variable on (0,0) with probability density func- tion aBr-1 g(x) x>0, (3+c^?? where a > 0 and B > 0 are parameters. (a) Specify an algorithm to simulate from g using the inverse-transform method. [3 marks] (b) Implement the algorithm from part(a) in Python or R and provide the code. Simulate 10 random variables from g with a = 2 and B = 3. Provide a plot of the histogram together with the probability density function. [2 marks] (c) We want to construct an algorithm to simulate from the distribution with prob- ability density function = x-1/2 f(x) = = x>0, Var()(1+x)2

where I is the gamma function г= r(b) = $. zb-1e- dr. = We decide to use the acceptance-rejection with the distribution g as the proposal distribution setting a = 1/2 and B = 1/V3. i. Show that f/g attains a maximum at x* = 1/3. [2 marks] ii. Specify an algorithm to simulate from f using the acceptance-rejection method. [2 marks] iii. Determine the expected number of random variables from g that need to be generated to produce a single random variable from f? (The answer can involve the gamma function.) [1 mark] (d) Implement the algorithm from part (c) in Python or R and provide the code. Simulate 105 random variables from f. Provide a plot of the histogram together with the probability density function. [2 marks]