Processing math: 100%

Question Sheet Two

Set: Problems class, Friday 21st February 2025.

Due in: Problems class, Friday 28th February 2025. Paper copies may be submitted in the problems class or directly to me in lectures or my office, 4W4.10. PDF copies may be submitted to the portal available on the Moodle page.

Task: Attempt questions 1-2; questions 3-4 are extra questions which may be discussed in the problems class.

Question 1

Let X1,,Xn be conditionally independent given λ so that f(x|λ)=ni=1f(xi|λ) where x=(x1,,xn). Suppose that λGamma(α,β) and Xi|λExp(λ) where λ represents the rate so that E(Xi|λ)=λ1.

  1. Show that λ|xGamma(α+n,β+nˉx).

  2. Show that the posterior mean for the failure rate λ can be written as a weighted average of the prior mean of λ and the maximum likelihood estimate, ˉx1, of λ.

A water company is interested in the failure rate of water pipes. They ask two groups of engineers about their prior beliefs about the failure rate. The first group believe the mean failure rate is 18 with coefficient of variation 111, whilst the second group believe the mean is 111 with coefficient of variation 12.
[Note: The coefficient of variation is the standard deviation divided by the mean.]
Let Xi be the time until water pipe i fails and assume that the Xi follow the exponential likelihood model described above. A sample of five of pipes is taken and the following times to failure were observed: 8.2, 9.2, 11.2, 9.8, 10.1.

  1. Find the appropriate members of the Gamma families the prior statements of the two groups of engineers represent. In each case find the posterior mean and variance. Approximating the posterior by N(E(λ|x),Var(λ|x)), where x=(x1,,x5), estimate, in each case, the probability that the failure rate is less than 0.1.

  2. How do you expect any differences between the engineers to be reconciled as more data becomes available?

Question 2

Let x be the number of successes in n independent Bernoulli trials, each one having unknown probability θ of success. It is judged that θ may be modelled by a Unif(0,1) distribution so f(θ)=1,     0<θ<1. An extra trial, z is performed, independent of the first n given θ, but with probability θ2 of success. The full data is thus (x,z) where z=1 if the extra trial is a success and 0 otherwise.

  1. Show that f(θ|x,z=0)=c{θα1(1θ)β1+θα1(1θ)β} where α=x+1, β=nx+1 and c=1B(α,β)+B(α,β+1).

  2. Hence show that E(θ|X,Z=0)=(x+1)(2nx+4)(n+3)(2nx+3). [Hint: Show that c=α+βB(α,β)(α+2β) and work with α and β.]

  3. Show that, for all x, E(θ|X,Z=0) is less than E(θ|X,Z=1).

Question 3

Let X1,,Xn be conditionally independent given θ, so f(x|θ)=ni=1f(xi|θ) where x=(x1,,xn), with each Xi|θN(μ,θ) where μ is known.

  1. Let s(x)=ni=1(xiμ)2. Show that we can write f(x|θ)=g(s,θ)h(x) where g(s,θ) depends upon s(x) and θ and h(x) does not depend upon θ but may depend upon x. The equation shows that s(X)=ni=1(Xiμ)2 is sufficient for X1,,Xn for learning about θ.

  2. An inverse-gamma distribution with known parameters α,β>0 is judged to be the prior distribution for θ. So, f(θ)=βαΓ(α)θ(α+1)eβ/θ,     θ>0.

    1. Show that the distribution of the precision τ=1θ is Gamma(α,β).

    2. Find the posterior distribution of θ given x=(x1,,xn).

    3. Show that the posterior mean for θ can be written as a weighted average of the prior mean of θ and the maximum likelihood estimate, s(x)/n, of θ.

Question 4

Suppose that X1,,Xn are identically distributed discrete random variables taking k possible values with probabilities θ1,,θk. Inference is required about θ=(θ1,,θk) where kj=1θj=1.

  1. Assuming that the Xis are independent given θ, explain why f(x|θ)kj=1θnjj where x=(x1,,xn) and nj is the number of xis observed to take the jth possible value.

  2. Suppose that the prior for θ is Dirichlet distributed with known parameters a=(a1,,ak) so f(θ)=1B(a)kj=1θaj1j where B(a)=B(a1,,ak)=kj=1Γ(aj)Γ(kj=1aj). Show that the posterior for θ given x is Dirichlet with parameters a+n=(a1+n1,,ak+nk).