# Poisson deviance - and what about zero observed values?

According to Crawley *), the Poisson deviance is computed as

$2 \sum{O \cdot \log ({O \over E})}$

But what if observed value $O$ is zero?

*) Statistical Computing - An Introduction to Data Analysis using S-Plus, Michael J. Crawley, printed by Wiley 2004, page 539.

-
Since $\lim_{x \downarrow 0} x \log x = 0$, it is customary to extend the function $f(x) = x \log x$ to be defined on $[0,\infty)$ and set $f(0) = 0$. Hence, the deviance would be zero. – cardinal Sep 18 '11 at 21:24
@cardinal, thanks! You can post it as an answer, I will accept. – Curious Sep 18 '11 at 22:22
By the way, can you give an exact citation from which you're drawing your question? That looks like a binomial deviance to me and not a Poisson deviance. (The latter has an additional term.) – cardinal Sep 18 '11 at 23:19
@cardinal, it's a book: Statistical Computing - An Introduction to Data Analysis using S-Plus, Michael J. Crawley, printed by Wiley 2004, page 539. I have also seen a different definition elsewhere, which is similar but also includes a term $-(O-E)$. – Curious Sep 19 '11 at 9:32
@cardinal ((& Tomas) The additional term in $\sum(O-E)$ is zero when fitting a standard Poisson log-linear regression model by maximum likelihood if the model includes a constant (intercept) term. Crawley has specified a log-linear model on the previous page. I can't immediately spot anything about including a constant term, but S-Plus (and all other software i know) would include one unless you specifically asked it not to. – onestop Sep 19 '11 at 14:36

$\lim\limits_{x \rightarrow 0} \ x \log x = \lim\limits_{x \rightarrow 0} \frac{ \log x}{1 \over x} = \lim\limits_{x \rightarrow 0} \frac{1 \over x}{-1 \over x^2} = \lim\limits_{x \rightarrow 0} -x = 0$