Minimizing a conditional probability involving normal distribution

54 Views Asked by At

First of all, I'm sorry for the vagueness of my question's title, I really couldn't think of a better one. The matter is I'm having trouble with a particular problem, rather than with general cases, and said problem can't be summarized into the question's title. It's not a particularly difficult one but I'm somehow not arriving at the correct result (I've simulated the experiment and that's how I'm checking my result is incorrect). I've been re-reading and re-doing it several times over the last week but I can't find the mistake, so I'm asking for help here. Without further ado, this is the problem, translated as good as I can:

A reciever recieves a signal of amplitude $X=S+N$, where $S\sim Ber(\frac{3}{4})$. (Bernoulli random variable with parameter 0.75), and $N \sim N(0,\frac{1}{4})$ (Normal random variable with mean 0 and standard deviation 0.5). $S$ and $N$ are independent. When $S=1$, the signal contains useful information. When $S=0$, the signal does not contain useful information. The reciever will ignore any signal with amplitude $X \leq c$. We'll say we have en error whenever the reciever ignores a useful signal, or it doesn't ignore a useless signal. Find $c$ such that the probability of error is minimal.

From the total probability theorem we have $$P(error)=P(error|S=0) P(S=0) + P(error|S=1) P(S=1)$$ $$P(error)=P(X_{|S=0}>c)·\frac{1}{4}+P(X_{|S=1}<c)·\frac{3}{4}$$ Where $X_{|S=0}\sim N(0,\frac{1}{4})$ and $X_{|S=1}\sim N(1,\frac{1}{4})$

Now, if $Z\sim N(0,1)$, we standardize and get $$P(error)=\frac{1}{4}·(1-P(Z<\frac{c-0}{1/2}))+\frac{3}{4}·P(Z<\frac{c-1}{1/2})$$ $$P(error)=\frac{1}{4}-\frac{1}{4}·\phi(2c)+\frac{3}{4}·\phi(2c-2)$$ Where $\phi$ is the cumulative distribution function of the standard normal distribution.

Now, to minimize this probability I'll take the derivative with respect to c and equal to 0 $$\frac{d}{dc}P(error)=-\frac{2}{4}\phi'(2c)+\frac{6}{4}\phi'(2c-2)$$ $$-1\phi'(2c)+3\phi'(2c-2)=0$$ $$\frac{3}{\sqrt{2\pi}}e^{-\frac{1}{2}(2c-2)^2}=\frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}(2c)^2}$$ $$3=e^{-\frac{1}{2}(2c)^2}·e^{\frac{1}{2}(2c-2)^2}$$ $$3=e^{2-4c}$$ $$c=\frac{2-ln(3)}{4}=0.2253...$$ But, according to the simulation I ran, it should be $$c=\frac{2-ln(\frac{3}{2})}{4}=0.3986...$$

I can't seem to find my mistake and I dont know why the argument of my logarithm ends up being the double of what it should be, I've been stuck at this one for quite some time and my professor is taking forever to review what I've tried, I'd appreciate it if anyone is kind enough to check where I'm going wrong. Thanks in advance