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]
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 >
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
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 >
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!