# Should you multiply every observation with the prior when calculating the maximum a posterior?

Lets say I have a number of observations and a prior. The observations are poisson distributed, are i.i.d and the prior is exponential with paramater 2. I want to calculate the maximum a posterior estimate of $$\lambda$$. Should I multiply every observation with the prior? Like this

$$argmax_{\lambda}\prod_{n=1}^N p(x_n \lvert \lambda)p(\lambda)=argmax \quad \lambda^{\sum_{n=1}^Nx_n}e^{-\lambda N}e^{-2 \lambda N}$$

Or should I just multiply the likelihood by the prior like this

$$argmax_{\lambda}\prod_{n=1}^N p(x_n \lvert \lambda)p(\lambda)=argmax \quad \lambda^{\sum_{n=1}^Nx_n}e^{-\lambda N}e^{-2 \lambda}$$

Notice the difference in the exponent on the last term

• No, this is a standard probability argument: the prior is the unconditional distribution/density of $\lambda$ and the likelihood is the conditional distribution/density of the sample. The product is thus the joint distribution/density of the sample and the parameter. The prior thus only appears once. Mar 19, 2021 at 17:31
• @Xi'an Thanks! So it is like the second equation? Mar 19, 2021 at 18:52