Tutorials › Exam SRM - Statistics for Risk Modeling › Conditional Distributions Given Predictors

Exam SRM · Exponential-Family Models · Tutorial 284 of 926

Conditional Distributions Given Predictors

Specify the conditional response model clearly, separating its distributional assumptions from the model for its mean.

Intermediate 12 min read

What You'll Learn

  • Write a response distribution conditional on a predictor profile
  • Distinguish a conditional distribution from a marginal distribution
  • Separate assumptions about the response family from assumptions about the conditional mean
  • Apply the law of total variance to responses with varying conditional means
  • Identify when a mixture of conditional distributions does not retain the same family

Why Condition on Predictors?

A generalized linear model (GLM) describes how a response behaves for observations with specified predictor values. Its starting point is a conditional distribution: for each observation, what distribution is assumed for the response once its predictors are given? This is different from describing the response distribution across a population that mixes many predictor profiles.

For example, a hypothetical risk study might record whether each policy has a claim and include a risk-class indicator among its predictors. A GLM can specify a Bernoulli distribution for the claim indicator conditional on risk class. The probability of a claim may differ across classes. The model’s distributional assumption is that the conditional response is Bernoulli; the mean assumption specifies how the conditional claim probability behaves across predictor values.

Definition: A conditional response distribution specifies the probability distribution of a response \(Y_i\) given the predictor values \(\mathbf{x}_i\), written \(Y_i \mid \mathbf{x}_i\). Its conditional mean is \(\mu_i=E[Y_i\mid\mathbf{x}_i]\), and its conditional variance is \(\operatorname{Var}(Y_i\mid\mathbf{x}_i)\). The distributional assumption describes the conditional response family and its parameter constraints; the mean assumption describes how \(\mu_i\) varies with the predictors.

The predictors can be treated as observed values on which the response model is conditioned. A probability model for the predictors themselves is not needed to specify this conditional distribution. If predictors are random and a population-wide, or marginal, response distribution is required, then their distribution also matters.

Two Distinct Parts of a GLM Specification

A useful way to organize a GLM specification is to ask two separate questions. First, what distribution is assumed for the response at a fixed predictor profile? Second, how does the conditional mean change as the predictor profile changes? The first question concerns the random component; the second concerns the mean structure.

  • Distributional assumption: identify a suitable response family, its support, and any required dispersion or other parameters. This also determines how conditional variation relates to the family’s parameters.
  • Conditional-mean assumption: state the proposed pattern of \(\mu_i=E[Y_i\mid\mathbf{x}_i]\) across predictor values. A mean model must be compatible with the possible values of the response and the selected distribution.

These parts are related but are not interchangeable. A Bernoulli response has conditional mean equal to its conditional success probability and variance equal to that probability times one minus that probability. Those facts come from the Bernoulli distribution. A separate model is still needed to describe how the probability changes with predictors. Likewise, a Poisson response has conditional mean and variance equal to its conditional rate parameter, but the assumption of a Poisson conditional distribution does not by itself say how that parameter changes across profiles.

Many GLMs use a member of the exponential-dispersion family. In a common parameterization, the conditional density or probability mass function has the form below, where \(\theta_i\) is a parameter associated with observation \(i\), \(\phi\) is a dispersion parameter, and the functions \(a\), \(b\), and \(c\) define the family.

$$ f(y_i\mid \mathbf{x}_i;\theta_i,\phi) = \exp\left\{ \frac{y_i\theta_i-b(\theta_i)}{a(\phi)} +c(y_i,\phi) \right\} $$

For a regular member of this family, the conditional mean and variance are \(E[Y_i\mid\mathbf{x}_i]=b'(\theta_i)\) and \(\operatorname{Var}(Y_i\mid\mathbf{x}_i)=a(\phi)b''(\theta_i)\). These formulas describe the distribution’s parameterization. The mean model then specifies how the resulting mean depends on the predictors. The family form does not, on its own, impose a particular pattern across predictor profiles.

Conditional and Marginal Distributions

Suppose predictor profiles differ in the response means. The marginal distribution combines the conditional distributions over those profiles. In general, that mixture does not have the same distributional family as any one of its conditional components. A mixture of Bernoulli distributions is Bernoulli after averaging its success probability, but a mixture of Poisson distributions with different rates is not generally Poisson. Mixtures of normal distributions with different means are not generally normal.

The distinction can be quantified using the law of total expectation and the law of total variance. If \(X\) denotes a predictor profile and the relevant variances exist, then

$$ E[Y]=E\!\left[E[Y\mid X]\right] $$
$$ \operatorname{Var}(Y) = E\!\left[\operatorname{Var}(Y\mid X)\right] + \operatorname{Var}\!\left(E[Y\mid X]\right) $$

The first term in the variance equation is the average within-profile variance. The second is the variance of the conditional means across profiles. Thus, marginal variation can exceed the average conditional variation when the mean differs across profiles.

Justification: Write \(Y-E[Y]=(Y-E[Y\mid X])+(E[Y\mid X]-E[Y])\), then square and take expectations. The cross-product has expectation zero because \(E[Y-E[Y\mid X]\mid X]=0\). The expected square of the first term is \(E[\operatorname{Var}(Y\mid X)]\); the expected square of the second is \(\operatorname{Var}(E[Y\mid X])\). Adding them gives the stated decomposition.

Worked Example: Bernoulli Responses Across Risk Profiles

In a hypothetical portfolio study, 25% of policies have predictor profile A and 75% have profile B. Conditional on profile A, a policy’s claim indicator \(Y\) is Bernoulli with probability 0.08. Conditional on profile B, it is Bernoulli with probability 0.16. Find the marginal mean and variance, and verify the variance decomposition.

Method. Use the conditional Bernoulli means and variances, then average over the two profile probabilities. For a Bernoulli response with success probability \(p\), the mean is \(p\) and the variance is \(p(1-p)\).

Conditional quantities. For profile A, the mean is 0.08 and the variance is \(0.08(0.92)=0.0736\). For profile B, the mean is 0.16 and the variance is \(0.16(0.84)=0.1344\).

Marginal mean. Weight each conditional mean by its profile probability:

$$ E[Y]=0.25(0.08)+0.75(0.16)=0.02+0.12=0.14 $$

Average conditional variance.

$$ E[\operatorname{Var}(Y\mid X)] =0.25(0.0736)+0.75(0.1344) =0.0184+0.1008 =0.1192 $$

Variance of conditional means. The squared deviations from the marginal mean are \((0.08-0.14)^2=0.0036\) and \((0.16-0.14)^2=0.0004\). Therefore,

$$ \operatorname{Var}(E[Y\mid X]) =0.25(0.0036)+0.75(0.0004) =0.0009+0.0003 =0.0012 $$

Check. The decomposition gives \(0.1192+0.0012=0.1204\). A marginal Bernoulli variable with success probability 0.14 has variance \(0.14(0.86)=0.1204\), which agrees. The common mistake is to report 0.1192 as the marginal variance, omitting the variation between profile means. The correction is to add 0.0012.

Worked Example: A Poisson Mixture Is Not Necessarily Poisson

A hypothetical service team records the number of incidents per unit of observation time. Suppose 60% of units have profile A, with \(N\mid A\sim\operatorname{Poisson}(0.4)\), and 40% have profile B, with \(N\mid B\sim\operatorname{Poisson}(1.2)\). Find the marginal mean and variance and compare the marginal probability of zero incidents with that from a Poisson distribution having the marginal mean.

Method. For a Poisson distribution with rate \(\lambda\), the mean and variance are both \(\lambda\), and the probability of zero is \(e^{-\lambda}\).

Marginal mean.

$$ E[N]=0.60(0.4)+0.40(1.2)=0.24+0.48=0.72 $$

Variance decomposition. The average conditional variance is \(0.60(0.4)+0.40(1.2)=0.72\). The conditional means differ from 0.72 by \(-0.32\) and \(0.48\), respectively, so the variance of those means is

$$ 0.60(-0.32)^2+0.40(0.48)^2 =0.60(0.1024)+0.40(0.2304) =0.06144+0.09216 =0.1536 $$

Thus, \(\operatorname{Var}(N)=0.72+0.1536=0.8736\). This is larger than the marginal mean, unlike the variance of a single Poisson distribution.

Zero-count comparison. The mixture’s zero probability is

$$ P(N=0)=0.60e^{-0.4}+0.40e^{-1.2} \approx 0.60(0.6703)+0.40(0.3010) \approx 0.5226 $$

A Poisson distribution with rate 0.72 would instead have zero probability \(e^{-0.72}\approx0.4868\). The values differ, so the mixture is not that Poisson distribution. The mistake to avoid is averaging the rates and then assuming that the marginal count must be Poisson with the averaged rate; averaging gives the marginal mean, not generally the marginal family.

Worked Example: Normal Responses With Profile-Specific Variation

In a hypothetical measurement study, 70% of observations have profile A, with \(Y\mid A\sim N(100,225)\), and 30% have profile B, with \(Y\mid B\sim N(120,400)\). Here the second argument is the variance. Find the marginal mean and variance.

Method. Apply the law of total expectation and total variance. For each conditional normal distribution, use its stated mean and variance; do not treat the second argument as a standard deviation.

Marginal mean.

$$ E[Y]=0.70(100)+0.30(120)=70+36=106 $$

Average conditional variance.

$$ E[\operatorname{Var}(Y\mid X)] =0.70(225)+0.30(400) =157.5+120 =277.5 $$

Variance of conditional means. The deviations from the marginal mean are \(100-106=-6\) and \(120-106=14\):

$$ \operatorname{Var}(E[Y\mid X]) =0.70(-6)^2+0.30(14)^2 =0.70(36)+0.30(196) =25.2+58.8 =84 $$

Therefore, the marginal variance is \(277.5+84=361.5\). The check is important: using only the average conditional variance would understate the marginal variance by 84. Further, although each profile has a normal conditional response, the combined distribution is generally a mixture of normals, not a single normal distribution.

What the Specification Does—and Does Not—Assume

A conditional GLM specification is a claim about responses among observations with given predictor values. It does not automatically assert that every response has an identical distribution: parameters such as the conditional mean may vary with those values. Nor does it automatically assert that the marginal response distribution belongs to the same family as the conditional response distributions.

When observations are modeled as conditionally independent given their predictor values, the joint conditional distribution factors into the product of their individual conditional distributions. This is a separate assumption from choosing a family for each response. Dependence that remains after conditioning would require an appropriate model for that dependence; merely specifying each observation’s marginal conditional distribution does not establish conditional independence.

These distinctions matter in GLM setup. A candidate should identify the response and its support, state the conditional family and any dispersion assumption, and describe the conditional mean as a function of predictors. Each statement should be interpreted conditionally. In particular, an estimated or specified conditional mean concerns the response scale; it is not itself a probability distribution for the predictors or a statement about the marginal response.

Key takeaway: A GLM has a conditional response distribution given predictors. The response family supplies distributional properties such as support and variance behavior; a separate mean assumption describes how the conditional mean changes with predictors. Do not confuse either conditional statement with the marginal distribution across predictor profiles.

Check Your Understanding

For each question, distinguish conditional quantities from marginal ones and check your arithmetic.

  1. A binary response has conditional success probabilities 0.20 and 0.50 for two profiles with probabilities 0.40 and 0.60. Find its marginal mean and verify the marginal variance using the variance decomposition. (Answer: mean \(0.38\); average conditional variance \(0.214\); variance of conditional means \(0.0216\); marginal variance \(0.2356\).)
  2. A count is conditionally Poisson with rate 0.2 for 75% of observations and rate 1.0 for 25%. Find the marginal mean and variance. (Answer: mean \(0.4\); variance \(0.52\).)
  3. For two equally likely profiles, \(Y\mid A\sim N(8,4)\) and \(Y\mid B\sim N(12,9)\), where the second argument is variance. Find the marginal mean and variance. (Answer: mean \(10\); variance \(10.5\).)
  4. A study assumes that a response is Bernoulli conditional on its predictors, with a conditional success probability that varies by predictor profile. Does this assumption alone imply a common success probability for all observations, or a Bernoulli marginal response with the same probability for every profile? (Answer: No; the conditional probabilities may differ, and the marginal success probability is their weighted average over profiles.)
  5. Suppose \(Y_1\) and \(Y_2\) each have specified Poisson distributions conditional on their predictor values. Does that alone establish that they are conditionally independent? (Answer: No; individual conditional distributions do not specify the joint dependence structure.)
Clinical Biostats