Please use set.seed(422) and provide R code

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Please use set.seed(422) and provide R code

Post by answerhappygod »

Please use set.seed(422) and provide R code
Please Use Set Seed 422 And Provide R Code 1
Please Use Set Seed 422 And Provide R Code 1 (219.26 KiB) Viewed 33 times
Problem 1. Dr. Lee wants to find an upper-tail critical value of chi-squared distribution but he doesn't remember the whole probability density function (pdf). Luckily, he remembers the pdf of the chi-squared distribution up to some constant, 2 k f(x) < x2-12-Ź, x > 0. e = 1. (20 pts) Use the Metropolis-Hastings algorithm to generate a random sample of size 10,000 from the chi-squared distribution with 5 degrees of freedom (k = 5). Find 95th percentile (or quantile) of your sample which can be used as upper-tail critical value when the significance level is 0.05. (Hint: Use the log-normal distribution (meanlog 0, sdlog Xt) as proposal dis- tribution. To calculate the log-normal density, use dlnorm(x, meanlog, sdlog). To generate sample from the log-normal density, use rlnorm(n, meanlog, sdlog).) = =
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply