(b)let - purdue university college of engineering

47
ECE 645 Spring 2021 Problem Set 3 Due Wednesday March 3, 2021 1. Consider the composite hypothesis testing problem: H 0 : Y has density p 0 (y) = (1/2)e -|y| ,y ∈R H 1 : Y has density p θ (y) = (1/2)e -|y-θ| ,y ∈R,θ> 0 . (a) Describe the locally most powerful α–level test and derive its power func- tion. (b) Does a uniformly most powerful test exist? If so, find it and derive its power function. If not, find the generalized likelihood ratio test for H 0 versus H 1 . 2. Consider the following pair of hypotheses concerning a sequence Y 1 , Y 2 ,..., Y n of random variables H 0 : Y k ∼N (μ 0 2 0 ),k =1, 2,...,n H 1 : Y k ∼N (μ 1 2 1 ),k =1, 2,...,n where μ 0 , μ 1 , σ 2 0 , and σ 2 1 are known constants. (a) Show that the likelihood ratio can be expressed as a function of the pa- rameters μ 0 , μ 1 , σ 2 0 , and σ 2 1 , and the quantities n k=1 Y 2 k and n k=1 Y k . (b) Describe the Neyman–Pearson test for the two cases (μ 0 = μ 1 2 1 2 0 ) and (σ 2 0 = σ 2 1 1 0 ). (c) Find the threshold and ROCs for the case μ 0 = μ 1 , σ 2 1 2 0 with n = 1. 3. Consider the hypotheses of Problem 2 with μ = μ 1 0 = 0 and σ 2 = σ 2 0 = σ 2 1 > 0. Does there exist a uniformly most powerful test of these hypotheses under the assumption that μ is known and σ 2 is not? If so, find it and show that it is UMP. If not, show why and find the generalized likelihood ratio test. 4. Derivation of some important pdfs. (a) Let Z 1 ,Z 2 ,...,Z n be i.i.d. and N (0, 1). Then Y def = n X i=1 Z 2 i is said to be a chi-squared random variable with n degrees of freedom (χ 2 n ). Show that the pdf is f Y (y)= e y/2 y (n/2)-1 2 n/2 Γ(n/2) for y> 0 (and zero for y< 0). Note Γ(·) is the gamma function.

Upload: others

Post on 03-Jun-2022

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: (b)Let - Purdue University College of Engineering

ECE 645 Spring 2021Problem Set 3

Due Wednesday March 3, 2021

1. Consider the composite hypothesis testing problem:

H0 : Y has density p0(y) = (1/2)e−|y|, y ∈ RH1 : Y has density pθ(y) = (1/2)e−|y−θ|, y ∈ R, θ > 0

.

(a) Describe the locally most powerful α–level test and derive its power func-tion.

(b) Does a uniformly most powerful test exist? If so, find it and derive itspower function. If not, find the generalized likelihood ratio test for H0

versus H1.

2. Consider the following pair of hypotheses concerning a sequence Y1, Y2, . . . , Ynof random variables

H0 : Yk ∼ N (µ0, σ20), k = 1, 2, . . . , n

H1 : Yk ∼ N (µ1, σ21), k = 1, 2, . . . , n

where µ0, µ1, σ20, and σ2

1 are known constants.

(a) Show that the likelihood ratio can be expressed as a function of the pa-rameters µ0, µ1, σ

20, and σ2

1, and the quantities∑nk=1 Y

2k and

∑nk=1 Yk.

(b) Describe the Neyman–Pearson test for the two cases (µ0 = µ1, σ21 > σ2

0)and (σ2

0 = σ21, µ1 > µ0).

(c) Find the threshold and ROCs for the case µ0 = µ1, σ21 > σ2

0 with n = 1.

3. Consider the hypotheses of Problem 2 with µ = µ1 > µ0 = 0 and σ2 = σ20 =

σ21 > 0. Does there exist a uniformly most powerful test of these hypotheses

under the assumption that µ is known and σ2 is not? If so, find it and showthat it is UMP. If not, show why and find the generalized likelihood ratio test.

4. Derivation of some important pdfs.

(a) Let Z1, Z2, . . . , Zn be i.i.d. and N (0, 1). Then

Ydef=

n∑i=1

Z2i

is said to be a chi-squared random variable with n degrees of freedom (χ2n).

Show that the pdf is

fY (y) =ey/2y(n/2)−1

2n/2Γ(n/2)

for y > 0 (and zero for y < 0). Note Γ(·) is the gamma function.

Page 2: (b)Let - Purdue University College of Engineering

(b) Let X ∼ N (0, 1), Y ∼ χ2n and X and Y statistically independent. Then

we say (William Gosset, 1908)

T =X√Y/n

has “Student’s” T distribution with n degrees of freedom. Show that thepdf is

fT (t) =Γ((n+ 1)/2)

Γ(n/2)√πn

1

(1 + t2/n)(n+1)/2

for t ∈ R.

Hint: A workable approach to the solution involves using the pdf change ofvariable formula with the following invertible transformation from (x, y):x ∈ R, y > 0 to (t, u): t ∈ R, u > 0

t =x√y/n

u = y

to get the joint pdf of T and U . Then one integrates over the variableU = u to get the marginal pdf for T .

5. [Kay Detection Book P4.4] Assume that we wish to detect a known signal s[n]which is nonzero only for n = 0, 1, . . . , N − 1 in white Gaussian noise withvariance σ2. We now allow our observation interval to be infinite, i.e., weobserve x[n] for −∞ < n < ∞. Let h[n] be the impulse response of a linearshift invariant filter. Then the output y[n] corresponding to an input x[n] isgiven by

y[n] =∞∑

k=−∞h[n− k]x[k].

If the filter output is sampled at time n = N−1 the output SNR can be definedas

η =

(∑∞k=−∞ h[N − 1− k]s[k]

)2E[(∑∞

k=−∞ h[N − 1− k]w[k])2] .

Show that η is maximized by choosing h[n] as the matched filter or h[n] =s[N − 1 − n] for n = 0, 1, . . . , N − 1 and h[n] = 0 otherwise. Thus, the useof noise samples outside of the signal interval does not improve the detectionperformance.

6. [Kay Detection Book P4.5] In Problem 5 it was shown that the matched filterwas optimum even for an infinite observation interval. In this problem we showthat this is not generally the case when the noice is correlated. Repeat theproblem but now assume that the noise samples {w[0], w[1], . . . , w[N − 1]}are white Gaussian noise and that outside the [0, N − 1] interval the noise is

Page 3: (b)Let - Purdue University College of Engineering

periodic. Thus w[n] = w[n + N ]. Find the output SNR η (use the expressionin the previous problem) if the LSI filter is

h[n] =

1 for n = 0, 1, . . . , N − 1−1 for n = N, N + 1, . . . , 2N − 10 otherwise

and the output is sampled at n = N − 1. Explain your results.

7. [Kay Detection Book P4.9] Consider the detection of s[n] = A cos 2πf0n forn = 0, 1 . . . , N − 1 in the presence of white Gaussian noise of variance σ2.Define the input SNR as the average power of a signal sample to the noise power.This is approximately ηin = (A2/2)/σ2. Find the output SNR of the matchedfilter and hence the processing gain (defined as PG = 10 log10(ηout/ηin)). Nextdetermine the frequency response of the matched filter and plot its magnitudeas N increases. Explain why the matched filter improves the detectability of asinusoid. Assume that 0 < f0 < 1/2 and N is large. Hint: You will need theresult that

N−1∑n=0

exp(jαn) = exp[j(N − 1)α/2]sinNα/2

sinα/2.

8. [Kay Detection Book P4.14] In this problem we determine the optimal linearfilter for detecting a known signal in colored wide sense stationary Gaussiannoise based on an infinite observation interval. Thus, we use all the noisesamples from outside the signal interval. The detection problem then becomes

H0 : x[n] = w[n] for −∞ < n <∞

H1 : x[n] =

{s[n] + w[n] 0 ≤ n ≤ N − 1w[n] otherwise

where w[n] is Gaussian noise with a power spectral density Pww(f). The outputSNR of an LSI filter at time n = N − 1 is

η =

(∑∞k=−∞ h[k]s[N − 1− k]

)2E[(∑∞

k=−∞ h[k]w[N − 1− k])2] .

Note that since the filter processes data over the infinite observation interval−∞ < n <∞, it will be noncausal in general. Show that η may be written inthe frequency domain as

η =

(∫ 1/2−1/2H(f)S(f) exp[j2πf(N − 1)]df

)2∫ 1/2−1/2 |H(f)|2Pww(f)df

.

Next, use the Cauchy-Schwarz inequality to prove that η is maximized for

H(f) =S∗(f) exp[−j2πf(N − 1)]

Pww(f).

Page 4: (b)Let - Purdue University College of Engineering

Consider the composite hypothesis testing problem:

H0 : Y has density p0(y) = (1/2)e−|y|, y ∈ RH1 : Y has density pθ(y) = (1/2)e−|y−θ|, y ∈ R, θ > 0

.

(a) Describe the locally most powerful α–level test and derive its power function.

(b) Does a uniformly most powerful test exist? If so, find it and derive its powerfunction. If not, find the generalized likelihood ratio test for H0 versus H1.

Page 5: (b)Let - Purdue University College of Engineering
Page 6: (b)Let - Purdue University College of Engineering
Page 7: (b)Let - Purdue University College of Engineering
Page 8: (b)Let - Purdue University College of Engineering
Page 9: (b)Let - Purdue University College of Engineering
Page 10: (b)Let - Purdue University College of Engineering
Page 11: (b)Let - Purdue University College of Engineering
Page 12: (b)Let - Purdue University College of Engineering
Page 13: (b)Let - Purdue University College of Engineering
Page 14: (b)Let - Purdue University College of Engineering
Page 15: (b)Let - Purdue University College of Engineering
Page 16: (b)Let - Purdue University College of Engineering
Page 17: (b)Let - Purdue University College of Engineering
Page 18: (b)Let - Purdue University College of Engineering

Consider the following pair of hypotheses concerning a sequence Y1, Y2, . . . , Yn ofrandom variables

H0 : Yk ∼ N (µ0, σ20), k = 1, 2, . . . , n

H1 : Yk ∼ N (µ1, σ21), k = 1, 2, . . . , n

where µ0, µ1, σ20, and σ2

1 are known constants.

(a) Show that the likelihood ratio can be expressed as a function of the parametersµ0, µ1, σ

20, and σ2

1, and the quantities∑nk=1 Y

2k and

∑nk=1 Yk.

(b) Describe the Neyman–Pearson test for the two cases (µ0 = µ1, σ21 > σ2

0) and(σ2

0 = σ21, µ1 > µ0).

(c) Find the threshold and ROCs for the case µ0 = µ1, σ21 > σ2

0 with n = 1.

Page 19: (b)Let - Purdue University College of Engineering
Page 20: (b)Let - Purdue University College of Engineering
Page 21: (b)Let - Purdue University College of Engineering

Consider the hypotheses of Problem 2 with µ = µ1 > µ0 = 0 and σ2 = σ20 = σ2

1 >0. Does there exist a uniformly most powerful test of these hypotheses under theassumption that µ is known and σ2 is not? If so, find it and show that it is UMP. Ifnot, show why and find the generalized likelihood ratio test.

Page 22: (b)Let - Purdue University College of Engineering
Page 23: (b)Let - Purdue University College of Engineering
Page 24: (b)Let - Purdue University College of Engineering
Page 25: (b)Let - Purdue University College of Engineering
Page 26: (b)Let - Purdue University College of Engineering

Derivation of some important pdfs.

1. Let Z1, Z2, . . . , Zn be i.i.d. and N (0, 1). Then

Ydef=

n∑i=1

Z2i

is said to be a chi-squared random variable with n degrees of freedom (χ2n). Show

that the pdf is

fY (y) =ey/2y(n/2)−1

2n/2Γ(n/2)

for y > 0 (and zero for y < 0). Note Γ(·) is the gamma function.

2. Let X ∼ N (0, 1), Y ∼ χ2n and X and Y statistically independent. Then we say

(William Gosset, 1908)

T =X√Y/n

has “Student’s” T distribution with n degrees of freedom. Show that the pdf is

fT (t) =Γ((n+ 1)/2)

Γ(n/2)√πn

1

(1 + t2/n)(n+1)/2

for t ∈ R.

Hint: A workable approach to the solution involves using the pdf change ofvariable formula with the following invertible transformation from (x, y): x ∈ R,y > 0 to (t, u): t ∈ R, u > 0

t =x√y/n

u = y

to get the joint pdf of T and U . Then one integrates over the variable U = u toget the marginal pdf for T .

Page 27: (b)Let - Purdue University College of Engineering
Page 28: (b)Let - Purdue University College of Engineering
Page 29: (b)Let - Purdue University College of Engineering
Page 30: (b)Let - Purdue University College of Engineering
Page 31: (b)Let - Purdue University College of Engineering
Page 32: (b)Let - Purdue University College of Engineering
Page 33: (b)Let - Purdue University College of Engineering
Page 34: (b)Let - Purdue University College of Engineering

[Kay Detection Book P4.4] Assume that we wish to detect a known signal s[n]which is nonzero only for n = 0, 1, . . . , N − 1 in white Gaussian noise with varianceσ2. We now allow our observation interval to be infinite, i.e., we observe x[n] for−∞ < n < ∞. Let h[n] be the impulse response of a linear shift invariant filter.Then the output y[n] corresponding to an input x[n] is given by

y[n] =∞∑

k=−∞h[n− k]x[k].

If the filter output is sampled at time n = N − 1 the output SNR can be defined as

η =

(∑∞k=−∞ h[N − 1− k]s[k]

)2E[(∑∞

k=−∞ h[N − 1− k]w[k])2] .

Show that η is maximized by choosing h[n] as the matched filter or h[n] = s[N−1−n]for n = 0, 1, . . . , N−1 and h[n] = 0 otherwise. Thus, the use of noise samples outsideof the signal interval does not improve the detection performance.

Page 35: (b)Let - Purdue University College of Engineering
Page 36: (b)Let - Purdue University College of Engineering
Page 37: (b)Let - Purdue University College of Engineering
Page 38: (b)Let - Purdue University College of Engineering

[Kay Detection Book P4.5] In Problem 5 it was shown that the matched filter wasoptimum even for an infinite observation interval. In this problem we show that thisis not generally the case when the noice is correlated. Repeat the problem but nowassume that the noise samples {w[0], w[1], . . . , w[N − 1]} are white Gaussian noiseand that outside the [0, N − 1] interval the noise is periodic. Thus w[n] = w[n+N ].Find the output SNR η (use the expression in the previous problem) if the LSI filteris

h[n] =

1 for n = 0, 1, . . . , N − 1−1 for n = N, N + 1, . . . , 2N − 10 otherwise

and the output is sampled at n = N − 1. Explain your results.

Page 39: (b)Let - Purdue University College of Engineering
Page 40: (b)Let - Purdue University College of Engineering

[Kay Detection Book P4.9] Consider the detection of s[n] = A cos 2πf0n for n =0, 1 . . . , N−1 in the presence of white Gaussian noise of variance σ2. Define the inputSNR as the average power of a signal sample to the noise power. This is approximatelyηin = (A2/2)/σ2. Find the output SNR of the matched filter and hence the processinggain (defined as PG = 10 log10(ηout/ηin)). Next determine the frequency response ofthe matched filter and plot its magnitude as N increases. Explain why the matchedfilter improves the detectability of a sinusoid. Assume that 0 < f0 < 1/2 and N islarge. Hint: You will need the result that

N−1∑n=0

exp(jαn) = exp[j(N − 1)α/2]sinNα/2

sinα/2.

Page 41: (b)Let - Purdue University College of Engineering
Page 42: (b)Let - Purdue University College of Engineering
Page 43: (b)Let - Purdue University College of Engineering
Page 44: (b)Let - Purdue University College of Engineering

In this problem we determine the optimal linear filter for detecting a known sig-nal in colored wide sense stationary Gaussian noise based on an infinite observationinterval. Thus, we use all the noise samples from outside the signal interval. Thedetection problem then becomes

H0 : x[n] = w[n] for −∞ < n <∞

H1 : x[n] =

{s[n] + w[n] 0 ≤ n ≤ N − 1w[n] otherwise

where w[n] is Gaussian noise with a power spectral density Pww(f). The output SNRof an LSI filter at time n = N − 1 is

η =

(∑∞k=−∞ h[k]s[N − 1− k]

)2E[(∑∞

k=−∞ h[k]w[N − 1− k])2] .

Note that since the filter processes data over the infinite observation interval −∞ <n <∞, it will be noncausal in general. Show that η may be written in the frequencydomain as

η =

(∫ 1/2−1/2H(f)S(f) exp[j2πf(N − 1)]df

)2∫ 1/2−1/2 |H(f)|2Pww(f)df

.

Next, use the Cauchy-Schwarz inequality to prove that η is maximized for

H(f) =S∗(f) exp[−j2πf(N − 1)]

Pww(f).

Page 45: (b)Let - Purdue University College of Engineering
Page 46: (b)Let - Purdue University College of Engineering
Page 47: (b)Let - Purdue University College of Engineering