Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Beryl

Pages: [1]
1
Questions for R / RStudio (Fall 2023) / HW7 Problem #4.
« on: October 23, 2023, 09:19:12 pm »
In Problem(4), I have a question when generating r.v. by using the inverse cdf approach.

I think I am supposed to generate r.v. from X which has a pdf of h(x)=1/(0.87*(1+x^2/2)) by inverse cdf approach to finish the Importance Sampling Apporach of M.C intergral.

But I calculated the Inverse CDF H^-1(x), which is sqrt(2)*tan(0.87*x/sqrt(2)) by calculation of intergral and is not equal to the Inverse cdf which the question provided. I then make a plot by tried both H^-1(x) and check the histogram of r.v. and compared with the h(x) and I found the r.v. generated under my calculated H^-1(x) has a histogram fits the curve of h(x).

Is there anything wrong?


2
Questions for R / RStudio (Fall 2023) / HW1 #5
« on: September 01, 2023, 07:18:27 pm »
hello world!

Pages: [1]