Exercise 4
Question 1.
Assume that a distribution of Y belongs to a oneparametric parametric family of distributions f(yθ), where a
priori θ ~ π(θ). After getting the first observation y
_{1} we update the distribution of θ by calculating its posterior distribution p(θy
_{1}) and use it as a
prior distribution for θ before we observe y
_{2}. Having y
_{2}, we update the distribution of θ again by deriving its posterior distribution. Show that one will get
the same posterior distribution of θ if instead of caclulating it sequentially, he/she would use the whole data (i.e.
y
_{1} and y
_{2}) and the original prior π(θ).
Question 2.
Let $Y_1,\ldots,Y_n \sim f_\theta(y)$, where $f_\theta$ belongs to the exponential family, i.e. $supp f_\theta$ does not depend on $\theta$ and
$f_\theta(y)=\exp\{c(\theta)T(y)+d(\theta)+S(y)\}$.
 Show that the conjugate prior family for $\theta$ is $\pi_{a,b}(\theta) \propto \exp\{a c(\theta)+bd(\theta)\}$.
 Find a conjugate prior for the parameter $\lambda$ of the Poisson distribution Pois(λ).
Question 3.
Let $Y_1,\ldots,Y_n \sim Pois(\lambda)$.
 Assume $a\; priori$ that $\lambda \sim \exp(\theta)$. Is it a conjugate prior for Poisson data?
 Estimate $\lambda$ and $p=P(Y=0)$ w.r.t. the quadratic loss.
 Assume now that $\theta$ is also unknown and find its empirical Bayes estimator. What are the resulting estimators for $\lambda$ and $p$?
Question 4.
Suppose that $Y_1,\ldots,Y_n \sim \exp(\theta)$, where $EY=1/\theta$.
 Find a noninformative prior for $\theta$ according to the Jefrreys' rule and the corresponding posterior
distribution.
 Estimate $\theta$ w.r.t. the quadratic error and compare the resulting Bayesian estimator with the MLE.
 Repeat the previous paragraph for estimating $\mu=EY$ and $p=P(Y \geq a)$.
 In addition to the sample of Y's, we have another independent sample $X_1,\ldots,X_n \sim \exp(\phi), EX=1/\phi$ and again, we use the noninformative prior for $\phi$. We are interested in the ratio
$\theta/\phi$. Find its posterior distribution, the posterior mean and compare it with the MLE for this ratio.
 (hint: recall some of basic distributions you know like $\chi^2, F$, etc.)

Question 5.
Three friends, Optimist, Realist and Pessimist, are going to participate in a certain kind of
gambling game in casino when they do not know the probability of win p. Motivated by an exciting course in Bayesian statistics, they decided to apply Bayesian analysis. Optimist chose
a prior on p from the conjugate family of distributions. In addition, he believes that the chances are 50%50% (i.e.
E(p)=1/2) with Var(p)=1/36. Realist chose a uniform prior U[0,1].
 Show that both priors belong to the family of Beta distributions and find their parameters for the priors of
Optimist and Realist.
 (hint: $E\left(Beta(\alpha,\beta)\right)=\frac{\alpha}{\alpha+\beta},\; Var\left(Beta(\alpha,\beta)\right)=\frac{\alpha \beta}{(\alpha+\beta)^2 (\alpha+\beta+1)}$)
 Pessimist does not have any prior beliefs and decides to choose the noninformative prior according to the Jeffreys'
rule. What is his prior? Does it also belong to the Beta family?
 Being poor students in Statistics, Optimist, Realist and Pessimist do not have enough money to gamble separately,
so they decided to play together. They played the game 25 times and won 12 times. What is the posterior distribution of
each one of them?
 Find the corresponding posterior means and calculate the corresponding 95% Bayesian credible intervals for p.
 (hint: use the fact that if p~Beta(α,β) and ρ=p/(1p) is the odds ratio, then
(β/α)ρ ~ F_{2α,2β}  those who do not believe it, can (should!) easily verify it!)
 Three friends told their classmate Skeptic about the exciting Bayesian analysis each one of them has done. However,
Skeptic is, naturally, very skeptical about Bayesian approach and does not belive in any priors  his credo is "In Gd we trust... All others bring data". So he decided to perform a "classical" (nonBayesian) analysis of the
same data. What is his estimate and the 95%confidence interval for p? Compare the results and comment them briefly.
Question 6
The waiting time for a bus at a given corner at a certain time of day is known to have a uniform
distribution U[0,θ]. From other similar routes it is known that θ has a Pareto distribution Pa(7,4), where
the density of Pareto distribution Pa(α,β) is π_{α,β}(θ)=(α/β)(β/θ)^{α+1} for θ ≥ β and 0, otherwise. Waiting times of 10, 3, 2, 5 and 14 minutes have been
observed at the given corner at the last 5 days.
 Show that the Pareto distribution provides a conjugate prior for uniform data and find the posterior distribution
of θ.
 Estimate θ w.r.t. to the quadratic error (recall that E(Pa(α,β))=αβ/(α1),
α>1).
 Find a 95% HPD for θ.
 Test the hypothesis H_{0}: 0 ≤ θ ≤ 15 vs. H_{1}: θ > 15 by choosing the most likely (a posteriori) hypothesis.