Docsity

Assignment 5 Problems with Solution - Statistical Inference | STA 7346, Assignments of Statistics

Toggle sidebar
bg1
1 Problem 4.4.7
(a) Note that G={ga,b(x, y)=(x1+a, . . . , xn+a, y1+b, . . . , yn+b) : a, b ∈R}. Clearly, G
is abelian since ga,b ◦ga0,b0=ga0,b0◦ga,b = (x+a+a0, y +b+b0). Considering the transformation
from (c, d)to (c0, d0) = (c+a, d +b), we calculate a Jacobian of
∂c0
∂a
∂d0
∂a
∂c0
∂b
∂d0
∂b
=
1 0
0 1
= 1.
Thus, we will choose a flat prior as the Haar measure, that is, λ(a, b)=1for all a, b ∈R. We use
squared error loss, so that the problem is invariant. Then, the Bayes rule is
δπ(x, y) = E(η−ζ|x, y) = ZZ (η−ζ)π(η, ζ |x, y)dη dζ =RR(η−ζ)f(x, y |η, ζ)dη dζ
RR f(x, y|η, ζ )dη dζ .
To show that this is MRE, let δ0(x, y) = x1−y1, which is equivariant for η−ζ. Define Z=
(x1−xn, . . . , xn−1−xn, y1−yn, . . . , yn−1−yn). Then, the MRE is
δ∗(x, y) = δ0(x, y)−Eη=0,ζ =0[δ0(x, y)|Z]
=x1−y1−RR(u−v)f(u, x2+u, . . . , xn+u, v, y2+v, . . . , yn+v)du dv
RR f(u, x2+u, . . . , xn+u, v, y2+v, . . . , yn+v)du dv
=x1−y1−RR ((x1−η)−(y1−ζ)) f(x1+η, . . . , xn+η, y1+ζ , . . . , yn+ζ)dη dζ
RR f(x1+η, . . . , xn+η, y1+ζ , . . . , yn+ζ)dη dζ
=x1−y1−RR {x1−y1−(η−ζ)}f(x, y|η, ζ )dη dζ
RR f(x, y|η, ζ )dη dζ
=RR(η−ζ)f(x, y |η, ζ)dη dζ
RR f(x, y|η, ζ )dη dζ =δπ(x, y)
Thus, δπ(x, y)is the MRE for η−ζ.
(b) Note that G={ga,b,c,d(x, y)=(bx1+a, . . . , bxn+a, dy1+c, . . . , dyn+c) : a, c ∈
R, b, d ∈R+}. Considering the transformation from (e, f , g, h)to (e0, f0, g 0, h0) = (af+e, bf, ch+
g, dh), we calculate a Jacobian of
1 0 0 0
a b 0 0
0 0 1 0
0 0 c d
=bd.
So the right Haar measure is λ(a, b, c, d) = 1
bd for a, c ∈R,b, d ∈R+. We will use the loss
function L(θ, d) = (d−θ)2
θ2, so that the problem is invariant. Then, the Bayes rule for τ
σis
δπ(x, y) = Eσ
τ|x, y
Eσ2
τ2|x, y.
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Assignment 5 Problems with Solution - Statistical Inference | STA 7346 and more Assignments Statistics in PDF only on Docsity!

1 Problem 4.4.

(a) Note that G = {g a,b

(x, y) = (x 1

  • a,... , x n

  • a, y 1

  • b,... , y n

  • b) : a, b ∈ R}. Clearly, G

is abelian since g a,b

◦ g a

′ ,b

′ = g a

′ ,b

′ ◦ g a,b

= (x + a + a

′ , y + b + b

′ ). Considering the transformation

from (c, d) to (c

′

, d

′

) = (c + a, d + b), we calculate a Jacobian of

∂c

′

∂a

∂d

′

∂a

∂c

′

∂b

∂d

′

∂b

Thus, we will choose a flat prior as the Haar measure, that is, λ(a, b) = 1 for all a, b ∈ R. We use

squared error loss, so that the problem is invariant. Then, the Bayes rule is

δ

π

(x, y) = E (η − ζ|x, y) =

(η − ζ)π (η, ζ|x, y) dη dζ =

(η − ζ)f (x, y|η, ζ) dη dζ

f (x, y|η, ζ) dη dζ

To show that this is MRE, let δ 0 (x, y) = x 1 − y 1 , which is equivariant for η − ζ. Define Z =

(x 1

− x n

,... , x n− 1

− x n

, y 1

− y n

,... , y n− 1

− y n

). Then, the MRE is

δ

∗

(x, y) = δ 0 (x, y) − Eη=0,ζ=0[δ 0 (x, y)|Z]

= x 1

− y 1

(u − v)f (u, x 2

  • u,... , x n

  • u, v, y 2

  • v,... , y n

  • v) du dv

f (u, x 2

  • u,... , x n

  • u, v, y 2

  • v,... , y n

  • v) du dv

= x 1

− y 1

((x 1

− η) − (y 1

− ζ)) f (x 1

  • η,... , x n

  • η, y 1

  • ζ,... , y n

  • ζ) dη dζ

f (x 1

  • η,... , x n

  • η, y 1

  • ζ,... , y n

  • ζ) dη dζ

= x 1 − y 1 −

{x 1

− y 1

− (η − ζ)} f (x, y|η, ζ) dη dζ

f (x, y|η, ζ) dη dζ

(η − ζ)f (x, y|η, ζ) dη dζ

f (x, y|η, ζ) dη dζ

= δ

π

(x, y)

Thus, δ

π (x, y) is the MRE for η − ζ.

(b) Note that G = {g a,b,c,d

(x, y) = (bx 1

  • a,... , bx n

  • a, dy 1

  • c,... , dy n

  • c) : a, c ∈

R, b, d ∈ R

}. Considering the transformation from (e, f, g, h) to (e

′ , f

′ , g

′ , h

′ ) = (af +e, bf, ch+

g, dh), we calculate a Jacobian of

a b 0 0

0 0 c d

= bd.

So the right Haar measure is λ(a, b, c, d) =

1

bd

for a, c ∈ R, b, d ∈ R

. We will use the loss

function L(θ, d) =

(d−θ)

2

θ

2

, so that the problem is invariant. Then, the Bayes rule for

τ

σ

is

δ

π

(x, y) =

E

[

σ

τ

|x, y

]

E

[

σ

2

τ

2

|x, y

].

Note that

E

[

σ

τ

|x, y

]

σ

τ

π(σ, τ |x, y) dσ dτ =

σ

τ

f (x, y|η, σ, ζ, τ )

1

στ

dη dζ dσ dτ

f (x, y|η, σ, ζ, τ )

1

στ

dη dζ dσ dτ

1

τ

2

f (x, y|η, σ, ζ, τ ) dη dζ dσ dτ

m(x, y)

and

E

[

σ

2

τ

2

|x, y

]

σ

τ

3

f (x, y|η, σ, ζ, τ ) dη dζ dσ dτ

m(x, y)

Thus,

δ

π

(x, y) =

1

τ

2

f (x, y|η, σ, ζ, τ ) dη dζ dσ dτ

σ

τ

3

f (x, y|η, σ, ζ, τ ) dη dζ dσ dτ

which is in the form of a Pitman estimator, and hence, is MRE.(By Theorem 3.3.3 and (3.3.14))

(c) Note that G = {ga,b,c(x, y) = (cx 1 + a,... , cxn + a, cy 1 + b,... , cyn + b) : a, b ∈

R, c ∈ R

}. Considering the transformation from (d, e, f ) to (d

′ , e

′ , f

′ ) = (af + d, bf + e, cf ),

we calculate a Jacobian of ∣ ∣ ∣ ∣ ∣ ∣

0 0 c

= c.

So the right Haar measure is λ(a, b, c) =

1

c

for a, b ∈ R, c ∈ R

. We will use the loss function

L(θ, d) =

(d−(η−ζ))

2

τ

2

, so that the problem is invariant. Then, the Bayes rule is

δ

π

(x, y) =

E

[

(η−ζ)

2

τ

2 |x, y

]

E

[

1

τ

2

|x, y

] =

(η−ζ)

2

τ

3

f (x, y|η, ζ, τ ) dτ dη dζ

1

τ

3 f^ (x, y|η, ζ, τ^ )^ dτ dη dζ^

which is in the form of a Pitman estimator, and hence, is MRE. (By Theorem 3.3.17,(3.3.43) and

2 Problem 4.5.

(a) Making use of the notation from problem 5.1, we see that

E(θ|x) =

θ π(θ|x) dθ =

θ

[∫

π(θ|x, λ)π(λ|x) dλ

]

dθ =

∫ [∫

θπ(θ|x, λ) dθ

]

π(λ|x) dλ

E(θ|x, λ)π(λ|x) dλ = E [E(θ|x, λ)].

4 Problem 4.6.

(a)

We need π(x i

|μ) =

π(x i

|θ i

)π(θ i

)dθ i

π(x i

|μ) ∝

exp[−

2 σ

2

(x i

− θ i

2

] exp[−

2 τ

2

(θ i

− μ)

2

]dθ i

∝ exp[−

x

2

i

2 σ

2

] exp[

(xiτ

2

  • μσ

2

)

2

2 σ

2 τ

2 (σ

2

  • τ

2 )

]

exp[−

σ

2

  • τ

2

2 σ

2 τ

2

(θ i

xiτ

2

  • μσ

2

σ

2

  • τ

2 )

2

]dθ i

∝ exp[−

2 σ

2 τ

2 (σ

2

  • τ

2 )

(σ

2

τ

2

x

2

i

  • τ

4

x

2

i

− τ

4

x

2

i

− σ

4

μ

2

− 2 σ

2

τ

2

xiμ)]

∝ exp[−

2(σ

2

  • τ

2 )

(xi − μ)

2

]

That means X i

|μ ∼ N (μ, σ

2

  • τ

2 ). So the MLE of μ is

X. Then δ

EB

i

τ

2

σ

2 +τ

2

X

i

σ

2

σ

2 +τ

2

X.

(b)

From part (a), we know

log π(x 1 , · · · , xn|μ) = −

p

log[2π(σ

2

  • τ

2

)] −

2(σ

2

  • τ

2 )

p ∑

i=

(xi − μ)

2

Then

∂x i

log π(x 1

, · · · , x n

|μˆ) =

∂x i

log π(x 1

, · · · , x n

|μ)| μ=¯x

x i

− x¯

σ

2

  • τ

2

and

2

∂x

2

i

log π(x 1 , · · · , xn|μˆ) = −

p − 1

p(σ

2

  • τ

2 )

By (4. 6 .16)

R(η, E(η|x 1

, · · · , x n

, μˆ) =

p

σ

2

p ∑

i=

p − 1

p(σ

2

  • τ

2 )

(σ

2

  • τ

2 )

2

p ∑

i=

E

η

(X

i

X)

2

p

σ

2

2(p − 1)

σ

2

  • τ

2

(σ

2

  • τ

2 )

2

p ∑

i=

E

η

(X

i

X)

2

Since η i

θ i

σ

2

, R(θ i

, E(η|x 1

, · · · , x n

, ˆμ) = pσ

2 −

2(p−1)σ

4

σ

2 +τ

2

σ

4

(σ

2 +τ

2 )

2

p

i=

E(X

i

X)

2 .

(c)

We need minimize

p

i=

E(Xi −

X)

2

.

E(X

i

X)

2

=

p

∑

i=

θ

2

i

  • pσ

2

− p(

θ

2

σ

2

p

p

∑

i=

(θ i

θ)

2

  • (p − 1)σ

2

which is minimized when

p

i=

(θi −

θ)

2

= 0, so θ 1 = · · · = θn.

5 Problem 4.6.

(a) δ

EB

= (1 −

σ

2

p

¯ X

2

X × I(

X >

σ

2

p

). Then M SE = E(δ

EB

− θ)

2

= E(V − U )

2

, where

V = (

X − θ),

U =

X × I(

X <

σ

2

p

σ

2

p

X

× I(

X >

σ

2

p

We know EV

2

σ

2

p

, and

EV

2

≤ E

X

2

I(

X <

σ

2

p

) + E

σ

4

p

X

2

I(

X >

σ

2

p

σ

4

p

2

Notice that (V − U )

2 ≤ 2 V

2

  • 2U

2 , then it is easy to check that M SE is bounded.

(b) δ

v − θ = V − U, where

V = (

X − θ), U =

σ

X

v + p

X

2

We know EV

2

σ

2

p

, and

EU

2 = E

σ

X

2

(v + p

X

2 )

2

≤ E

σ

X

2

2 vp

X

2

σ

4

2 pv

So, EU

2 and EV

2 are all bounded. Therefore, M SE is bounded.

(c) We calculate the risk for δ

EB and δ

v , when p = 25, and σ

2 = 1, for v = 10, 100.

Here is the R-code used to approximate the risks:

th <- 251

theta <- seq(-100,100, length=th)

v1 <- 10

v2 <- 100

p <- 25 #sample size for individual trials

n <- 15000 #number of samples to calculate R

sd.t <- 1/sqrt(p)

p.inv <- 1/p

delta.EB <- rep(0, n)

and

r

τ,

[

(p − 2)σ

2

|x − μ|

2

]

(x − μ)

R

ξ,

[

(p − 2)σ

2

|x − μ|

2

]

(x − μ)

π 0 , τ

2 I

(ξ) dξ

R

θ, μ +

[

(p − 2)σ

2

|x − μ|

2

]

(x − μ)

π μ, τ

2 I

(θ) dθ

= r

τ

′

, μ +

[

(p − 2)σ

2

|x − μ|

2

]

(x − μ)

Likewise,

R

ξ,

[

(p − 2)σ

2

|x − μ|

2

]

(x − μ)

= R

θ, μ +

[

(p − 2)σ

2

|x − μ|

2

]

(x − μ)

and

r

τ,

[

(p − 2)σ

2

|x − μ|

2

]

x − μ)

= r

τ

′

, μ +

[

(p − 2)σ

2

|x − μ|

2

]

(x − μ)

Thus, by the initial inequality, μ +

[

(p−2)σ

2

|x−μ|

2

]

(x − μ) has Bayes risk uniformly larger than the

positive part estimator, μ +

[

(p−2)σ

2

|x−μ|

2

]

(x − μ).

7 Problem 4.7.

(a) First we need to calculate our estimate of τ

2

. For notational ease, let Y i

X

i

1

n

n

j=

X

ij

and

Y =

1

s

s

i=

Y

i

. Note that marginally

Y

i

|μ ∼ N(μ,

σ

2

n

  • τ

2

),

and thus,

i

(Y

i

Y )

2 ∼

σ

2

n

  • τ

2

χ

2

s− 1

. Recall that for T ∼ χ

2

k

, E

1

T

1

k− 2

. Thus,

E

s − 3

i

(Y

i

Y )

2

s − 3

σ

2

n

  • τ

2

E

σ

2

n

  • τ

2

i

(Y

i

Y )

2

s − 3

σ

2

n

  • τ

2

s − 3

σ

2

n

  • τ

2

and we see that

s− 3 ∑

i

(Yi−

¯ Y )

2

is an unbiased estimator of

1

σ

2

n

+τ

2

. We will also use

Y as an unbiased

estimate of μ. Note that

π(ξ|y) ∝ f (y|ξ)π(ξ|μ, τ

2

) ∝ exp

−n

2 σ

2

i

(y i

− ξ i

2

2 τ

2

i

(ξ i

− μ)

2

∝ exp

nτ

2

  • σ

2

2 σ

2 τ

2

i

[

ξ

2

i

− 2 ξ i

nτ

2

nτ

2

  • σ

2

y +

σ

2

nτ

2

  • σ

2

μ

)]

∝ exp

nτ

2

  • σ

2

2 σ

2 τ

2

i

[

ξ i

nτ

2

nτ

2

  • σ

2

y +

σ

2

nτ

2

  • σ

2

μ

)]

2

so we have that ξ|y ∼ N

nτ

2

nτ

2 +σ

2

y +

σ

2

nτ

2 +σ

2

μ,

σ

2 τ

2

nτ

2 +σ

2

. Hence,

δ

B

i

(Y

i

nτ

2

nτ

2

  • σ

2

Y

i

σ

2

nτ

2

  • σ

2

μ = μ +

σ

2

nτ

2

  • σ

2

(Y

i

− μ),

and so by substituting in our estimates, we have

δ

L

i

(Y ) = ˆμ +

σ

2

n

τ

2

σ

2

n

(Y

i

− ˆμ) =

Y +

(s − 3)σ

2

n

i

(Y

i

Y )

2

(Y

i

Y ).

(b) Note that we can write

δ

L

i

(y) = y i

− g i

(y) = y i

(s − 3)σ

2

n

i

(Yi −

Y )

2

(Y

i

Y ).

Then,

Eξ|g(y)|

2

= Eξ

s ∑

i=

(s − 3)σ

2

n

i

(Y

i

Y )

2

2

(Yi −

Y )

2

=

(s − 3)

2

σ

4

n

2

Eξ

i

(Y

i

Y )

2

and

E

ξ

p ∑

i=

∂y i

g i

(y) =

(s − 3)σ

2

n

E

ξ

p ∑

i=

∂y i

j

(Yj −

Y )

2

(s − 3)σ

2

n

E

ξ

p ∑

i=

1

s

j

(Yj −

Y )

2

− 2(Yi −

Y )

2

j

(Yj −

Y )

2

2

(s − 3)σ

2

n

E

ξ

(s − 1)

j

(Y

j

Y )

2 − 2

j

(Y

j

Y )

2

j

(Y

j

Y )

2

2

(s − 3)σ

2

n

Eξ

s − 3

j

(Y

j

Y )

2

From Corollary 7.2,

R(ξ, δ

L

) =

sσ

2

n

(s − 3)σ

4

n

2

Eξ

s − 3

i

(Y

i

Y )

2

2 σ

2

n

(s − 3)σ

2

n

Eξ

s − 3

j

(Y

j

Y )

2

sσ

2

n

(s − 3)σ

4

n

2

Eξ

s − 3

i

(Y

i

Y )

2

and we have that

r(Ξ, δ

L

) =

Ξ

R(ξ, δ

L

)π(ξ) dξ =

Ξ

Y

[

sσ

2

n

(s − 3)σ

4

n

2

s − 3

i

(Y

i

Y )

2

)]

f (y|ξ)π(ξ) dy dξ

Y

Ξ

[

sσ

2

n

(s − 3)σ

4

n

2

s − 3

i

(Yi −

Y )

2

)]

π(ξ|y) dξ

m(y) dy

Y

sσ

2

n

(s − 3)σ

4

n

2

s − 3

i

(Y

i

Y )

2

m(y) dy

sσ

2

n

(s − 3)σ

4

n

2

E

s − 3

i

(Y

i

Y )

2

sσ

2

n

(s − 3)σ

4

n(σ

2

  • nτ

2 )

Thus,

E(θ|x) =

θπ(θ|x, τ

2 )m(x|τ

2 ) dθ dτ

2

π(θ|x, τ

2 )m(x|τ

2 ) dθ dτ

2

p − 2

|x|

2

x.

(c) We get that this hierarchal bayes estimator is equal to the Stein estimator, which should not

be the case. Actually, under prior π(τ ) = 1, − 1 < τ < +∞, we can not get the marginal density

funciton of X (it is a complex function, NOT real-valued function). So, there is no Bayes estimator

under this Prior.

(d) The calculations are unjustified because we are allowing some values of τ

2

such that π(θ|τ

2

)

is not a density, in particular it takes on imaginary values when τ

2 < 0.

9 Problem 5.1.

It is easy to check that R(p, δ

∗

) = (1 − )Ep(

X

n

− p)

2

  • Ep(

1

2

− p)

2

= (1 − )

p(1−p)

n

1

2

− p)

2

.

When  =

1

n+

, then R(p, δ

∗ ) =

1

4(n+1)

We know that R(p,

X

n

) = E

p

X

n

− p)

2

=

p(1−p)

n

, so sup p

R(p,

X

n

) occurs at p = 0. 5 and is equal to

1

4 n

. Then R(p, δ

∗ ) =

1

4(n+1)

1

4 n

= sup p

R(p,

X

n