Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

STAT 4198

Homework 4

Spring 2023

1.     The numbers of misprints spotted on the first few pages of an early draft of a book are: 3,    4,    2,    1,    2,    3.

It seems reasonable that these numbers would constitute a sample from a Poisson distribution of unknown mean 入.

a)    Suppose you have no knowledge of the typist’s skills. Use the following uniform prior:  define 100 hypotheses where  is 0. 1, 0.2,  …, 10, and is equally likely to be any ofthese values.

i)     Calculate the posterior distribution of 入. Plot this posterior.

ii)   What is the mean of this posterior distribution?

iii)  Give a 95% credible interval for 入.

iv)  What is the probability that  is greater than 3?

b)    Suppose you have no knowledge of the typist’s skills, but instead of a discrete uniform prior you use an uniformative continuous Gamma(0.01, 0.01) prior for 入. Repeat part

a) with this prior.

c)    Now suppose the typist thinks that we should use a prior with a mean of 3, and a standard deviation of 2. Use a suitable Gamma prior and repeat part a).

d)    Plot the probability mass function for the number of errors on a randomly selected page. Do this via Monte Carlo simulation, using your posterior from part c).

2.     A manufacturer is interested in the time to failure of his batteries.

Suppose the time to failure of the batteries has an exponential distribution:

p(x|e) = eeex

Note that the mean of this population is 1/e.

The manufacturer is interested in estimating e. Suppose that n batteries are randomly selected and let their failure times be x1, x2,…, xn .

Suppose we use a gamma prior for e.

p(e|a, F) =  e a−1Fe

a)    What is the posterior distribution of e? Is the Gamma a conjugate prior for an exponential likelihood?

b)    Suppose an expert believes that the mean time to failure is 120 hours. Furthermore, he claims that he is 95% sure that the mean time to failure is between 100 and 150 hours.

What would be a suitable choice for a and F in the prior?

[Hint: For a Gamma(a , F) random variable

Mean =  and Variance = ]

c)    Suppose a sample of 5 batteries are taken and the failure times are:

113, 130, 128, 128, 141

i)     What is the posterior distribution of e? (using your prior from part b))

ii)   What is the mean and variance of this posterior distribution? Give a 95% credible interval for e. Give a 95% credible interval for 1/e.