R语言 | STATS 310/732, 2020 Assignment 4

联系我们: 手动添加方式: 微信>添加朋友>企业微信联系人>13262280223 或者 QQ: 1483266981
这是一篇是用R语言查找分布的概率值或分位数
STATS 310/732, 2020 Assignment 4
1. [18分]假设XGamma(2,θ)。我们希望使用单个值X = x进行测试
零假设
H0:θ= 1
反对替代假设
H1:θ= 2。
用C = {x:x 1。
(g)[2分]表明当替代假设为时,不存在UMP检验。
替换为H1:θ6 = 1。
(h)[2分]将上述结果扩展到更普遍的情况,其中X1,。 。 。 ,Xn
艾德
Gamma(2,θ)。表明存在用于针对H1:θ> 1来测试H0:θ= 1的UMP测试
并具有形式为Cα= {x:x
11
22

=

1n 0n z
0n 1n z

α1
α2
β

+

1
2

。
(b)[4分]显示β=(α1,α2,β)的最小二乘估计

是
βb=

11
22
(z
1+ z
T y2)/(2z
则

yi = n
-1 Pn
j = 1 yij。
(c)[4分]表明βb的协方差矩阵为
Cov(βb)=σ
2

1个

0 0
0
1个

0
0 0(2z
则
-1

。
(d) [4 marks] Verify that the estimate of σ
2
is
s
2 =
(n 1)(s
2
1 + s
2
2
)
2n 3
,
where s
2
i = (n 1)1 Pn
j=1(yij yi βzb j )
2
for i = 1, 2.
2
(e) [4 marks] If one would like to find the least squares estimate under the assumption
α1 = α2, one can rewrite the model using only two parameters such as β
= (α1, β1)
T
,
in the form
y = Xβ
+ ,
where = (
T
1
,
T
2
)
T
. Write down the new design matrix X and find the least
squares estimator of β

.
3
** Extra Questions for STATS 732 Only **
4. [6 marks] Show that the Bayes estimator of θ under loss
l(θ, θ b ) = |θb θ|
is the median (any median, if more than one) of the posterior density π(θ|x).
5. [14 marks] Assume that X1, . . . , Xn
iid~ N(0, θ1
) and the prior distribution of θ is
Gamma(k, λ).
(a) [4 marks] Show that the posterior distribution of θ is Gamma
k +
1
2
, λ +
1
2
ny
,
where y =
1
n
Pn
i=1 x
2
i
.
(b) [4 marks] Find the density function of the marginal distribution of Y =
1
n
Pn
i=1 X2
i
.
For the following parts, let k = 5, λ = 3, n = 10 and y = 1.
(c) [2 marks] Compute the Bayes estimate of θ under the squared error loss.
(d) [2 marks] Compute the central 95% credible interval for θ.
(e) [2 marks] Compute the narrowest 95% credible interval for θ.

发表评论

了解 KJESSAY历史案例 的更多信息

立即订阅以继续阅读并访问完整档案。

继续阅读