ADTA 5620 Applied & Computational Statistics
Assignment 2 – Bayesian Statistical Inference
Due April 10, 2022
1. (10 points) Three coins are in a box. One is a two-headed coin, another is a two-tailed coin, and the
third is a fair coin. One of the three coins is selected at random and flipped, heads comes up. What is the
probability that it is the two-headed coin?
2. (15 points) A large shipment of parts is received, out of which five are tested for defects. Past
experience with the supplier leads you to place a beta(1,9) prior on the part defect rate. Suppose no
defects are observed in the five tested from the shipment.
Give the posterior distribution on the defect rate, the MAP estimate of the defect rate, the Bayes
estimate (LMS) of the defect rate, and the 95% HDI.
3. (20 points) Out of a production lot of electronic components six are to be tested to estimate the
mean component lifetime, θ. The six components to be tested are independently selected from the
production line and their lifetimes 1, … ,6 are observed. It is known that component lifetime is an
exponential random variable with mean (expected value) θ. Suppose the six observed lifetimes are 15,
12, 14, 10, 12, 11.
(a) Find the likelihood function and maximum likelihood estimate for . Calculate a 95% confidence
interval using classical methods. Discuss why this confidence interval might be suspect – e.g., what
assumptions may not hold.
(b) From past experience, it is known that, among production lots, θ is distributed according to an
inverse gamma distribution with α = 10, β = 100. Give the MAP estimate of mean component lifetime,
the Bayes estimate (LMS) of the mean component lifetime, and the 90% HDI of mean component
lifetime.
(c) Compare the interval estimates obtained from applying classical and Bayesian methods, explaining
differences/similarities and providing a justification for preferring one method over the other in differing
contexts.
4. (20 points) An oncologist believes that 90% of cancer patients will respond to a new chemotherapy
treatment and that it is unlikely that this proportion will be below 80%.
(a) Determine a beta prior on the response proportion, θ, which models the oncologist’s beliefs. (Hint:
Find the beta which has mean µ = 0.9 and µ−2σ = 0.8, where σ is the standard deviation of the desired
beta. Relate these conditions to the parameters defining a beta distribution.)
During a trial, 30 patients were treated and 22 responded.
(b) Give the posterior distribution on the proportion.
(c) Give the MAP and Bayes estimators of the proportion.
(d) Find and interpret the 95% equi-tailed credible set for θ and the 95% HDI.
(e) Find and interpret the posterior odds ratio and Bayes factor for the hypotheses
H0 : θ ≥ .8 and H1 : θ < .8 .
5. (20 points) The City of Frisco Traffic Division is worried about the number of serious accidents at
Legacy and 121. A traffic engineer wants to estimate the accident rate, or even better find a credible set
on the rate using Bayesian methods. A common model for modeling the number of road accidents at a
particular location/time window is the Poisson distribution. Assume that X represents the number of
serious accidents in a 3-month period at the intersection and let X be Poisson(θ) for some (unknown)
parameter θ. A fairly “uninformative” gamma(1,2) distribution is used as a prior on θ .
In the four most recent three-month periods, the observed realizations for X were: 1, 2, 0, and 1.
(a) Compute the MAP and Bayes estimators for θ.
(b) Compute a 95% equi-tailed credible set and compute the 95% HDI credible set.
(c) Find and interpret the posterior odds ratio and Bayes factor for the hypotheses
H0 : θ ≥ 1 and H1 : θ < 1.
6. (15 points) Suppose that a communication channel transmits a signal . The channel is noisy. So, at
the receiver, a noisy version of is received. That is, the received signal is X = + , where
represents the noise. The distribution of is assumed to be normal – i.e., ~(0,)
A common goal in this situation is to recover – estimate – the value of based on the observed value of
. Assume a prior distribution, , on is given by ~(,). So, the prior density is
() = 1
�22 −(−)222
Suppose that the first signal received is 1 = 3. Take σ = 1, α = 5, and β = 1.
(a) Give the MAP and Bayes estimators for θ.
(b) Give the 95% HDI credible set.
(c) Suppose a second signal, 2 = 3.5 is received. Update the MAP estimate and the 95% HDI credible
set for θ.
(Hint: use example 8.3 in textbook. Note that, here, σ and β are the standard deviations for the
respective normal distributions. Sometimes normal distributions are specified with the second
parameter specified being the variance.)