Starting from:

$29.99

STA360-602 Homework 4 Solution

STA-360/602
General instructions for homeworks: Please follow the uploading file instructions according to the syllabus. You will give the commands to answer each question in its own code block, which will also produce plots that will be automatically embedded in the output file. Each answer must be supported by written statements as well as any code used. Your code must be completely reproducible and must compile.
Commenting code Code should be commented. See the Google style guide for questions regarding commenting or how to write code https://google.
github.io/styleguide/Rguide.xml. No late homework’s will be accepted.
1. (10 points, 5 points each) Hoff, 3.10 (Change of variables).
Let ψ = g(θ), where g is a monotone function of θ, and h be the inverse of g so that θ = h(ψ). If pθ(θ) is the probability density of θ, then the probability density of ψ induced by pθ is given by
.
(a) Let θ ∼ beta(a,b) and let ψ = log[θ/(1 − θ)]. Obtain the form of pψ and plot is for the case that a = b = 1.
Hint: Show that
,
when a = b = 1.
(b) Let θ ∼ gamma(a = shape,b = rate) and let ψ = log(θ). Obtain the form of pψ and plot is for the case that a = b = 1. Hint: Show that
,
when a = b = 1.
1
2. Lab component (25 points total) Please refer to lab 4 and complete tasks 4—5.
(a) (10) Task 4
(b) (15) Task 5
2

More products