Originally Posted by

**pedrosorio** I have a discrete variable, let's call it X, and a continuous variable called Z.

I know the posterior f(Z|X=xi) has Gaussian Distribution with expected value ui and variance sigma2i (and I know these for all possible xi).

Also I know that, according to the Bayes' theorem:

f(Z|X=xi) = c * f(Z) * L(X=xi|Z), where the constant is there to normalize.

The problem is, I have access to Z and want to find the xi that maximizes the likelihood L(X=xi|Z).

L(X=xi|Z) = f(Z|X=xi) / (c * f(Z))

but that constant could be different for every xi... How should I go about it?