You are on page 1of 3

BASKIN SCHOOL OF ENGINEERING

Department of Applied Mathematics


and Statistics
AMS 132/206 - 1 Winter 2012

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

H0 be rejected or not? (4 pts)


When 02 = 4, Sn2 /4 = 15 has a 2 distribution with 9 degrees of freedom. You would reject
H0 if Sn2 /4 > 16.92 (Confidence level = 0.05). Therefore we would not reject H0 .
Problem 2: Suppose that the height of the individuals in a certain population have a normal
distribution for which the value of the mean is unknown and the standard deviation is 2
inches.
Suppose also that the prior distribution for is a normal distribution with mean 68
inches and standard deviation equal 1 in. If 10 people is selected at random from its
population and their average height is 69.8 inches, what is the posterior distribution
of .
2 +nv 2 x

The posterior distribution of is a Normal distribution with mean 1 = 02 +nv02 n
0
2 v2
and variance v12 = 2 +nv0 2 . In this case 2 = 4, 0 = 68, v02 = 1, n = 10 and xn = 69.8.
0
This yields 1 = 970/14 = 69.28 and v12 = 2/7.
What is the posterior distribution if the prior distribution is an improper prior of the
form () constant?
In this case 1 = xn = 69.8 and v12 = 2 /n = 4/10
(6 pts)

Problem 3: Suppose that X1 , X2 , . . . , Xn form a random sample from the exponential


distribution with parameter . Let the prior distribution of be the improper prior with
pdf 1/ for > 0. Find the posterior distribution and show that the posterior mean is
1/
xn .
Pn (4 pts)
n
The posterior distribution of can be written as: (|x) exp( i=1 xi ).1/. This can
be recognized as a Gamma distribution with parameters = n and = n xn . The posterior
mean is going to be the mean of this Gamma distribution:/ = n/n xn = 1/xn
Problem 4 (AMS 132): Suppose the proportion of defective items in a large shipment
is unknown, and the prior distribution of is the beta distribution for which the parameters
are = 5 and = 10. Suppose also that 20 items are selected at random from the shipment,
and that exactly one of these items is found to be defective. If the square error loss function
is used, what is the Bayes estimate of ?
(6 pts)

The posterior distribution of is the Beta distribution with parameters = 5 + 1 = 6 and


= 10 + 19 = 29. The posterior mean is 6/(29 + 6) = 6/35, therefore the Bayes estimate of
is 6/35.
Problem 4 (AMS 206): Suppose that a random sample of size n is taken from the Bernoulli
distribution with parameter , which is unknown, and that the prior distribution of is a
beta distribution for which the mean is 0 . Show that the mean of the posterior distribution
of will be a weighted average having the form n X n + (1 n )0 , and show that n 1
as n .
(6 pts)

Suppose that the prior is a Beta distribution with parameters and . Then 0 = + . The
+ n
P
i=1 Xi n . Hence n = n/++n
mean of the posterior distribution is ++n
= + 0 + n X
++n ++n
and n 1 when n .
Problem 5: Suppose we have a sample from a normal distribution with unknown mean and
unknown variance 2 . We will use a natural conjugate prior for the parameters (, 2 ) from
the Normal-Inverse-2 (Normal-Inverse Chi-square) family, with hyperparameters 0 = 3.5,
02 = P
1, 0 = 2 and 0 = 1. The sample yields an average of xn = 7.2 and s2n = 2.3, where
s2n = ni=1 (xi xn )2 /(n 1). Use n = 10.
(1) Find the posterior distribution and its parameters
The family of distributions Normal-Inverse-2 (Normal-Inverse Chi-square) is a
conjugate prior family for the normal sampling model with unknown mean and vari-
ance. This distribution can be parameterized as:
| 2 N (0 , 2 /0 )
2 Inv-2 (0 , 02 )

The posterior distribution will be also a Normal-Inverse-2 that can be parame-


terized as:
| 2 , x N (n , 2 /n )
2 |x Inv-2 (n , n2 )

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)

You might also like