Why Transform a Linear Predictor?
A linear predictor can take any real value, but a Poisson response model requires a positive conditional mean. These ranges do not match: a predictor can be negative, while a Poisson mean cannot. The log link resolves this mismatch by transforming the mean to the real line before relating it to predictors. Equivalently, its inverse transforms any finite linear predictor into a positive mean.
Write the observed covariates for observation \(i\) as \(x_i\), and let \(\beta\) be a vector of finite real coefficients. The linear predictor is \(\eta_i=x_i^\mathsf{T}\beta\). The log-link specification sets \(\log(\mu_i)=\eta_i\), where \(\mu_i\) is the conditional mean of the count response \(Y_i\) given \(x_i\). This tutorial focuses on that mapping and its role in making the Poisson model mathematically admissible.
The Log Link Maps Between the Right Spaces
The real line is the natural range of a linear predictor. The logarithm maps positive numbers to the real line, and the exponential function reverses that transformation. The important feature here is not merely that exponentiation produces positive values: it produces every positive value, and it does so uniquely.
Proof. For every real \(\eta_i\), the exponential function satisfies \(\exp(\eta_i)>0\), and its value is finite when \(\eta_i\) is finite. The identities \(\log(\exp(\eta_i))=\eta_i\) and \(\exp(\log(\mu_i))=\mu_i\) for \(\mu_i>0\) show that the two functions undo one another on these domains. Hence every real predictor gives one positive mean, every positive mean comes from a real predictor, and the correspondence is unique. \(\square\)
This range match is the central reason for using the log link with Poisson responses. In the conditional Poisson model, \(Y_i\mid x_i\) has a Poisson distribution with parameter \(\mu_i\), which is also its conditional mean. A positive value of \(\mu_i\) is therefore a valid parameter for that distribution. It need not be an integer: the observed response is a nonnegative integer count, while its mean can be any positive real number.
Worked Example: A Negative Predictor Gives a Positive Mean
Suppose a particular covariate profile gives \(\eta_i=-1.4\). Under the log link,
Although the predictor is negative, the conditional mean is positive. Under the conditional Poisson model, the probability of zero is
The mean being less than one is not a problem; it indicates a count distribution with substantial probability near zero. The value \(0.2466\) is a mean, not a possible observed count.
Why the Resulting Poisson Model Is Valid
A positive formula for the mean is useful only if the corresponding conditional probabilities define a distribution. For a Poisson variable with parameter \(\mu_i>0\), the probability mass at a nonnegative integer \(y\) is \(\exp(-\mu_i)\mu_i^y/y!\). Substituting the log-link mean preserves positivity and gives a valid probability law at each finite predictor.
Proof. The preceding theorem gives \(0<\mu_i<\infty\), so every displayed mass is nonnegative. Summing over the nonnegative integers and using the power series for the exponential function gives
Thus the masses are nonnegative and sum to one, as required for a probability distribution. \(\square\)
Worked Example: Evaluating a Two-Covariate Predictor
Consider the specified predictor \(\eta_i=-0.8+0.3x_{i1}+0.5x_{i2}\). At \(x_{i1}=2\) and \(x_{i2}=1\),
Applying the inverse link gives
The Poisson parameter for this covariate profile is therefore positive and finite. At \(x_{i1}=0\) and \(x_{i2}=0\), the same model instead gives \(\eta_i=-0.8\), and hence \(\mu_i=\exp(-0.8)\approx 0.4493\). Both results are valid conditional means, even though one predictor is positive and the other negative.
Why Not Use the Identity Link?
With an identity link, the proposed mean would equal the linear predictor: \(\mu_i=\eta_i\). That can be valid for some covariate profiles, but an unrestricted linear predictor may be negative. In that case it cannot parameterize a Poisson distribution. A log-linked predictor, by contrast, may range over the whole real line without producing a nonpositive mean.
Worked Example: A Profile That Rules Out the Identity Link
Suppose a model's predictor at a particular profile is \(\eta_i=-0.2\). An identity-link specification would assign \(\mu_i=-0.2\). This cannot be a Poisson mean: inserting it into the proposed mass at zero would give
which is not a probability. With the log link and the same predictor, the mean is instead
This value is a valid Poisson parameter. The example does not imply that an identity link is always invalid; rather, it shows why it cannot guarantee an admissible mean for every real-valued predictor.
Finite Predictors, Zero Means, and Exposure
For every finite \(\eta_i\), the log-link mean is strictly positive, not merely nonnegative. If \(\eta_i\) becomes very negative, then \(\exp(\eta_i)\) approaches zero, but it does not equal zero at any finite predictor. Some conventions extend the Poisson family to parameter zero, in which case the response is degenerate at zero. That boundary case is not attained by a finite log-linked predictor; representing it exactly would require a limiting value \(\eta_i\to-\infty\).
This distinction matters when data include many zeros. A zero observed count is entirely compatible with a positive mean: it is an outcome of the conditional distribution, not a statement that its mean is zero. Conversely, a covariate profile believed to have exactly zero expected count cannot be represented by a finite ordinary log-link predictor. These are different claims and should not be conflated.
Worked Example: Including Positive Exposure
Suppose a count is observed over \(t_i>0\) hours, and the model assigns a positive expected rate \(\exp(\alpha+\beta x_i)\) per hour. The expected count over the full observation period is the rate multiplied by the exposure:
Thus exposure can be included as the known additive term \(\log(t_i)\) in the predictor. For \(t_i=4\), \(\alpha=-1\), \(\beta=0.4\), and \(x_i=2\), the rate predictor is
so the rate is \(\exp(-0.2)\approx 0.8187\) per hour. The four-hour expected count is
Equivalently, the full count predictor is \(\log(4)-0.2\approx 1.1863\), and exponentiating gives \(\exp(1.1863)\approx 3.2749\). Positivity follows from both the positive exposure and the exponential transformation.
Common Mistakes and Practical Checks
- Confusing the predictor with the mean. The predictor \(\eta_i\) can be negative; the conditional mean is \(\mu_i=\exp(\eta_i)\), which is positive.
- Assuming the mean must be a count. Counts take nonnegative integer values, but their expected value may be fractional, such as \(0.8187\) or \(3.2749\).
- Treating an observed zero as a zero mean. A response of zero is a possible draw under a positive-mean Poisson model. The observation alone does not set its conditional mean to zero.
- Claiming the log link can represent an exact zero mean at finite coefficients. It cannot: \(\exp(\eta_i)>0\) for every finite \(\eta_i\). A zero mean is only a boundary limit as the predictor tends to negative infinity.
- Taking the logarithm of a nonpositive mean. The log link is defined only for \(\mu_i>0\). Its direction is \(g(\mu_i)=\log(\mu_i)=\eta_i\); the inverse direction is \(\mu_i=\exp(\eta_i)\).
Check Your Understanding
Answer each question by using the predictor-to-mean mapping and the conditions stated above.
- If \(\eta_i=0\), what is \(\mu_i\)? If \(\eta_i=-2\), is \(\mu_i\) positive or negative, and why?
- Can a finite log-linked predictor produce an exact conditional mean of zero? Explain the limiting behavior instead.
- Why does an identity link fail to guarantee valid Poisson means for all possible real-valued predictors?
- A count is observed over \(t_i=6\) hours, with rate \(\exp(-0.5)\) per hour. Write its expected count as a log-linked mean and calculate it approximately.
- Explain why observing \(Y_i=0\) does not by itself imply that \(E[Y_i\mid x_i]=0\).