In Bayesian Inference.

Say I have a Poisson distributed R.V. K which denotes the observed number of some event over a specified time period.

The rate of this Poisson distribution is given by the linear model (with parameter vector $w \in \mathbb{R}^{D+1}$) as:

$$f(x;w) = w_0 + w_1x_1 + ... + w_Dx_D$$

The likelihood of the n'th data is given by:

$$p(k_n|x_n,w) = \frac{f(x_n;w)^{k_n} e^{-f(x_n;w)}}{k_n!}$$

For values of $k_n \geq 0$, where values $k_n < 0 = 0$.

How would I go about computing the likelihood of an entire data set given the above setup?

If I assume that $k_n$ is conditional independent given $x_n$ I would be able to compute the likelihood over the entire data set as the product of each individual data-point:

$$p(k|x;w) = \prod_{n=1}^n \frac{f(x_n;w)^{k_n} e^{-f(x_n;w)}}{k_n!}$$

Which could also be expressed as:

$$p(k|x;w) = \frac{f(x_n;w)^{K} e^{-n \cdot f(x_n;w)}}{k_1!k_2!...k_n!}, K = \sum_{i=1}^n k_i$$

But I am uncertain if this likelihood is correct (for the entire dataset) as I fail to incorporate the constraint $k_n < 0 = 0$ in the above.

So can I assume that the above likelihood indeed cover the entire dataset, or should I add the constraint saying this is only true for $k_n \geq 0$? And that any datapoints $k_n < 0$ would just be 0, and thus not change the product of likelihoods?

So what I really struggle with, is if I should somehow define for the constraint $k_n < 0$ what influence that particular data-point has on the likelihood estimation above (as this is a product of likelihoods, if $k_n < 0$ would equal $0$ then the product would also equal to $0$, as we would have some products of likelihood values times $0$).

  • $\begingroup$ What, exactly, is your question? $\endgroup$
    – jbowman
    Commented Jan 14, 2020 at 19:48
  • $\begingroup$ @jbowman if the above likelihood for the entire dataset is correct. What I am given is the likelihood of the nth data, I want the likelihood for the entire dataset. What I am uncertain about is whether or not the above computation is correct, as I feel like I am missing the constraint $k_n < 0 = 0$ in my likelihood expression? $\endgroup$
    – NewDev90
    Commented Jan 14, 2020 at 21:30
  • $\begingroup$ @jbowman I edited the question a bit to make it more clear in the original post above. $\endgroup$
    – NewDev90
    Commented Jan 14, 2020 at 21:39

1 Answer 1


If I understand your question correctly, your constraint is implied when you take the product to get the complete likelihood. You could write it again explicitly if you like, which would be the best approach to avoid ambiguity. (But it is generally implied given we are talking about a Poisson likelihood.) It will be true that for any data point $k_i < 0$, the mass function will be zero too (I think you meant $k_i$ rather than $k_n$ -- the last data point.)

  • $\begingroup$ Thanks, that clarifies it for me. I was not sure if it indeed was the case that it would be implied, and that I could just compute the likelihood over the entire dataset as a product of $k_i \geq 0$. My concern was just how I would go about denoting this, if it would be sufficient to state that in case any points $k_i < 0$, then the mass function itself would also become $0$. $\endgroup$
    – NewDev90
    Commented Jan 15, 2020 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.