# Determining probability of a normal random variable at a single point?

I tried to do this exercise from A first course in probability by Sheldon Ross:

An image is partitioned into two regions, one white and the other black. A reading taken from a randomly chosen point in the white section will give a reading that is normally distributed with $μ = 4$ and $σ^2 = 4$, whereas one taken from a randomly chosen point in the black region will have a normally distributed reading with parameters $(6, 9)$. A point is randomly chosen on the image and has a reading of $5$. If the fraction of the image that is black is $α$, for what value of α would the probability of making an error be the same, regardless of whether one concluded that the point was in the black region or in the white region?

My attempt at the problem:

Let $A$ be the event that the chosen point has a reading of $5$, and $B$ that it's in the black region. We need to show that $P(B\mid A)=P(B'\mid A)$, which is equivalent to $P(B\mid A)=\frac12$.

We know that

$$P(B\mid A)=\frac{P(B)P(A\mid B)}{P(B)P(A\mid B)+P(B')P(A\mid B')}$$

Here is my problem. Isn't $P(A)=0$, because of the normal random variable being continuous? If so, how can I compute $P(A\mid B)$ and $P(A\mid B')$? Or maybe my whole approach is wrong?

You don't compute the conditional probability mass, you use the conditional probability density.

$$\mathsf P(B\mid A) =\dfrac{\mathsf P(B)f(A\mid B)}{\mathsf P(B)f(A\mid B)+\mathsf P(B')f(A\mid B')}$$

Where $f(A\mid B) = \dfrac{\exp(-(5-4)^2/8)}{\sqrt{8\pi~}}$, $f(A\mid B') = \dfrac{\exp(-(5-6)^2/18)}{\sqrt{18\pi~}}$

• Thank you. This is weird though because conditional probability density is introduced later in the book. But do I understand correctly that you basically changed the event $(X=5)$ to $(5-\epsilon<X<5+\epsilon)$, where $X$ is a normal random variable, and then used the fact that $P(5-\frac{\epsilon}{2}<X<5+\frac{\epsilon}{2})\approx f(5)\epsilon$? – bg5 Sep 4 '16 at 16:27
• @bg5 It's basically applying l'Hopital's Rule to $$\mathbf P(B\mid A) = \lim_{\epsilon\to 0}\dfrac{\mathsf P(B)~\mathsf P(5-\epsilon<X<5+\epsilon\mid B)}{\mathsf P(B)~\mathsf P(5-\epsilon<X<5+\epsilon\mid B)+\mathsf P(B')~\mathsf P(5-\epsilon<X<5+\epsilon\mid B')}$$ – Graham Kemp Sep 4 '16 at 23:37
• I understand, thank you! – bg5 Sep 5 '16 at 13:42

The normal distribution with expectation $\mu$ and standard deviation $\sigma$ is $$\frac 1 {\sqrt{2\pi\,}} \cdot \frac 1 \sigma \exp\left( \frac{-1} 2 \left( \frac{x-\mu} \sigma \right)^2 \right) \, dx.$$

Here's what I would do after that: \begin{align} & \frac{\Pr(\text{black}\mid \text{data})}{\Pr(\text{white}\mid \text{data})} = \frac{\Pr(\text{black})}{\Pr(\text{white})} \cdot \frac{\frac 1 {\sigma_1} \exp\left( \frac{-1} 2 \left( \frac{x-\mu_1} {\sigma_1} \right)^2 \right) }{\frac 1 {\sigma_2} \exp\left( \frac{-1} 2 \left( \frac{x-\mu_2} {\sigma_2} \right)^2 \right)} \\[10pt] = {} & \frac{\Pr(\text{black})}{\Pr(\text{white})} \cdot \frac{\sigma_2}{\sigma_1} \cdot \exp\left( \frac{-1} 2 \left( \left( \frac{x-\mu_1} {\sigma_1} \right)^2 - \left( \frac{x-\mu_2} {\sigma_2} \right)^2 \right) \right) \\[10pt] = {} & \frac{\Pr(\text{black})}{\Pr(\text{white})} \cdot \frac 3 2 \cdot \exp\left( \frac{-1} 2 \left( \frac 1 9 - \frac 1 4 \right) \right) \\[10pt] = {} & \frac \alpha {1 - \alpha} \cdot \frac 3 2 \cdot \exp\left( \frac 5 {72} \right). \end{align} (Here I used $\mu_1=6$, $\sigma_1=3$, $\mu_2 =4$, $\sigma_2 = 2$, $x=5$.)

Now set that equal to $1$ and solve for $\alpha$.

• Thank you, but I think the expectations and standard deviations should be swapped and it should equal $1$, not $\frac{1}{2}$, am I right? – bg5 Sep 5 '16 at 13:41
• @bg5 : You're right: Those two should be swapped. $\qquad$ – Michael Hardy Sep 5 '16 at 15:58
• @bg5 : Done. $\quad{{{}}}\quad$ – Michael Hardy Sep 5 '16 at 16:00