Take the 2-minute tour ×
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

I was just doing some thought on the transformation for likelihoods to log likelihoods for binary response models and I realized what I am sure many people have realized before that the transformation is non-standard.

For instance, given a response pattern $x \in 0,1$ and a parameter set $\theta$ with $P$ defined as the probability $x=1$, the likelihood of a binary response is given as

$$l(\theta;x)=xP+(1-x)(1-P)$$

It is fairly straightforward to break the above separately as $l(\theta;x=1)=P$ and $l(\theta;x=0)=(1-P)$. The next step people take for various reasons is to take the log likelihood

$$ll(\theta;x)=x\log(P)+(1-x)\log(1-P)$$

Which we can easily see is equivalent to taking the log of $l(\theta;x)$ observing that x can only be $1$ or $0$. However, this is a non-standard transformation ($\log(ab + cd) \ne a\log(b) + c\log(d)$ generally) and only achieved through reasoning (which I do not have a problem with). I am just wondering if there is some law, rule, or lemma in which the above transformation falls into?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

The likelihood function is actually:

$l(\theta;x) = P^x(1-P)^{1-x}$

So if $x=0$ it reduces to:

$l(\theta;x=0) = P^0(1-P)^{1-0} = (1-P)$

if $x=1$ it reduces to:

$l(\theta;x=1) = P^1(1-P)^{1-1} = P$

Taking the logarithm of the likelyhood function results in:

$\ln(l(\theta;x)) = \ln(P^x(1-P)^{1-x}) = x \ln(P) + (1-x) \ln(1-P)$

share|improve this answer
    
Yep, that answers it. –  fsmart Jul 30 at 13:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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