0% found this document useful (0 votes)
27 views

Bayesian3 (1) - 1

This document provides information about a Bayesian statistics course including the names of 3 students enrolled and mathematical equations and analysis related to Bayesian inference. Specifically, it derives the posterior distribution of the parameter θ given data x, and shows that θ|x is normally distributed. It then finds the posterior predictive distribution of a new data point y given x, showing it is also normally distributed. Finally, it solves for the mean and variance of the posterior predictive distribution of the sample mean given x.

Uploaded by

Joanne Wong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Bayesian3 (1) - 1

This document provides information about a Bayesian statistics course including the names of 3 students enrolled and mathematical equations and analysis related to Bayesian inference. Specifically, it derives the posterior distribution of the parameter θ given data x, and shows that θ|x is normally distributed. It then finds the posterior predictive distribution of a new data point y given x, showing it is also normally distributed. Finally, it solves for the mean and variance of the posterior predictive distribution of the sample mean given x.

Uploaded by

Joanne Wong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

MTH 3408

INTRODUCTION TO BAYESIAN METHOD


STUDENT CENTERED LEARNING III
Name

: Punitha A/P Linganathan


Tham Wendy
Wong Hui Shein

157395
159281
159353

Solution:
x N ( , 4 )
N ( 110, 0.4 )

f ( x i| ) =

exp

( x i)2
1
exp
2( 4)
2 (4)

1 2
1
1 2
x i exp x i

4
2(4)
2(4)

) (

f ( x| )=L ( ; x )= f ( x i| )
i

exp
i

exp

[
i

exp

( 2(14) + ( 14) x )
2

1 2 1
+ xi
4
2(4 )

)]

n 2 1
+ xi
4 i
2(4)

exp

1
2
2
xi 2 x i + )
(
2(4)

exp

1 2 1
+ xi
4
2( 4)

f ( )=

exp

( 110)2
1
exp
2(0.4 )
2 (0.4)

exp

1
1
1
1102 exp
110
2
0.4
2(0.4)
2(0.4)

) (

f ( x ) exp

1
( 22 (110)+1102 )
2( 0.4)

)] (

n 2
1
1
1

2+ x i +
110
4 i
0.4
2 (4 )
2 ( 0.4 )

exp

1 n 1
2
+
+
2 4 0.4

exp

[(

exp

[(
2

exp

) ( 4 x + 110
0.4 ) ]

1
1
110
2
0.4
2(0.4)

n 2 1
1
1
+ x i exp
110
2
4 i
0.4
2( 4)
2(0.4)

exp

exp

1 n
+
0.4 4

1
1 n
+
0.4 4

1 n
+
0.4 4
2
+
1 n
+
0.4 4

( )

2+

1 2 1
+ 2 B
2 D2
D

1 n
+
0.4 4

x i 110
+

4
0.4

1
1 n
+
0.4 4

()

]
)

x i 110
+

4
0.4

x N ( B , D2 )

where
110 xi
+
0.4
4
B=
1 n
+
0.4 4

( )
[

110 108.0+109.0+ 107.4+109.6+112.0


+
0.4
4

1 5
+
0.4 4

1646
15

an d
D 2=

1 n
+
0.4 4

1 5
+
0.4 4

E ( |x )=B=

4
15

1646
15

Var ( | x )=D2=

4
15

x N

4
,
( 1646
15 15 )

Question 1:
x N ( B , D2 ) where B=

1646
4
D 2=
15
15

y N ( , 2 ) where = 2=4

f ( y|x )= f ( y| ) f ( |x ) d

( y)2
(B)2
1
1
exp

exp
d
2
2 2
2 D
2 D2

} {

( y )2
(B)2
1
exp
exp
d
2 D
2 2
2D2

} {

1
y 22 y+ 2
22B+ B2
exp
exp
d
2 D
2 2
2D2

1
y
B

exp

2
2 D
2
2 D2

} {
exp

2 B 2 y+

d
2 D2
2 2

RHS= exp

exp

exp

exp

2B 2 y+

d
2
2
2D
2

2 2 B 2 y 2
+
+

d
2 D2 2 D2 2 2 2 2

2 2 B y

+ +
d
2 D2 2 2 D2 2

{ (

)}

1 1 1 2 B y
+
+ 2 + 2 d
2 D2 2
D

) (

{ ( ) (

{ ( ) (

{ ( ) (

)}

1 2+ D2 2 B 2+ y D2
exp
+
d
2 D2 2
D2 2

)}

1 2+ D2 2 B 2+ y D2 2+ D2
exp
+
2
d
2 D2 2
D2 2
+ D2

exp

exp

)}

1 + D 2 B + y D + D
+
2 2 d
2 D2 2
2 + D2
D

{
2

1 2 1
+ 2 F d
2
2E
2E

where E =

D 22
B 2 + y D2
F=
.
2 + D2
2 + D2

We get the integral of RHS 1 by adding the appropriate con stant .

RHS exp

1 2 1
+ 2 F d
2
2E
2E

1
1 2 1
1
exp
+ 2 F 2 F 2 d
2
2 E
2E
E
2E

(F)2
1
exp
d
2 E
2 E2

Therefore , we get
f ( y|x )

1
y2
B

exp

2
2 D
2
2 D2

} {

22 B 2 y+ 2

d
2 D2
2 2

2 E
y2
B
1

exp

+ 2 F2
2
2
2 D
2
2 D 2E

2 E
y 2 B2
1

exp

+ 2 F2 1
2
2
2 D
2
2 D 2E

D2 2
2 + D2
y2 B 2
1
exp

+ 2 F2
2
2
2 D
2
2D 2E

2 ( D )

(F )2
1
exp
d

2 E2
2 E

y
B
1
2

exp

+ 2F
2
2
2
2
2
2D 2E
2 D + D

1
y
B
1
exp

+ 2 F2
2
2
2
2
2
2D 2E
2 + D
1

y
B

exp

+
2
2
2
2
2 D2
2 + D

}
2

1
B +y D
2 2
D
2 + D2
2 2
2
+D

1
y 2 D2 +B 2 2

exp

+
2 2 D2
2 2 + D2

{(

1
2

D2 2
2+ D 2

2 2

B 2+ y D 2
2 + D2

1
y 2 D2 +B 2 2
1
B2 4 + y 2 D 4 + 2 B 2 y D 2
exp

+
2 2 D2
2+ D 2
2 ( D2 2 )
2 2 + D2

1
1
exp
2
2
2 2 D2
2 + D

1
1
exp
2 2
2
2
2 D
2 + D

{(

2 2 + D

exp
2

)((

B + y D +2 B y D
y 2 D 2B 2 2
2
2
+D

)}

)}

{( )(

B + y D +2 B y D y D y D B B D
2
2
+D

{(

)(

1
2
2
2( + D )

1
y 22 By + B2
exp
2 ( 2 + D2 )
2 2 + D2

( yB )
1
exp
2
2
2 ( 2 + D2 )
2 + D

( y H )
1
exp
2
2 G
2G

B + y D y D B
2
2
+ 2 By y B
2
2
+D

)}

)}

yx N ( H , G2 )
where
H=B=

1646
15

4 64
=
15 15

G2= 2+ D2 =4+

E ( y|x )=H

1646
15
2

Var ( y|x )=G =

y x N

64
15

64
, )
( 1646
15 15

Question 2:
m

E ( Y )=E

( )
yi
i=1

1
( m )=
m

Var ( Y )=Var

yi
i=1

1
4
( 4 m)=
2
m
m

x N ( B , D2 ) where B=

1646
4
D 2=
15
15

y N ( , 2 ) where = 2=

4
m

f ( y|x )= f ( y| ) f ( |x ) d

} {

( y )2
(B)2
1
exp
exp
d
2 D
2 2
2D2

} {

1
y 22 y +2
22 B+B 2
exp
exp
d
2
2 2
2 D2

1
y
B

exp

2
2
2
2 D2

} {
exp

exp

2 B 2 y +

d
2 D2
2 2

2 2B 2 y +2
RHS= exp

d
2 D2
2 2

( y )2
(B)2
1
1
exp

exp
d
2
2 2
2 D
2 D2

2 2 B 2 y 2
+
+

d
2 D2 2 D2 2 2 2 2

exp

exp

exp

exp

exp

exp

B y
2 + 2 2 d
2
2 D 2 D

{ (

)}

1 1 1 2 B y
+
+ 2 + 2 d
2 D2 2
D

) (

{ ( ) (
2

)}

1 + D 2 B + y D
+
d
2 2
2 D2 2
D

{ ( ) (

)}

{ ( ) (

)}

1 2+ D2 2 B 2+ y D2 2+ D2
+
2
d
2 2
2
2 D2 2
D
+D
1 2+ D2 2 B 2+ y D2 2+ D2
+
2 2 d
2 D2 2
2 + D2
D

1 2 1
+ 2 F d
2 E2
2E

where E =

D 22
B 2 + y D2
F=
.
2
2
2
2
+D
+D

We get theintegral of RHS 1 by adding the appropriate constant .

RHS exp

1 2 1
+ 2 F d
2 E2
2E

1
1 2 1
1
exp
+ 2 F 2 F 2 d
2
2 E
2E
E
2E

(F)
1
exp
d
2 E
2 E2

Therefore , we get
f ( y|x )

1
y 2
B
ex p

2
2 D
2
2 D2

} {

2 2B 2 y + 2

d
2 D2
2 2

2 E
y 2
B
1

exp

+ 2 F2
2
2
2 D
2

2D

2E

(F )2
1
exp
d
2 E
2 E2

2 E
y 2 B2
1

exp

+ 2 F2 1
2
2
2 D
2
2 D 2E

D2 2
2 + D2
y2 B 2
1
exp

+ 2 F2
2
2
2 D
2
2D 2E

2 ( D )
2 D + D
2

exp
2

y
B
1
2

+ 2F
2
2
2
2D 2E

1
y 2 B2
1
exp

+ 2 F2
2
2
2
2
2
2D 2E
2 + D
1

y
B

exp

+
2
2
2
2
2 D2
2 + D

}
(

1
B + y D
2 2
D
2 + D2
2 2
2
+D

1
y 2 D2 +B 2 2
exp

+
2 2 D2
2 2 + D2

1
2

D2 2
2+ D 2

2 2

B 2+ y D2
2 + D2

{(

1
y 2 D2 +B 2 2
1
B2 4 + y 2 D4 + 2 B 2 y D2
exp

+
2
2
2
2
2 D
+D
2 ( D2 2 )
2 2 + D2
1

2 2 + D

exp
2

{(

1
2 2 D2

)((

2 2 + D

exp
2

B 2 4 + y 2 D 4 +2 B 2 y D2
y 2 D 2B 2 2
2
2
+D

{(

)(

1
2
2
2( + D )

( y B )2
1

exp
2 ( 2 + D2 )
2 2 + D2

( y H )2
1

exp
2 G
2 G2

y x N ( H , G2 )
where

1646

15
2

G = +D =

E ( y|x )=H=

4 4
+
15 m

1646
15

)}

{( )(

B + y D y D B
2
2
+ 2 B y y B
2
2
+D

2
2
1
y 2 B y + B

exp
2 ( 2 + D2 )
2 2 + D2

H=B=

)}

B2 4 + y 2 D4 +2 B 2 y D2 y 2 D2 2 y 2 D 4B2 4 B 2 D2
2 + D2

1
1
exp
2
2
2 2 D2
2 + D
1

)}

)}

Var ( y|x )=G2=

y x N

4 4
+
15 m

4 4
, +
( 1646
15 15 m )

You might also like