Tutorials › Exam SRM - Statistics for Risk Modeling › The Log Link For Poisson Means

Exam SRM · Poisson and Gamma Models · Tutorial 324 of 926

The Log Link For Poisson Means

Translate a Poisson model’s linear predictor into its conditional mean, and understand what positivity does—and does not—guarantee.

Advanced 10 min read

What You'll Learn

  • State the conditional Poisson model and its assumptions.
  • Use the log link and its inverse to calculate fitted count means.
  • Distinguish a linear predictor from a response-scale mean.
  • Calculate count probabilities from a fitted mean.
  • Identify errors involving negative or zero fitted means.

Why the Log Link Matters

A Poisson model describes counts, such as the number of covered events recorded during a fixed period. Its conditional mean must be positive: a negative expected count is impossible, and a mean of zero would imply that the count is always zero. A linear expression in predictors, however, can take any real value. The log link resolves this mismatch by modeling the logarithm of the mean as a linear predictor and converting that predictor back to the count scale with the exponential function.

The calculation has two distinct steps. First, combine the predictors and coefficients to find the linear predictor. Then exponentiate it to obtain the fitted conditional mean. Confusing these two scales is a frequent source of errors.

Definition: In a Poisson regression model with the log link, the response \(Y_i\), conditional on its predictor vector \(\mathbf{x}_i\), has a Poisson distribution with mean \(\mu_i\), and \(\log(\mu_i)=\eta_i=\mathbf{x}_i^\mathsf{T}\boldsymbol{\beta}\). Here, \(\eta_i\) is the linear predictor, \(\mu_i=E[Y_i\mid\mathbf{x}_i]\) is the conditional mean, and the inverse link gives \(\mu_i=\exp(\eta_i)\).

The Model and Its Assumptions

For a single observation, the conditional Poisson model specifies \(Y_i\mid\mathbf{x}_i\sim\operatorname{Poisson}(\mu_i)\), where \(\mu_i>0\). Its probability mass function is \(P(Y_i=y\mid\mathbf{x}_i)=\exp(-\mu_i)\mu_i^y/y!\) for \(y=0,1,2,\ldots\). In particular, \(E[Y_i\mid\mathbf{x}_i]=\mu_i\) and \(\operatorname{Var}(Y_i\mid\mathbf{x}_i)=\mu_i\).

In the standard regression formulation, each \(\eta_i\) is a linear combination of the included predictors and coefficients, often including an intercept. Conditional on the predictor values, observations are assumed to follow the stated Poisson distributions; when the likelihood is formed from multiple observations, they are typically assumed conditionally independent. These assumptions include the Poisson mean-variance relationship. The log link ensures a positive modeled mean, but it does not by itself establish that the Poisson distribution or the chosen predictor structure is appropriate for the data.

$$ \eta_i=\beta_0+\beta_1x_{i1}+\cdots+\beta_px_{ip}, \qquad \mu_i=\exp(\eta_i). $$

The coefficients and predictors are combined on the link scale, where \(\eta_i\) may be any real number. The fitted mean is on the response scale, where \(\mu_i\) must be positive. Do not report \(\eta_i\) as if it were the expected count.

Why Exponentiating Produces a Valid Mean

The log link is the function \(g(\mu)=\log(\mu)\), whose domain is the set of positive real numbers. Its inverse is \(g^{-1}(\eta)=\exp(\eta)\). The key property is that the exponential of every finite real number is strictly positive.

1
Start with a real-valued predictor.
The linear combination \(\eta_i=\mathbf{x}_i^\mathsf{T}\boldsymbol{\beta}\) can be negative, zero, or positive.
2
Apply the inverse link.
Set \(\mu_i=\exp(\eta_i)\). Since \(\exp(t)>0\) for every real \(t\), the resulting mean satisfies \(\mu_i>0\).
3
Check that the link is reversed.
Taking the logarithm gives \(\log(\mu_i)=\log(\exp(\eta_i))=\eta_i\), so the response-scale mean corresponds to the original linear predictor.

This is the essential justification for the construction: the inverse link maps every possible finite linear predictor to a valid positive Poisson mean. No finite predictor produces a mean of exactly zero, although \(\exp(\eta_i)\) approaches zero as \(\eta_i\) decreases without bound. Likewise, a very large positive predictor can produce an extremely large mean. Positivity is guaranteed; a reasonable scale is not.

Worked Example: Convert Two Linear Predictors to Fitted Means

In a hypothetical fixed-period study of covered equipment incidents, suppose the conditional count is modeled as Poisson with log link \(\log(\mu)=-0.8+0.25x\), where \(x\) is a risk score. Find the fitted means for scores \(x=2\) and \(x=5\). For \(x=2\), also find the probabilities of zero and one incident.

Method. Evaluate the linear predictor at each score, exponentiate to obtain the mean, and then use the Poisson probability formula for the requested count probabilities.

At \(x=2\). The linear predictor is \(\eta=-0.8+0.25(2)=-0.8+0.5=-0.3\). Therefore, \(\mu=\exp(-0.3)=0.740818\ldots\), or \(0.7408\) to four decimal places. This is the expected incident count for an observation with this score, not the probability of an incident.

The probability of zero incidents is \(P(Y=0\mid x=2)=\exp(-0.740818\ldots)(0.740818\ldots)^0/0! =\exp(-0.740818\ldots)\approx0.4767\). The probability of one incident is \(P(Y=1\mid x=2)=\exp(-0.740818\ldots)(0.740818\ldots)^1/1!\approx0.3532\). Both probabilities are rounded to four decimal places. Their sum is approximately \(0.8299\), leaving approximately \(0.1701\) for two or more incidents.

At \(x=5\). The predictor is \(\eta=-0.8+0.25(5)=-0.8+1.25=0.45\). Thus \(\mu=\exp(0.45)=1.568312\ldots\), or \(1.5683\) to four decimal places.

Check. Both fitted means are positive, as required. The mean need not be an integer: it is an expectation across the conditional count distribution.

Common mistake avoided. Treating \(-0.3\) as the fitted mean would give an impossible negative expected count. It is the link-scale predictor; exponentiating it gives the valid response-scale mean \(0.7408\).

From a More Complex Predictor to the Mean

With multiple predictors, the procedure does not change: calculate every term in the linear predictor, add them, and exponentiate the total. A binary predictor is entered at its recorded value, commonly zero or one. It is important to calculate the whole sum before applying the exponential function; exponentiating individual terms and adding the results does not implement the specified model.

Worked Example: Combine a Continuous and a Binary Predictor

Suppose a hypothetical model for a count of covered service events during a fixed period is \(\log(\mu)=-1.1+0.4x+0.7g\), where \(x\) is a recorded score and \(g=1\) indicates that a specified feature is present. For an observation with \(x=1.5\) and \(g=1\), calculate the fitted mean and the probabilities of zero and one event.

Step 1: Evaluate the linear predictor. \(\eta=-1.1+0.4(1.5)+0.7(1)=-1.1+0.6+0.7=0.2\).

Step 2: Convert to the conditional mean. \(\mu=\exp(0.2)=1.221402\ldots\), or \(1.2214\) to four decimal places. The model therefore specifies a Poisson count distribution with this conditional mean.

Step 3: Calculate the zero-event probability. \(P(Y=0\mid x=1.5,g=1)=\exp(-\mu)\mu^0/0!=\exp(-1.221402\ldots)\approx0.2948\).

Step 4: Calculate the one-event probability. \(P(Y=1\mid x=1.5,g=1)=\exp(-\mu)\mu^1/1! =\exp(-1.221402\ldots)(1.221402\ldots)\approx0.3601\). The probabilities are rounded to four decimal places. They sum to approximately \(0.6549\), leaving approximately \(0.3451\) for counts of two or more.

Check. The mean is positive, and the probability assigned to zero and one event is less than one. The remaining probability corresponds to possible counts above one.

Common mistake avoided. The value \(0.2\) is not the fitted mean. It is the linear predictor; the fitted mean is \(\exp(0.2)=1.2214\).

What a Fitted Mean Does and Does Not Tell You

A fitted mean is the center of a conditional count distribution, not a promise about an individual outcome. A count is a nonnegative integer, while its mean can be any positive real number. For example, a fitted mean of \(0.7408\) is consistent with a distribution assigning probability to zero, one, and larger counts. It does not mean that an individual experiences \(0.7408\) of an event.

Once the mean is available, probabilities for particular counts can be calculated with the Poisson mass function. The probability of at least one event follows by taking the complement of zero: \[ P(Y\geq1\mid\mathbf{x})=1-P(Y=0\mid\mathbf{x})=1-\exp(-\mu). \] This result relies on the conditional Poisson distribution. The log link supplies \(\mu\); it does not itself supply the count probabilities.

Worked Example: Convert a Fitted Mean to an Event Probability

For a hypothetical fixed-period count model, suppose \(\log(\mu)=-0.6+0.3z-0.2w\), with recorded values \(z=2\) and \(w=1\). Find the fitted mean and the probability of at least one event.

Step 1: Calculate the predictor. \(\eta=-0.6+0.3(2)-0.2(1)=-0.6+0.6-0.2=-0.2\).

Step 2: Exponentiate. \(\mu=\exp(-0.2)=0.818730\ldots\), or \(0.8187\) to four decimal places.

Step 3: Use the complement of zero. \(P(Y\geq1\mid z=2,w=1)=1-\exp(-\mu) =1-\exp(-0.818730\ldots)\approx1-0.4410=0.5590\). The probability is rounded to four decimal places.

Check. The complementary probability of zero events is approximately \(0.4410\); \(0.5590+0.4410=1.0000\). The result is between zero and one.

Common mistake avoided. The mean \(0.8187\) is not the probability of at least one event. That probability is obtained from the Poisson distribution, here as \(1-\exp(-\mu)\).

Common Errors and Exam Traps

  • Stopping at the linear predictor. If \(\eta=-0.2\), the fitted mean is not \(-0.2\). It is \(\exp(-0.2)\approx0.8187\).
  • Exponentiating the wrong quantity. First add the intercept and all predictor contributions. For example, \(\exp(a+b)\) is the model’s inverse-link calculation; \(\exp(a)+\exp(b)\) is not equivalent.
  • Calling the mean a probability. A Poisson mean can exceed one, while a probability cannot. Use the Poisson mass function or an appropriate event-probability calculation when a probability is requested.
  • Assuming positivity verifies the entire model. The log link ensures a positive fitted mean, but it does not prove that the predictors are adequate or that the conditional Poisson assumptions are suitable.
  • Setting the mean to zero for an observed zero count. An observed count of zero is a possible realization when \(\mu>0\); it does not imply that the model’s conditional mean is zero.
Key takeaway: In a Poisson model with the log link, calculate \(\eta=\mathbf{x}^\mathsf{T}\boldsymbol{\beta}\) first and then set \(\mu=\exp(\eta)\). The predictor is unrestricted on the real line; its exponent is the positive conditional count mean.

Check Your Understanding

For each problem, calculate the requested response-scale quantity from the stated linear predictor.

  1. A hypothetical count model has \(\log(\mu)=-0.5+0.2x\). Find the fitted mean when \(x=4\), to four decimal places. (Answer: \(\eta=0.3\), \(\mu=1.3499\).)
  2. A model has \(\log(\mu)=-1+0.3x+0.5g\), where \(g\) is zero or one. Find the fitted mean at \(x=2,\ g=1\), to four decimal places. (Answer: \(\eta=0.1\), \(\mu=1.1052\).)
  3. A conditional Poisson model has linear predictor \(\eta=-0.2+0.1x\). At \(x=3\), find the fitted mean and state whether it is a valid Poisson mean. (Answer: \(\eta=0.1\), \(\mu=1.1052\), positive and valid as a mean.)
  4. A model has \(\log(\mu)=0.4-0.25x\). At \(x=4\), find the fitted mean and the probability of zero events, each to four decimal places. (Answer: \(\eta=-0.6\), \(\mu=0.5488\), \(P(Y=0)=\exp(-0.5488\ldots)\approx0.5776\).)
  5. A candidate sets the fitted mean equal to \(-2\) when the model gives \(\log(\mu)=-2\). Correct the calculation and give the mean to four decimal places. (Answer: \(\mu=\exp(-2)=0.1353\), not \(-2\).)
Clinical Biostats