Recent Posts

Pages: 1 ... 7 8 [9] 10
81
Questions for R / RStudio (Spring 2023) / Re: Thank you!
« Last post by Darth Knight on May 17, 2023, 08:13:20 pm »
Thank you, Cat.

I've also learned a lot from everyone.
I hope you have a great summer break!

82
Questions for R / RStudio (Spring 2023) / Thank you!
« Last post by Cat on May 17, 2023, 06:01:15 pm »
It's really precious memory to study with everyone in this semester :) and thank you to our Darth Knight who always helped us in needed
Hope everyone just finished your final week and enjoy the summer vaccation!
See you next semester and seniors on the ceremory  :-*
83
It guess it could take some time when we use B=10000 and B2=500 for the bootstrap replications.

We can instead use B=2000 and B2=50 to check the procedures,
and put B=10000 and B2=500 for your final knitting.

84
Questions for R / RStudio (Spring 2023) / Re: Homework 9 Problem 1.2
« Last post by Darth Knight on April 26, 2023, 09:15:37 am »
Hi Cat,

I have almost missed this one as the subject is referring HW 9.  ::)

median() provides us a sample median. We can use it to obtain an estimate; whereas,
M (Median) is a population median, that splits a population density in half in terms of the area.
So, the left hand side area is 0.5 and the right hand side area is 0.5 from the M.
(Note also that an area under a density always means probability.)

Now, the quantile function (or inverse cdf) provides us a "point" when the left-hand side probability (area) from the point is given.
When the population distribution is exponential, qexp() is the R built-in quantile function, so what would you plug in there to obtain the M?

Once you obtain the M, the notation f() is the density, given exponential we can use dexp()!

Please feel free to let me know if you have any further questions.



85
Questions for R / RStudio (Spring 2023) / Homework 9 Problem 1.2
« Last post by Cat on April 24, 2023, 05:08:03 pm »
Good afternoon guys, Could you please provide some hint on how do we obtain M in this problem? I'm kind of confused that isn't the population median just median(exp_rv) here? and how do we use qexp to get this.

Besides, does the f^2(M) in the formula implies that we need to plug this M into function f and take sqaure of it. ???
86
Questions for R / RStudio (Spring 2023) / Re: HW 9 #1
« Last post by Darth Knight on April 11, 2023, 08:35:06 pm »
Sure, Kieran.

Uniform(0,0.2) is not an ideal choice, but I imposed it to create a burn-in stage in this HW.
It never generates a negative value in its initial stage,
but you could have it in its second or third stages, causing the denominator to be 0.

In general, the candidate density has a higher tendency to move to the right-hand side.
So, I would say it is quite rare to have the situation in this particular example.

Yes, Uniform(0.4,0.6) would be a better choice
since it is closer to the target density.
Then there will be essentially no burn-in stage,
so we could use the whole Markov Chain.
87
Questions for R / RStudio (Spring 2023) / HW 9 #1
« Last post by Kieran OConnor on April 11, 2023, 05:35:51 pm »
When I try to implement Unif(0,0.2) as the initial candidate density, I get divide by zero errors since if it generates a negative number, then dbeta(x,12,12) is 0, causing the DENOM to be 0. Wouldn't it make more sense for the candidate density to be unif(0.5,0.2) since that matches the dbeta distribution more?
88
Questions for R / RStudio (Spring 2023) / Re: A question for HW8 #1.3
« Last post by Darth Knight on April 02, 2023, 01:31:28 pm »
Hi Cat,

Please just use the sample size n=20 for your approximation, that is all.
I think that part was irrelevant, so let me erase "with degrees of freedom 20" to avoid confusion.
89
Questions for R / RStudio (Spring 2023) / A question for HW8 #1.3
« Last post by Cat on April 02, 2023, 01:28:42 pm »
Hey guys, I have a question on #1.3 said that "approximate the MSE of the cauchy distribution with degress of freedom 20..." But I don't understand what the degree of freedom is in Cauchy distribution. Could you plz help me with that ???
90
Hi Cat,

Sorry for this late response.
I am not sure why I didn't receive a notice for your posting.

It was just mismatching the argument and the variable in the body:
Code: [Select]
g_2 <- function(x,z){
  return(z*exp(-((z*y)^2)/2))
}
That is, we need to replace the argument x by y.

The function g_2() comes from the form of the change of variable approach on Page 30.

I will not miss new postings again!
Pages: 1 ... 7 8 [9] 10