” STATS 310/732编程 辅导、 写作R编程STATS 310/732, 2020 Assignment 4 Due: 3pm Wed 10 JuneIn general, you may use any results given in the course book or lectures to solve an assignmentproblem (unless the problem is about establishing the result itself). Some questions requirefinding probability Values or quantiles of a distribution. You may use R or any other statisticalsoftware to obtain them.1. [18 marks] Suppose X Gamma(2, ). We wish to use a single value X = x to testthe null hypothesisH0 : = 1against the alternative hypothesisH1 : = 2.Denote by C = {x : x a} the critical region of a test at the significance level of = 0.05.(Note: Our scale Parameter is the rate argument in the R functions for the Gammadistribution.)(a) [2 marks] What is the sample space S, the parameter space and the null parameterspace 0 of the test?(b) [2 marks] Compute a.(c) [2 marks] Compute the power of the test.(d) [2 marks] Compute the probability of Type II error.(e) [2 marks] Show that the test is the most powerful at level .(f) [2 marks] Show that the test is also the uniformly most powerful (UMP) test whenthe alternative hypothesis is replaced with H1: 1.(g) [2 marks] Show that there exists no UMP test when the alternative hypothesis isreplaced with H1: 6= 1.(h) [2 marks] Extend the above result to the more general situation where X1, . . . , XniidGamma(2, ). Show that the UMP test for testing H0: = 1 against H1: 1 existsand has the critical region of the form C = {x : x b}, where x = n1 Pni=1 xi.(i) [2 marks] Compute the value of b, when n = 10 and = 0.05.(Hint: What is the distribution of Pni=1 Xi under H0?)STATS 310/732作业 辅导、 写作R编程设计作业2. [12 marks] Let x Multinomial(n1, p) and y Multinomial(n2, q) independently,where p = (p1, p2, p3)Tand q = (q1, q2, q3)T. Denote = (pT, qT)Tand its MLE by b.(a) [3 marks] Show that b = (xT /n1, yT /n2)T.(b) [3 marks] Find the MLE b under the restriction p1 = q1.(c) [6 marks] For both n1 and n2 large, what are the approximate null distributionsof 2 log(LR) for the following tests? You do not need to derive expressions for2 log(LR).(i) H0 : p1 = q1 against H1 : p1 6= q1;(ii) H0 : p = q against H1 : p 6= q.(iii) H0 : p1 = p2 = p3 = q1 = q2 = q3 against H1 : At least one is different.3. [20 marks] An experimenter obtains observations yij of independent random variablesYij , for i = 1, 2 and j = 1, . . . , n, whereE(Yij ) = i + (xj x),xj being the jth value of a numerical explanatory variable with sample mean x. Denoteby ij = Yij E(Yij ) The errors, and assume ijiid N(0, 2) for all i and j. Note that 2is common to all errors.Further, denote yi = (yi1, . . . , yin)T and i = (i1, . . . , in)T, for i = 1, 2, and z = (x1 x, . . . , xn x)T. Also, 0n and 1n are vectors of length n with elements of 0, and 1,respectively.(a) [4 marks] Show that this model can be expressed as(b) [4 marks] Show the least squares estimator of = (1, 2, ).(c) [4 marks] Show that the covariance matrix of b is.(e) [4 marks] If one would like to find the least squares estimate under the assumption1 = 2,** Extra Questions for STATS 732 Only **4. [6 marks] Show that the Bayes estimator of under lossl(, b ) = |b |is the median (any median, if more than one) of the posterior density (|x).5. [14 marks] Assume that X1, . . . , Xniid N(0, 1) and the prior distribution of isGamma(k, ).(a) [4 marks] Show That the posterior distribution of is GammaFor 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 .如有需要,请加QQ:99515681 或邮箱:99515681@qq.com
“
添加老师微信回复‘’官网 辅导‘’获取专业老师帮助,或点击联系老师1对1在线指导。