Professional Documents
Culture Documents
Name:
Class:AMS132/AMS206 (Please circle)
FINAL
Please show your work in all the problems.
Problem 1: Suppose a random sample of 10 observations is taken from a normal distribution
with unknown mean and unknown variance. It is desired to test the hypothesis:
H0 : 2 4
H1 : 2 > 4
Let Sn2 = ni=1 (Xi X n )2 and suppose the test procedure to be used specifies to reject H0 if
P
Sn /0 > c, where 0 = 4 in this case. If the observed value of Sn2 is 60, should the hypothesis
2 2 2
where: n = 0 00+n
+n
xn
= 7+72
12
= 79/12 = 6.6; n = 0 + n = 12; n = 0 + n = 11;
2 2 2 0 n 10
n n = 0 0 + (n 1)s + 0 +n (xn 0 )2 = 1 + 9 2.3 + 11 (2.3 3.5) = 20.61; where
2
P n 2
sn = i=1 (xi xn ) /(n 1).
(2) Describe fully how would you use simulation tools to get a 95% posterior probability
interval for each of the unknown parameters and 2 (You would need to describe
any distribution you would use in the simulation process and explain how would you
implement an algorithm to do such simulation).
(a) Simulate 1 sample of 2 from an Inv-2 distribution with parameters n , n2
(b) Simulate 1 sample of from a Normal distribution with parameters n , 2 /n
(c) Repeat (1) and (2) until you get N samples
The posterior probability intervals will be the 2.5% and 97.5% quantiles of the sim-
ulated sample.
You can also find the full conditionals | 2 , x and 2 |, x and implement a Gibbs
sampling
(10 pts)