DIR Return Create A Forum - Home
---------------------------------------------------------
QA_Board
HTML https://qaboard.createaforum.com
---------------------------------------------------------
*****************************************************
DIR Return to: Questions for R / RStudio (Fall 2023)
*****************************************************
#Post#: 129--------------------------------------------------
Question for HW6 Plot Picture
DIR By: YuyangWu
Date: October 20, 2023, 5:47 pm
---------------------------------------------------------
I just finished the HW6 Q3. The picture of the plot seems so
strange. It does not like we discuss in the class. Is it caused
by we consider the any numbers (z > 0 and z < 0)? Thank you!
#Post#: 130--------------------------------------------------
Re: Question for HW6 Plot Picture
DIR By: Taeho Kim
Date: October 20, 2023, 6:06 pm
---------------------------------------------------------
Hi,
You must be using an if statement to distinguish between the
cases when z>0 and z<0.
Yes, you need to address the Naive uniform approach.
For the case where z<0, please carefully review the arguments
for "runif()"
and the value for the height of f(x).
However, you could consider moving the change of variable (COV)
approach outside of the if statement.
You will notice that the COV approach works for any z values.
I hope this provides some help.
#Post#: 155--------------------------------------------------
Re: Question for HW6 Plot Picture
DIR By: Bella
Date: December 17, 2023, 10:50 am
---------------------------------------------------------
The problem maybe on your function to define the x range.
*****************************************************
Page 1 of 1