I would like to check if my solution to a standard problem in Bayesian statistics is correct.
We study a simple noisy communication channel. Suppose that $\mathsf{X}$ is a binary signal that takes value $-1$ and $1$ with equal probability. The received signal is $\mathsf{Y} = \mathsf{X} + \mathsf{N}$, where $\mathsf{N}$ is a standard normal, independent of $\mathsf{X}$.
The decoder receives the value of $\mathsf{Y}$ and decides whether $\mathsf{X}$ was $1$ or $-1$ using the following decoding rule: $\mathsf{X}$ was $1$ if and only if: $$\mathbb{P}(\mathsf{X} =1 | \mathsf{Y} = y) > 2 \cdot \mathbb{P}(\mathsf{X} =-1 | \mathsf{Y} = y) .$$
It turns out that the decoding rule can be expressed in the form: decide in favour of $1$ if and only if $\mathsf{Y} > t$ for some threshold $t$. Find the threshold.
My solution was to apply the mixed Bayes rule (e.g. $\mathbb{P}(\mathsf{X} =1 | \mathsf{Y}= y) =\frac{f_{\mathsf{Y}|x=1}(y) \cdot \mathbb{P}(\mathsf{X} =1)}{f_{\mathsf{Y}}(y)} $) to both sides and solve the inequality in the variable $y$.
After some computations, this led me to the threshold $$t=\frac{\ln(2)}{2}.$$ Does this solution make any sense?
Let's see. Abusing the notation $P(Y=y)$ to mean $f_Y(y)$...
$$ \begin{align} P(X =1 | Y = y) &> \lambda \, P(X =-1 | Y = y) \\ \frac{P(Y = y|X=1)P(X=1)}{P(Y=y)} &> \lambda \frac{P(Y = y|X=-1)P(X=-1)}{P(Y=y)} \\ P(Y = y|X=1) &> \lambda \, P(Y = y|X=1) \\ P(N=y-1) &> \lambda \, P(N=y+1) \\ \frac{1}{\sqrt {2 \pi}} \exp\left(-\frac{(y-1)^2}{2} \right) &> \lambda \, \frac{1}{\sqrt {2 \pi}} \exp\left(-\frac{(y+1)^2}{2} \right) \\ -\frac{(y-1)^2}{2} &> \log \lambda - \frac{(y+1)^2}{2} \\ y^2 +2y +1 &> 2 \log \lambda + y^2-2y +1 \\ 4y &> 2 \log \lambda \\ y &> \frac{ \log \lambda }{2} \\ \end{align}$$
So, yes, it seems you are right.