# identifying which of $d$ normal distribution generated a given sample

I have $$d$$ Normal Distributions, $$N_1(\mu_1, \sigma_1^2) \cdots N_d(\mu_d, \sigma_d^2)$$. We pick one of the $$d$$ distributions with each distribution having a probability of $$\frac{1}{d}$$ of being picked and generate a sample, $$s_0$$. What is the probability that it was generated from the distribution $$N_1$$?

I think this is related to the Bayes theorem. I have tried the following. I set a variable, $$X$$, which takes the index of the chosen distribution. Let there be a variable $$s$$ representing a sample from any of the $$d$$ distributions. I know :

1. $$P(X=1) = \cdots = P(X=d) = \frac{1}{d}$$.
2. $$P(s|X=k) \sim N_k(\mu_k, \sigma_k^2)$$ for all $$k \in [1, \cdots, d]$$.
3. $$P (X=1 | s=s_0) = \frac{\frac{1}{d}\cdot P(s=s_0|X=1)}{\sum_{i=1}^d \frac{1}{d} \cdot P(s=s_0 | X=i)} = \frac{P(s=s_0|X=1)}{\sum_{i=1}^d P(s=s_0 | X=i)}$$

However, I don't know the probability of a single sample as area under the PDF evaluated at a single point is 0. How do I proceed?

• "The PDF evaluated at a single point is $0$"? No, it's not; try plugging some value for $s$ into the formula for a Normal distribution and I assure you you won't get $0$ out! – jbowman Apr 14 at 20:53
• Sorry, I meant the area under the curve for a single value is zero. Is it correct to substitute the pdf function $f(s_0|\mu_1, \sigma_1^2)$ for the $P(s=s_0|X=1)$? – moxiy Apr 14 at 21:06
• It's not really "substituting"; one is what you do with continuous (density) functions, the other is what you do with discrete (probability) functions, but it's really the same thing (even though it doesn't look like it.) – jbowman Apr 14 at 21:43
• I see. Thank you! – moxiy Apr 15 at 1:13