# Given $n$ different univariate non-normal sample sets calculate for a new sample, $x$, which it most likely belongs to [duplicate]

Say you have $n$ different, non-normal, potentially overlapping data sets of samples. Maybe their densities look something like:

and you are given a new sample $x$, how would you decide to which of these sample sets it would most likely belong?

I would assume it is possible to do a (kernel) density estimation of each of the sample sets, interpolate them to functions $p_n$, and then calculate $p_n(x)$ for each, selecting the one with the highest probability.

However both the decision rule and the method seem, well, off. Can anybody help me in getting a better intuition of this problem?

EDIT Say the data comes from a continuous scoring system, like a depression scale, and I have annotated data for many different subjects. So I can get the density plots for "severe", "mildly" and "non-depressed" subjects. Now I have a new sample and wish to know (based on the score) which the person most likely belongs to.

-

## marked as duplicate by Glen_b♦, Momo, gung, Nick Cox, Peter Flom♦Feb 19 '14 at 10:48

I think you should use Bayesian Inference. So you have Distributions $A, B, C$ and sample $x$. What you are asking is what is the probability that $x$ is $A$ distributed given $x$, which by Bayes theorem is $Pr(x\sim A|x)=\frac{Pr(x|x\sim A)\cdot Pr(x\sim A)}{Pr(x)}$. You would determine $Pr(x|x\sim A)$ with your pdf for $A$. The $Pr(x\sim A)$ would come from how much of your overall population are $A$ distributed or for your example in the edit how likely anyone in the overall population is "severe" or "non-depressed". Then the only thing to calculate is $Pr(x)$ which we would get from the law of total probability $Pr(x)=Pr(x|x\sim A)\cdot Pr(x\sim A)+Pr(x|x\sim B)\cdot Pr(x\sim B)+Pr(x|x\sim C)\cdot Pr(x\sim C)$. http://en.wikipedia.org/wiki/Bayesian_inference