Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 1. Dr. Lee wants to check the mean of a chi-squared distribution with 4 degrees of freedom is 4. The chi-squared distribution with 4

image text in transcribedimage text in transcribed
Problem 1. Dr. Lee wants to check the mean of a chi-squared distribution with 4 degrees of freedom is 4. The chi-squared distribution with 4 degrees of freedom has density function f (2) = -xe-2, x>0. 1. (20 pts) Use the rejection sampling to generate a random sample of size 10,000 from the chi- squared distribution with 4 degrees of freedom. Find the Monte Carlo estimate of Ef (X) from the generated sample. (Hint: Use the log-normal distribution (meanlog = 0, sdlog = 2) as proposal distribution. To calculate the log-normal density, use dlnorm (x, meanlog, sdlog). To generate sample from the log-normal density, use rinorm (n, meanlog, sdlog).) 2. (20 pts) This time use the importance sampling to estimate the mean of the chi-squared distribu- tion with 4 degrees of freedom. In other words, find the Monte Carlo estimate of Ef (X) directly using the importance sampling. Also, draw a plot to show the convergence of the importance sampling approximation. (Hint: Use the log-normal distribution (meanlog = 0, sdlog = 2) as importance function. To calculate the log-normal density, use dlnorm (x, meanlog, sdlog). To generate sample from the log-normal density, use rlnorm(n, meanlog, sdlog).) Problem 2. Dr. Lee wants to generate random sample from t distribution with v = 4 degrees of freedom. However, he doesn't remember the full probability density function (pdf) of the t distribution. Luckily, he remembers the pdf of the t distribution up to some constant and he knows we can still use the Metropolis algorithm although we only know the t distribution up to some constant. - (v+ 1) / 2 f (20) ox - 00

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Differential Equations For Engineers

Authors: Wei Chau Xie

1st Edition

0511771037, 9780511771033

More Books

Students also viewed these Mathematics questions

Question

years ago. d Only using studies which feature empirical data.

Answered: 1 week ago