Tutorials › Generalized Linear Models › Mean Scale And Linear-Predictor Scale

Link Functions and Scale · Tutorial 100 of 981

Mean Scale And Linear-Predictor Scale

Learn to calculate the conditional mean and linear predictor separately, and to recognize why they are different quantities.

Beginner 9 min read

What You'll Learn

  • Define the conditional mean for a response given its covariates
  • Calculate a linear predictor from a design row and coefficient vector
  • Derive conditional means for Bernoulli and Poisson responses
  • Keep response-scale quantities distinct from predictor-scale quantities
  • Identify when a model specification is needed to relate the two scales

Two Quantities With Different Jobs

A generalized linear model involves two calculations that are easy to confuse. One describes the response: its conditional mean, the expected response at given covariate values. The other describes the covariates and coefficients: the linear predictor, formed by multiplying a design row by a coefficient vector. They answer different questions and generally have different interpretations.

For example, a conditional mean might be an expected count of 3.4 events, while a linear predictor might be the numerical value 1.2. The first is expressed on the response scale; the second is the result of a linear calculation involving covariates and coefficients. To relate them, a model must specify how the response mean and linear predictor are connected. That relationship is a separate part of GLM structure, so the calculations here keep the two quantities distinct.

Definition: Let \(Y_i\) be the response for case \(i\), and let \(x_i\) be its covariate vector. The conditional mean is \(\mu_i=E[Y_i\mid x_i]\), when this expectation exists. If the design row is \(x_i^{\mathsf T}\) and the coefficient vector is \(\beta\), the linear predictor is \(\eta_i=x_i^{\mathsf T}\beta\). The conditional mean is a feature of the response distribution at the given covariates; the linear predictor is a linear combination of covariates and coefficients.

The notation \(E[Y_i\mid x_i]\) means that the expectation is taken under the response distribution for a case whose covariates are fixed at \(x_i\). In a model with an intercept and one predictor, for instance, \(x_i^{\mathsf T}=(1,x_i)\) and \(\beta=(\beta_0,\beta_1)^{\mathsf T}\). Then \(\eta_i=\beta_0+\beta_1x_i\). The conditional mean still has to be obtained from the response model; it is not automatically that same sum.

What Each Scale Describes

The mean \(\mu_i\) is on the scale of the response. If \(Y_i\) records a count, its mean is an expected count; if \(Y_i\) is binary, its mean is a probability. The linear predictor \(\eta_i\) is calculated on the predictor scale. It combines entries of \(x_i\) with their corresponding coefficients, including an intercept when the design row has a column for one.

This distinction matters even when both quantities are represented by ordinary numbers. A number’s meaning comes from its definition, not its appearance. A conditional mean of 0.7 for a binary response can be read as a conditional probability of 0.7. A linear predictor of 0.7 is simply the value of \(x_i^{\mathsf T}\beta\); its interpretation depends on the model’s specification.

A GLM provides a model that relates the conditional response distribution to the covariates and coefficients. The linear predictor is one component of that structure, not a replacement for the response distribution or its mean. Consequently, calculating \(\eta_i\) from a design row does not, by itself, calculate \(\mu_i\). To calculate the mean, one also needs the relevant response-model specification.

Two Basic Mean Calculations

Two common response distributions make the meaning of the conditional mean concrete. For a binary response, the mean is its probability of being one. For a Poisson response, the mean is its rate parameter. The short derivations below show these facts directly.

Result: If \(Y\mid x\) has a Bernoulli distribution with \(P(Y=1\mid x)=p\) and \(P(Y=0\mid x)=1-p\), then \(E[Y\mid x]=p\).

Proof. By the definition of expectation for a discrete random variable,

$$ E[Y\mid x] =0\cdot P(Y=0\mid x)+1\cdot P(Y=1\mid x) =0\cdot(1-p)+1\cdot p =p. $$

Thus the conditional mean of a Bernoulli response is a probability. This conclusion comes from its response distribution; it is not a calculation of the linear predictor. \(\square\)

Result: If \(Y\mid x\) has a Poisson distribution with parameter \(\lambda>0\), then \(E[Y\mid x]=\lambda\).

Proof. The Poisson probability mass function is \(P(Y=k\mid x)=e^{-\lambda}\lambda^k/k!\) for integers \(k\geq 0\). Using the expectation formula and the identity \(k/k!=1/(k-1)!\) for \(k\geq1\),

$$ \begin{aligned} E[Y\mid x] &=\sum_{k=0}^{\infty} k e^{-\lambda}\frac{\lambda^k}{k!}\\ &=e^{-\lambda}\sum_{k=1}^{\infty}\frac{\lambda^k}{(k-1)!}\\ &=\lambda e^{-\lambda}\sum_{j=0}^{\infty}\frac{\lambda^j}{j!}\\ &=\lambda e^{-\lambda}e^\lambda\\ &=\lambda. \end{aligned} $$

In the third line, \(j=k-1\). The final equality uses the power-series definition of \(e^\lambda\). Hence the Poisson parameter is the conditional mean. \(\square\)

Worked Calculations on Both Scales

In each example, the response distribution gives the conditional mean, while the design row and coefficient vector give the linear predictor. A model’s full specification is what makes these pieces part of the same model; the arithmetic below keeps their roles separate.

Worked Example: Binary Response and Two Covariates

A study records whether a patient experiences an event, with \(Y_i=1\) for an event and \(Y_i=0\) otherwise. At a particular covariate value, the response model specifies \(P(Y_i=1\mid x_i)=0.30\). The design row is \(x_i^{\mathsf T}=(1,1,2)\), and the coefficient vector is \(\beta=(0.2,0.4,-0.1)^{\mathsf T}\). Find the conditional mean and linear predictor.

Because the response is Bernoulli, its conditional mean is its event probability:

$$ \mu_i=E[Y_i\mid x_i]=0.30. $$

For the linear predictor, multiply corresponding entries of the design row and coefficient vector, then add:

$$ \eta_i=x_i^{\mathsf T}\beta =(1)(0.2)+(1)(0.4)+(2)(-0.1) =0.2+0.4-0.2 =0.4. $$

The conditional mean, \(0.30\), is a probability on the binary response scale. The linear predictor, \(0.4\), is the value of the specified linear combination. Neither number should be substituted for the other.

Worked Example: Poisson Response With an Intercept and One Predictor

Suppose a count response has a Poisson distribution at a given covariate value, with parameter \(\lambda=2.5\). The design row is \(x_i^{\mathsf T}=(1,3)\), and \(\beta=(0.1,0.2)^{\mathsf T}\). Calculate both quantities.

The Poisson mean result gives the conditional mean directly:

$$ \mu_i=E[Y_i\mid x_i]=\lambda=2.5. $$

The linear predictor is calculated from the design row:

$$ \eta_i=x_i^{\mathsf T}\beta =(1)(0.1)+(3)(0.2) =0.1+0.6 =0.7. $$

The mean of 2.5 is an expected count. The predictor value 0.7 is obtained from the coefficients and the covariate value. The fact that one quantity is an expected count does not change the calculation or definition of the other.

Worked Example: Comparing Two Covariate Profiles

For two patients, a binary response is modeled with conditional event probabilities of 0.20 and 0.60, respectively. Their design rows and the shared coefficient vector are \(x_1^{\mathsf T}=(1,0)\), \(x_2^{\mathsf T}=(1,1)\), and \(\beta=(-0.5,0.8)^{\mathsf T}\). Calculate the means and predictors for both patients.

The conditional means are the specified Bernoulli probabilities:

$$ \mu_1=E[Y_1\mid x_1]=0.20, \qquad \mu_2=E[Y_2\mid x_2]=0.60. $$

For patient 1,

$$ \eta_1=x_1^{\mathsf T}\beta =(1)(-0.5)+(0)(0.8) =-0.5. $$

For patient 2,

$$ \eta_2=x_2^{\mathsf T}\beta =(1)(-0.5)+(1)(0.8) =-0.5+0.8 =0.3. $$

Thus the means are 0.20 and 0.60, while the predictors are \(-0.5\) and \(0.3\). Each pair belongs to one patient, but the two entries in a pair have different definitions. The coefficient calculation alone gives the predictor; the response distribution gives the mean.

A Reliable Calculation Routine

When both quantities are requested, write down their definitions before inserting numbers. This makes it harder to mistake a response-scale value for a predictor-scale value, or to use coefficients in a calculation that instead requires the response distribution.

1
Fix the covariate profile.
Identify the case \(i\) and the values represented by its design row \(x_i^{\mathsf T}\).
2
Calculate the linear predictor.
Use the same coefficient ordering as the design columns and compute \(\eta_i=x_i^{\mathsf T}\beta\).
3
Find the conditional mean.
Use the specified conditional response distribution or other supplied mean information to obtain \(\mu_i=E[Y_i\mid x_i]\).
4
Label the answers.
State which number is the response mean and which is the linear predictor; do not infer a conversion that the model specification has not supplied.

Common Mistake: Treating the Predictor as the Mean

A common error is to calculate \(x_i^{\mathsf T}\beta\) and call the answer the conditional mean. The reasoning might be: “The model has a linear predictor, so its value is the model’s predicted response.” That conclusion does not follow from the definition. The calculation has produced \(\eta_i\), not \(E[Y_i\mid x_i]\).

The correction is to ask what information supplies each quantity. The covariate row and coefficients supply \(\eta_i\). The response distribution supplies \(\mu_i\). A GLM specification connects the two, but one cannot replace the connection with an assumption that they are equal. In particular, even if the predictor happens to be positive or lies between zero and one, that numerical coincidence does not make it a conditional mean.

Key takeaway: Keep the two definitions visible: \(\mu_i=E[Y_i\mid x_i]\) describes the response distribution, while \(\eta_i=x_i^{\mathsf T}\beta\) is a linear combination of covariates and coefficients. Calculate each from the information that defines it.

Check Your Understanding

For each question, identify which information is needed and keep the response mean distinct from the linear predictor.

  1. A binary response has conditional event probability 0.45. What is its conditional mean, and why?
  2. For \(x_i^{\mathsf T}=(1,2)\) and \(\beta=(0.3,-0.1)^{\mathsf T}\), calculate \(\eta_i\).
  3. A Poisson response has parameter \(\lambda=4\). What is its conditional mean?
  4. Does knowing \(x_i^{\mathsf T}\beta\) alone always determine \(E[Y_i\mid x_i]\)? Explain what additional model information is needed.
  5. In one sentence, distinguish the role of \(\mu_i\) from the role of \(\eta_i\).
Clinical Biostats