# Hypothesis testing for detecting signal in Gaussian noise

I have the following two hypotheses:

$$\hspace{5cm}\mathcal{H}_0: y=w\\\hspace{5cm}\mathcal{H}_1: y=\sum_{i=1}^{N}h_ix_i+w$$

Here $$w\sim \mathcal{N}(0,1)$$ represents Gaussian noise. $$x_i \sim Bern(p), \forall i$$ are i.i.d Bernoulli random variables.

Furthermore, $$h_i \sim \mathcal{N}(0,\sigma^2), \forall i$$ are i.i.d Gaussian random variables.

My aim: Derive a testing scheme to distinguish the 2 hypotheses based on the observation $$y$$?

My approach: I know $$f(y|\mathcal{H}_0)=\frac{1}{\sqrt{2\pi}}e^{-\frac{y^2}{2}}$$. Now, If I can compute $$f(y|\mathcal{H}_1)$$, then I could compute their ratios and perform the Likelihood Ratio Test.

But, I am unable to compute $$f(y|\mathcal{H}_1)$$ explicitly. I was able to derive an expression involving $$N$$ Gaussians and 1 impulse using the idea here. But this is useless to me as for large $$N$$ values the likelihood ratio is hard to compute.

Questions:

Can someone help me derive a good testing rule to distinguish between the 2 Hypotheses?

If my approach is the only way to go about this, can someone help me compute $$f(y|\mathcal{H}_1)$$ and perhaps simplify it for large $$N$$ values.

• Are $N$, $p$, and $\sigma$ known in advance? Jun 17 at 14:17
• @MattF. Yes, they are known in advance. Jun 19 at 14:49
• And by “the observation $y$“ you mean a single observation or a set of observations? Jun 19 at 20:18
• @MattF. Here, I mean a single observation. I was hoping that if I could do this for single observation case, then I can extend it to a multiple observation case. In short, either is fine for me. Jun 20 at 3:54

The variance under $$H_1$$ exceeds the variance under $$H_0$$. Extreme values for $$y$$ are less likely under $$H_0$$ than under $$H_1$$.
Reject $$H_0$$ in favor of the alternative $$H_1$$ if you observe an extreme value $$y$$.
The distribution of $$y$$ under $$H_0$$: $$\quad P_{H_0}(y) \sim N(0,1)$$.
Pick a false negative error rate $$\alpha$$ you can live with. Reject $$H_0$$ when $$|y|$$ exceeds a threshold $$\theta$$,
$$P_{H_0}(y < -\theta)+P_{H_0}(y > +\theta) = P( |y| > \theta) = \alpha.$$
Reject $$H_0$$ if $$|y| > \theta = \Phi^{-1}(\frac{\alpha}{2})$$, where $$\Phi^{-1}()$$ is the inverse cumulative normal function.
For example, specifying $$\alpha = 0.01$$, reject $$H_0$$ if $$|y| > 2.58$$.