# Bayesian logistic regression likelihood

If we know that:

How should I calculate the likelihood? I arrived to the next expression:

But something must be wrong because when I do this numerically, if n is big this likelihood will tend to 0... Easily deductible

• There is nothing wrong. For example, the probability of seeing any particular string of coin flips tends to zero as you increase the number of coins filpped. May 24 '17 at 16:06
• In practice, you should compute the logarithm of the likelihood, or loglikelihood. Then the numerical problems that you mention will go away. Then you will find out that when you actually use the likelihood for something, the theoretical formulas mostly use the loglikelihood ... Mar 27 '18 at 13:41

In practice, you would compute the logarithm of the likelihood, or loglikelihood. Then the numerical problems you mention should disappear. If the goal is to compute maximum likelihood estimates, then the loglikelihood is enough. Since $\log$ is a monotone increasing function, the likelihood and the loglikelihood is maximized at the same parameter values.