Project II

Instructions: Complete one of the following suggested probability projects.

1. Read Example E Bayesian Inference, Rice page 94 - 95. Re-work the problem using a Beta(α, β) prior instead of the Unif(0, 1) prior used in the example. Use

f_{Θ}(θ) = \frac{Γ(α + β)}{Γ(α)Γ(β)}θ^{α−1}(1 − θ)^{β−1}  (1)

for 0 ≤ θ ≤ 1. Determine the posterior density f_{Θ|X}(θ|x).

2. Read Example C Random Walk, Rice page 140 - 142. Write an R program to simulate Brownian Motion for n = 250 values. Plot the values. Repeat 10 times. Compare your pictures to the last 250 closing values of a stock traded on the NYSE. Compare your pictures to the last 250 points of a major stock market average such as the DJIA.

3. Read Example B, rice page 154.

Simulate n = 200 values from the BVN(0, 0, 2, 3, .75). Fit the linear model with only the slope coefficient. Compare the the estimate to the ρ = 0.75.

4. Monte Carlo Integration.

Let U_{1}, U_{2}, ..., U_{n} be independent uniform random values from the interval [a, b]. These values have density f(u) = 1/(b − a) on that interval. Then

E[g(U_{i})] = ∫_{a}^{b} g(u)\frac{1}{b − a} du  (2)

so the original integral

∫_{a}^{b} g(x) dx  (3)

can be approximated by (b − a) times a sample mean of g(U_{i}). Use Monte Carlo integration to estimate the following integrals. Compare with the exact answers, if known.

(a)

∫_{0}^{1} x dx

(b)

∫_{1}^{π} e^{x} dx

Statistics 6401, Winter 2012 2

(c)

∫_{0}^{∞} e^{−x} dx

(d)

∫_{0}^{1} \frac{1}{\sqrt{2π}} e^{−x^{2}/2} dx

(e)

∫_{0}^{2} \frac{1}{\sqrt{2π}} e^{−x^{2}/2} dx

(f)

∫_{0}^{3} \frac{1}{\sqrt{2π}} e^{−x^{2}/2} dx

(g)

∫_{0}^{1} ∫_{0}^{1} e^{−(x+y)^{2}}(x + y)^{2} dx

5. If you have another idea for a project, please propose it during office hours for approval.