Processing math: 100%

STA 250 :: Advanced Statistical Computing (UCD, Fall 2013)

Code + goodies used in Prof. Baines' STA 250 Course (UC Davis, Fall 2013)


Project maintained by STA250 Hosted on GitHub Pages — Theme by mattgraham

STA 250 :: Practice Questions

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.


Boot Camp

The Bootstrap:

  1. Let xijN(0,1) for i=1,,n and j=1,2, and xi0=1 for i=1,,n. Define xTij=(xi0,xi1,xi2)T and β=(1.2,0.3,0.9)T and let ϵiN(0,1) for i=1,,n.

    Simulate from the linear regression model:

    yi=xTiβ+ϵi,i=1,,n,

    with n=100. Use the bootstrap procedure to estimate SD(ˆβ) 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 ^σ2(XTX)1.

Bayesian Statistics Module

The Basics:

  1. Let Yi|λPois(λ) for i=1,,n, with the Yi being independent.

    a. Derive the Jeffreys prior for λ.

    b. Is the Jeffreys prior a proper prior?

    c. Find the family of conjugate priors for λ.

    d. Derive the posterior distribution for λ under both the Jeffreys and conjugate prior.

    e. Does the Jeffreys prior lead to a proper posterior distribution for λ?

    f. Let n=20 and ni=1yi=97. Provide a central 95% credible interval for λ.

  2. Let Yi|μ,σ2N(μ,σ2) for i=1,,n, with the Yi being independent. Let θ=(μ,σ2).

    a. Derive the (joint) Jeffreys prior for θ.

    b. Is the Jeffreys prior a proper prior?

    c. Find the family of conjugate priors for θ.

    d. Derive the posterior distribution for θ under both the Jeffreys and conjugate prior.

    e. Does the Jeffreys prior lead to a proper posterior distribution for θ?

    f. What is the conditional posterior distribution μ|σ2,y?

    g. What is the conditional posterior distribution σ2|μ,y?

    h. Are you able to derive the marginal posterior distribution for μ i.e., p(μ|y)?

(: Happy Coding! :)