Suppose you have some data, represented by the vector $\bf{y}$, and you have a model that maps parameters in vector $\bf{x}$ to $\bf{y}$:
$$f(\bf{x}) = \bf{y}$$
Suppose that $f$ is actually a Poisson process. So given $\bf{x}$, you can imagine sampling a poisson distribution to compute $\bf{y}$. This is a stochastic process, such that evaluating $f(\bf{x})$ two times with the same $\bf{x}$ can yield a different $\bf{y}$, because you are sampling a Poisson distribution.
Now suppose given data $\bf{y}$, you want to do a Bayesian inversion for the $\bf{x}$ parameters. To do this with a method like MCMC you must evaluate the the likelihood function, $p(\bf{y} | \bf{x})$, which involves computing $f(\bf{x})$, so therefore the likelihood function is a Poisson process.
How do you do this inference problem? Is it OK to just code this up using a MCMC algorithm like emcee such that $p(\bf{y} | \bf{x})$ samples poisson distributions, and therefore has some randomness? Or is there a better way to do the problem?
Edit: I’m most uncomfortable with a likelihood function that is not deterministic / contains randomness. Is this ok?
Edit 2: I’ve realized this question is not very well explained, so I have posted a new question: Bayesian inversion with a stochastic likelihood function