I'm trying to solve the following exercise: Given a system that transmits bit $b$ with probability $p_b$ and $-b$ with $p_{-b}$ and the transmission is degraded by AWGN $N(0,\sigma^2)$. What is the optimal decision threshold $\mu$ to minimize the probability of error? Use Q functions to express the probability of error.
My approach:
$P_e = P_b P(-b|b) + P_{-b} P(b|-b)$, where $P(-b|b)$ means probability of detecting $-b$ given that $b$ was transmitted.
$P(-b|b)$ is the left tail of the distribution ($\Phi$) since I need to receive a value smaller than $\mu$ after sending $b$, but since the exercise asks in $Q$ -> $Q(-(\frac{\mu-b}{\sigma}))$
$P(b|-b)$ is already the right tail as I need to get something greater than $\mu$ after sending $-b$, so $Q(\frac{\mu+b}{\sigma})$.
To find the optimal $\mu$, I took the derivate of $P_e$ with respect to $\mu$ and set it equal to 0. To facilitate notation, I will use $X = \frac{-(\mu-b)}{\sigma}$ and $Y = \frac{\mu+b}{\sigma}$.
Now I have $P_1 e^{-\frac{X^2}{2}} = -P_{-1} e^{-\frac{Y^2}{2}}$.
After some manipulation and taking $ln$ on both sides: $ln(\frac{p_1}{p_{-1}}) = \frac{\frac{Y^2}{2}}{\frac{-X^2}{2}} = \frac{2\mu b}{\sigma^2}$.
So, $\mu = ln(\frac{p_1}{p_{-1}}) \frac{\sigma^2}{2b}$ but the solutions I have don't have the $\sigma^2$ term, so I cannot find where I made a mistake.
As for the derivative of the $Q$ function, it should be $-\Phi'$, right? Which ends up being the pdf, so $e^{-\frac{z^2}{2}}$ (omitting the normalization factor as they will cancel out on this particular question)