Given
Consider an on-off keyed system in which the receiver makes its decision based on a single complex number y, as follows:
\begin{align} y = hA + n, \ 1 \ sent \\ y = n \ \ \ \ \ \ \ \ \ \ , \ 0 \ sent \end{align}
where $A > 0$, $h$ is a random channel gain modeled as a zero mean, proper complex Gaussian random variable with $E[|h|^2] = 1$, and $n$ i zero mean, proper complex Gaussian noise with variance $\sigma^2 = N_0/2$ per dimension.
Question
Assume that $h$ is unknown to the receiver, but that the receiver knows its distribution (given above). Show that the Maximum Likelihood (ML) decision rule based on y is equivalent to comparing $|y|^2$ with a threshold. Find the value of the threshold in terms of the system parameters.
Solution
I don't know what role A playes here but since $h$ and $n$ are both Gaussian, $y$ should be Gaussian as well
\begin{align} y \sim N(0,1+N_0/2), \ 1 \ sent \\ y \sim N(0,N_0/2), \ 0 \ sent \end{align}
Then we get the condition probability densities as
\begin{align} p(x|1) = \frac{1}{\sqrt{2\pi(1+N_0/2)}}e^{-x^2/2(1+N_0/2)} \\ p(x|0) = \frac{1}{\sqrt{N_0\pi}}e^{-x^2/N_0} \\ \end{align}
The decision rule should be:
if $p(x|1) > p(x|0)$ then classify as 1, else clasify as 0
But how do I compute $|y|^2$ from here, anybody?
Hints:
$$\mathbb{E}[|y|^2]=1\implies\mathbb{E}[|yA|^2]=A^2.$$ Second, you need to compute $\Pr\{y|0\}$ and $\Pr\{y|1\}$.
Last, $$\Pr\{y|1\} \ge \Pr\{y|0\} \iff \ln\left(\Pr\{y|1\}\right) \ge \ln\left(\Pr\{y|0\}\right).$$