## Description

## 1. Maxwell.

Sample y1, . . . , yn, comes from Maxwell distribution with a density

f(y|θ) = s

2

π

θ

3/2

y

2

e

−θy2/2

, y ≥ 0, θ > 0.

Assume an exponential prior on θ,

π(θ) = λe−λθ, θ > 0, λ > 0.

(a) Show that posterior belongs to gamma family and depends on data via Pn

i=1 y

2

i

.

(b) For λ = 1/2 and y1 = 1.4, y2 = 3.1, and y3 = 2.5, find Bayes estimator for θ. How the

Bayes estimator compares to the MLE and prior mean. The MLE for θ is P

3n

n

i=1 y

2

i

= 3/y2

.

(c) Using MATLAB/Octave/R/Python to calculate the 95% equitailed credible set for

θ.

(d) Find a prediction for a future single observation. For this, you will need the mean of

Maxwell, which is E[Y ] = 2q 2

πθ .

## 2. Jeremy Mixture.

(a) Show that for likelihood f(x|θ) and mixture prior

π(θ) = π1(θ) + (1 − )π2(θ), θ ∈ Θ,

the posterior is a mixture of

π(θ|x) =

0π1(θ|x) + (1 −

0

)π2(θ|x),

where

πi(θ|x) = f(x|θ)πi(θ)

mi(x)

, mi(x) = Z

Θ

f(x|θ)πi(θ)dθ, i = 1, 2, and

0 =

m1(x)

m1(x) + (1 − )m2(x)

.

(b) Now we assume X|θ ∼ N (θ, 80) and the prior for θ is a mixture

θ ∼ π(θ) = 2

3

N (110, 60) + 1

3

N (100, 200).

Find the posterior and Bayes estimator for θ if X = 98.

## 2. Mendel’s Experiment with Peas.

Johann Gregor Mendel (1822-1884) studied the

inheritance of seven different features in peas, including height, flower color, seed color, and

seed shape. To do so, he first established pea lines with two different forms of a feature,

such as tall vs. short height. He grew these lines for generations until they were purebreeds (always produced offspring identical to the parent), then bred them to each other and

observed how the traits were inherited.

For the height trait, Mendel’s model suggests that 3/4 of the plants grown from a cross

between tall and short height strains of pea lines will be of the tall height variety. After

breeding 1064 of these plants, 787 resulted as the tall height variety. The reasonable model

for the number of tall height results from n experiments is binomial Bin(n, p).

Complete a

Bayesian model with beta Be(12, 4) prior on the unknown proportion p.

(a) What are prior and posterior means?

(b) Find posterior probability of hypothesis H0 : p ≤ 3/4?

(c) Find a 95% equitailed credible set for the true proportion of tall height plants obtained

from the given cross.