You are on page 1of 5

ECE 567

STATISTICAL SIGNAL PROCESSING

FALL 2016

Homework Assignment #1
Solutions
1. (a)


2
exp 12 x3

(x) =
x exp 21 x2


1
1 2
= exp
x .
3
3
x
3

Therefore, the ML detector is


1
exp
3

1 2
x
3

d1
>
<
d0

1.

(b) > is equivalent to x2 > 0 . For


d1
2 >
x <
d0

we have
PF A = P (x2 > 0 ; H0 )


Z
1 2
= x exp
x dx
2
0


1 2
x
= exp
0
2



1
= exp 0 .
2
Using this, we find that PF A = 0.1 when 0 = 2 ln(10); therefore, the NP test is
d1
2 >
x <
d0

2 ln(10).



x
1 2
exp x dx
PD =
6
2 ln(10) 3


1
= exp ln(10)
3
Z

= 101/3 = 0.4642.
So, PD is about 46%.

2. The NP test for PF A = 0.001 is


x

d1
>
<
d0

Q1 (0.001) = 3.09,

corresponding to a critical region of {x : x > 3.09}. By symmetry of the Gaussian


density we have that
x

d0
>
<
d1

3.09

also yields PF A = 0.001 with a critical region {x : x < 3.09}. For this detector
PD = P (x < 3.09; H1 )
= P ( < 4.09) for N (0, 1)
= P ( > 4.09)
= Q(4.09) = 0.000021569
which is much smaller than 0.0183 (which is PD for the NP test).
Another option with PF A = 0.001 is to set
|x|

d1
>
<
d0

Q1 (0.0005) = 3.29

with critical region {x : |x| > 3.29}. For this detector


PD = P (x > 3.29; H1 ) + P (x < 3.29; H1 )
= Q(2.29) + Q(4.29)
= 0.011
which is somewhat smaller than 0.0183, but still smaller.
3. The NP test as shown in class is
N 1
1 X
T (x) =
x(n)
N n=0

We know


T (x)

d1
>
<
d0

N (0, 2 /N ), under H0
N (A, 2 /N ), under H1

PF A = Q
= Q( N ) since 2 = 1
/ N



PD = Q
= Q(( A) N )
/ N


Given N , we choose to set PF A = 0.01 by


1
= Q1 (0.01).
N
For this and N , solving



Q ( A) N = 0.9

yields
1
A = Q1 (0.9).
N
Note that this is the smallest achieving PF A = 0.01 for this N , and hence we get the
smallest associated A achieving the desired PD . Since

1
A=
Q1 (0.01) Q1 (0.9)
N
we have

2
N A2 = Q1 (0.01) Q1 (0.9)

for each choice of N , a constant. So any choice of N minimizes N A2 with


T (x)
and

d1
>
<
d0

1
Q1 (0.01)
N


1
A=
Q1 (0.01) Q1 (0.9)
N

4.


2
exp 12 x (n)
2
1


(x) = Q
N 1 x(n)
1 x2 (n)
n=0 02 exp 2 02
!
 2 N

 N 1
0
1 1
1 X 2
exp

x (n)
=
12
2 02 12 n=0
QN 1

x(n)
n=0 12

If 12 > 02 as given, comparing (x) to threshold is equivalent to


N
1
X
n=0

x2 (n)

d1
>
<
d0

which is the form of the NP test (with 0 chosen to set PF A ). One could choose to use
the average squared observation value:
N 1
1 X 2
x (n)
N n=0

d1
>
<
d0

00

5. We choose H1 if
p(x|H1 )P (H1 ) > p(x|H0 )P (H0 ).
If P (H0 ) = 1/2, then P (H1 ) = 1/2 and we choose H1 if




1
1
1 2
1 2
exp x > exp x
4
2
4
2
which can be simplified to
x2 > ln(4)
or
|x| >

ln(4) = 1.1774.

The MAP test with P (H0 ) = 1/2 is


|x|

d1
>
<
d0

1.1774

If P (H1 ) = 3/4, then P (H0 ) = 1/4 and we get






1 2
1 2
1/4
3/4
exp x > exp x
4
2
4
2
resulting in



2
1 2
.
exp x >
4
3

Since the right hand side of this inequality is less than 1, and the left hand side is greater
than or equal to one, we always choose H1 . Thus, the MAP test with P (H1 ) = 3/4
always chooses H1 . In this second case, H1 is likely enough that no measurement
makes H0 the more likely possibility.
6. The problem formulation suggests Bayes Risk minimization as the solution. We have
C00
C01
C10
C11

=0
= $500K
= $50K
=0

and P (H0 ) = 0.99 and P (H1 ) = 0.01. The rule is then


p(x|H1 )
p(x|H0 )
exp(|x 8|)
exp(|x 5|)
exp(|x 5| |x 8|)

d1
>
<
d0
d1
>
<
d0
d1
>
<
d0

50 0.99
= 9.9
500 0.01
9.9
9.9

For x < 5, this is


exp(3)

d1
>
<
d0

9.9

and we always choose H0 . For x > 8 this is


exp(3)

d1
>
<
d0

9.9

and we always choose H1 . For 5 < x < 8 this is


exp(2x 13)
2x 13
x

d1
>
<
d0
d1
>
<
d0
d1
>
<
d0

Thus
x

9.9
ln(9.9)
ln(9.9) + 13
= 7.6463.
2
d1
>
<
d0

7.6463

is the optimizing rule.


7. p(x(0)|Hi ) is maximized over choice of Hi by deciding

d0 , x < 1

d1 , 1 < x < 3
d(x) =
d2 , 3 < x < 5

d3 , x > 5
(That is, choose the hypothesis with mean closest to the measurement.)
Pe = P (x > 1|H0 )P (H0 )
+ (P (x < 1|H1 ) + P (x > 3|H1 )) P (H1 )
+ (P (x < 3|H2 ) + P (x > 5|H2 )) P (H2 )
+ P (x < 5|H3 )P (H3 )
1
= [Q(1) + (Q(1) + Q(1)) + (Q(1) + Q(1)) + Q(1)]
4
Pe = 0.2380

You might also like