ST219 Written Assignment (2021-2022)
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
ST219 Written Assignment (2021-2022)
This assignment carries 10% of the credit for ST219.
Because this assignment is assessed for credit, you must adhere at the academic integrity policy and submit your own independent work and not collaborate or discuss with other students.
Deadline: Wednesday the 9th March at noon. You may submit it handwritten or typed. If handwritten, it must be legible and large enough. Instructions on how to scan your work and submit it will be available on the Moodle webpage.
Always make sure that
● all variables are clearly defined;
● you justify your derivations and deductions, explaining which assumptions/results you have used;
● you use mathematical notation correctly;
● results are checked for correctness and presented neatly.
● your numeric answers are presented as a decimal correct to three decimal places (after rounding), i.e. 0.12573 becomes 0.126.
Your work will receive marks not only for correctness, but also for clarity of the argument. A correct result without argument (e.g. without stating that a certain result is true due to the independence of the random variables) will not yield a full mark. I strongly advise you to attempt the non-assessed assignments (Weeks 5-8) before attempting this assessed assignment.
——————————————————————————————————-
|
Q1 |
Q2 |
Tot |
Marks |
/11 |
/9 |
/20 |
Question 1
Suppose that (S, (fθ : θ e Θ S R}) is a statistical model, corresponding to an observed random vector X = (X1, . . . , Xn). Let X = (X1, . . . , Xn) consist of independent and identically distributed normal random variables Xi, such that Xi ~ N(0, θ), θ > 0.
Let φ : S → [0; 1] be a test function for the hypothesis hypothesis H0 : θ = θ0 vs H1 : θ = θ 1 , with θ 1 > θ0 , such that for given observations x = (x1 , . . . , xn), we reject the null hypothesis with probability φ(x).
(i) Describe the statistical model for X, by explicitly describing S , fθ and Θ. [1 mark]
(ii) Show that the Uniformly Most Powerful (UMP) test of size α has the form
, .(.) 1,
φ(x) = .
.(.) 0, .
n
if xi(2) > C
i=1
.
if xi(2) < C
i=1
(1)
[You need to derive the UMP test of size α and show that it is equal to (1). Remember to argue why the test function has such form, and which theorem/result you are using.] [3 marks]
(iii) Write down the condition that C needs to satisfy for the test φ(x) to be of size α . [1 mark]
(iv) Suppose θ0 = 3, θ1 = 5, α = 0.05 and n = 12. Describe the UMP test explicitly, deriving the distribu-
tion of the test statistics under Pθ0 , the test function and the value C. You may use the additional R output below,
> Pr <- c(0.01,0.05, 0.1, 0.9, 0.95,0.99)
> Summary<-cbind(Pr,qChisq_3=qchisq(Pr,3),qChisq_5=qchisq(Pr,5),
+ qChisq_12=qchisq(Pr,12),qChisq_15=qchisq(Pr,15))
> round(Summary,3)
Pr qChisq_3 qChisq_5 qChisq_12 qChisq_15
[1,] 0.01 0.115 0.554 3.571 5.229
[2,] 0.05 0.352 1.145 5.226 7.261
[3,] 0.10 0.584 1.610 6.304 8.547
[4,] 0.90 6.251 9.236 18.549 22.307
[5,] 0.95 7.815 11.070 21.026 24.996
[6,] 0.99 11.345 15.086 26.217 30.578
where qChisq_a denotes the quantile of a χ2 distribution with a degree of freedom.
[Hint: You can use without proof that since X_ ~ N(0, 1) and X1, . . . , Xn are i.i.d. random variables,
i(2) ~ χ2 (n)]. [4 marks]
(v) For the values of θ0 , θ 1 , α and n given in (iv), compute the probability of Type I error and the probability of Type II error for the test function derived in (iv), deriving the underlying quantities of interest using the additional R output below
> Q<- c(3, 5, 12.616, 21.026, 63.078)
> CDF<-cbind(Q,cdfChisq_3=pchisq(Q,3), cdfChisq_5=pchisq(Q,5),
+ cdfChisq_12=pchisq(Q,12), cdfChisq_15=pchisq(Q,15))
> round(CDF,3)
Q cdfChisq_3 cdfChisq_5 cdfChisq_12 cdfChisq_15
[1,] 3.000 0.608 0.300 0.004 0.000
[2,] 5.000 0.828 0.584 0.042 0.008
[3,] 12.616 0.994 0.973 0.602 0.368
[4,] 21.026 1.000 0.999 0.950 0.864
[5,] 63.078 1.000 1.000 1.000 1.000
where cdfChisq_a denotes the cumulative distribution function of a χ2 distribution with a degrees of freedom. [2 marks]
Question 2
Suppose that (S, (fθ : θ e Θ S R}) is a statistical model, corresponding to an observed random vector X = (X1, . . . , Xn). Let X = (X1, . . . , Xn) consist of independent and identically distributed Binomial random variables Xi, such that Xi ~ Bin(m, θ), with given m e N and unknown θ e (0, 1).
Let φ : S → [0; 1] be a test function for the hypothesis H0 : θ < θ0 vs H1 : θ > θ0 , such that for given observations x = (x1 , . . . , xn), we reject the hypothesis with probability φ(x).
(i) Describe the statistical model for X, by explicitly describing S , fθ and Θ. [1 mark]
n
(ii) Compute the mean-squared error of θˆ(X) := Xi .
i=1
[2 marks]
(iii) Show that (θˆn(X))neN with θˆ(X) defined in (iii) is a consistent sequence of estimators. As the sequence
of estimators is consistent, does this imply that it is also asymptotically efficient? [2 marks]
(iv) We are given the information that the Uniformly Most Powerful (UMP) test of size α has test function
given by
, n
1, if xi > C,
.(.) i=1
φ(x) =...γ, if i1 xi = C, (2)
.(.) n
0, if xi < C,
. i=1
with (C, γ) satisfying
Pθ0 / i1 Xi > C、+ γPθ0 / i1 Xi = C、 = α.
Suppose that n = 15, m = 10, α = 0.05 and θ0 = . Describe the UMP test explicitly, i.e., derive the test function φ(x) and the distribution of the test statistic under Pθ0 , describe how to derive (C, γ) and determine them using the additional R output below
> Pr <- b_0.01+0.05+ 0.1+ 0.9+ 0.95+0.99(
> suii-ry<-bafmc_Pr+
qB 10 0.Y5=qafmoi_Pr+10+0.Y5(+ qBfm 15 0.Y5=qafmoi_Pr+15+0.Y5(+qBfm 150 0.Y5=qafmoi_Pr+150+0.Y5(+ qBfm 10 0.4=qafmoi_Pr+10+0.4(+ qBfm 150 0.4=qafmoi_Pr+150+0.4(+
qBfm 10 0.5=qafmoi_Pr+10+0.5(+ qBfm 15 0.5=qafmoi_Pr+15+0.5(+qBfm 150 0.5=qafmoi_Pr+150+0.5((
> roumc_suii-ry+¥(
Pr qB 10 0.Y5 qBfm 15 0.Y5 qBfm 150 0.Y5 qBfm 10 0.4 qBfm 150 0.4 qBfm 10 0.5 qBfm 15 0.5 qBfm 150 0.5 [1+] 0.010 0 0 Y6 1 46 1 ¥ 61 [Y+] 0.050 0 1 Y9 Y 50 Y 4 65 [¥+] 0.100 1 Y ¥1 Y 5Y ¥ 5 67 [4+] 0.900 4 6 44 6 68 7 10 8¥ [5+] 0.950 5 7 46 7 70 8 11 85 [6+] 0.990 6 8 50 8 74 9 1Y 89 > p<-b_6+7+44+45+46+69+70+84+85(
> suii-ryY<-bafmc_p+bcaB 10 0.Y5=pafmoi_p+10+0.Y5(+bcaBfm 150 0.Y5=pafmoi_p+150+0.Y5(+
) bcaBfm 10 0.4=pafmoi_p+10+0.4(+ bcaBfm 150 0.4=pafmoi_p+150+0.4(+
) bcaBfm 10 0.5=pafmoi_p+10+0.5(+ bcaBfm 150 0.5=pafmoi_p+150+0.5((
> roumc_suii-ryY+¥(
p bcaB 10 0.Y5 bcaBfm 150 0.Y5 bcaBfm 10 0.4 bcaBfm 150 0.4 bcaBfm 10 0.5 bcaBfm 150 0.5
[1+] 6 0.996 0.000 0.945 0.000 0.8Y8 0.000 [Y+] 7 1.000 0.000 0.988 0.000 0.945 0.000 [¥+] 44 1.000 0.905 1.000 0.004 1.000 0.000 [4+] 45 1.000 0.9¥Y 1.000 0.007 1.000 0.000 [5+] 46 1.000 0.95¥ 1.000 0.011 1.000 0.000 [6+] 69 1.000 1.000 1.000 0.94¥ 1.000 0.185 [7+] 70 1.000 1.000 1.000 0.959 1.000 0.Y¥1 [8+] 84 1.000 1.000 1.000 1.000 1.000 0.940 [9+] 85 1.000 1.000 1.000 1.000 1.000 0.957
where qBin_a_b and cdfBin_a_b denote the quantile and the cumulative distribution function, re- spectively, of a Binomial distribution with a number of trials and probability b of success.
[Hint: Remember that the sum of two Binomial random variables with parameters (m1 , θ) and (m2 , θ), respectively, it is also a Binomial random variable with parameter (m1 + m2 , θ).] [4 marks]
2022-03-09