Code + goodies used in Prof. Baines' STA 250 Course (UC Davis, Fall 2013)
NOTE: These are practice questions, they are not due in class, and there is no credit for completing the questions (other than your own sense of satisfaction). These questions are intended to be slightly easier than the homework questions, to allow you to get started on the topics at a comfortable pace.
Simulate from the linear regression model:
\[ y_{i} = x_{i}^{T}\beta + \epsilon_{i} , \quad i=1,\ldots,n , \]with n=100. Use the bootstrap procedure to estimate \(\textrm{SD}(\hat{\beta})\) based on \(B=1000\) bootstrap resamples.
Compare to the asymptotic results reported by lm
or computed using the square root of the diagonal elements of \(\hat{\sigma^{2}}(X^{T}X)^{-1}\).
a. Derive the Jeffreys prior for \(\lambda\).
b. Is the Jeffreys prior a proper prior?
c. Find the family of conjugate priors for \(\lambda\).
d. Derive the posterior distribution for \(\lambda\) under both the Jeffreys and conjugate prior.
e. Does the Jeffreys prior lead to a proper posterior distribution for \(\lambda\)?
f. Let \(n=20\) and \(\sum_{i=1}^{n}y_{i}=97\). Provide a central \(95\%\) credible interval for \(\lambda\).
a. Derive the (joint) Jeffreys prior for \(\theta\).
b. Is the Jeffreys prior a proper prior?
c. Find the family of conjugate priors for \(\theta\).
d. Derive the posterior distribution for \(\theta\) under both the Jeffreys and conjugate prior.
e. Does the Jeffreys prior lead to a proper posterior distribution for \(\theta\)?
f. What is the conditional posterior distribution \(\mu|\sigma^{2},y\)?
g. What is the conditional posterior distribution \(\sigma^{2}|\mu,y\)?
h. Are you able to derive the marginal posterior distribution for \(\mu\) i.e., \(p(\mu|y)\)?