Therefore
p
X
1
X
2

Θ
(0
,
0

2)
=
Z
∞
∞
p
X
1

P
(0

p
)
p
X
2

P
(0

p
)
f
P

Θ
(
p

1)
dp
=
Z
1
0
(1

p
)
2
·
1
dp
=
1
·
p

p
2
+
p
3
3
1
0
=
1
3
.
The second step follows from the fact that given
P
=
p
,
X
1
,
X
2
are independent
Bern
(
p
) random variables. Similarly,
p
X
1
X
2

Θ
(0
,
0

2)
=
R
1
0
(1

p
)
2
·
1
dp
=
1
3
,
p
X
1
X
2

Θ
(0
,
1

2)
=
p
X
1
X
2

Θ
(1
,
0

2)
=
R
1
0
p
(1

p
)
·
1
dp
=
1
6
,
p
X
1
X
2

Θ
(1
,
1

2)
=
R
1
0
p
2
·
1
dp
=
1
3
,
and
On the other hand
p
X
1
X
2

Θ
(0
,
0

1) =
p
X
1
X
2

Θ
(0
,
1

1) =
p
X
1
X
2

Θ
(1
,
0

1) =
p
X
1
X
2

Θ
(1
,
1

1) =
1
4
.
Thus the optimal decision rule is
D
(
x
1
, x
2
) =
(
2
x
1
=
x
2
1
otherwise.
(b) The probability of errorP{D(X1, X2)6= Θ}
P
e
=
=
p
X
1
X
2
Θ
(0
,
0
,
1) +
p
X
1
X
2
Θ
(0
,
1
,
2) +
p
X
1
X
2
Θ
(1
,
0
,
2) +
p
X
1
X
2
Θ
(1
,
1
,
1)
=
p
Θ
(1)
(
p
X
1
X
2

Θ
(0
,
0

1) +
p
X
1
X
2

Θ
(1
,
1

1)
)
+
p
Θ
(2)
(
2
p
X
1
X
2

Θ
(0
,
1

2)
)
=
(
1
4
+
1
6
)
=
5
12
.
3