Skip to main content
ExplainerStatistical ModelingEvidence Pack· 5 min read· in Data & Analysis

How the Link Function Connects the Linear Predictor to the Expected Outcome in Generalized Linear Models

By mathematically translating bounded real-world outcomes into unbounded linear equations, link functions allow a single framework to model probabilities, counts, and continuous data.

By Nicolas Laurent

Statistical Purists 40%Applied Data Scientists 40%Software Developers 20%
Statistical Purists
Prioritize the theoretical elegance of canonical link functions that perfectly match the underlying data distribution.
Applied Data Scientists
Focus on the practical application of GLMs, emphasizing the need to translate transformed coefficients back into interpretable marginal effects.
Software Developers
View link functions as a necessary computational layer that must be standardized and optimized within statistical packages.

Perspectives this story doesn't cover

  • Bayesian Statisticians
  • Causal Inference Researchers

A predictive model that outputs a 115% probability of default, or forecasts negative three patients arriving at an emergency room, has failed a basic test of physical reality. The basis of this failure lies in a structural mismatch: standard linear algebra extends infinitely in both directions, while real-world outcomes are strictly bounded. A probability must sit exactly between 0 and 1. A physical count cannot drop below 0. When analysts try to force these bounded realities directly into a standard linear regression, the straight line inevitably crosses those boundaries, generating mathematical nonsense.[3][4]

The solution to this mismatch was formalized in 1972 by statisticians John Nelder and Robert Wedderburn, who introduced the Generalized Linear Model (GLM). Their framework recognized that while the real world is non-linear and bounded, the mathematics of linear combinations—adding weighted variables together—are too powerful and efficient to abandon. To bridge the gap, they separated the model into three distinct components: a random component describing the data's distribution, a systematic component (the linear predictor), and a mathematical translator connecting the two.[1][7]

Every Generalized Linear Model is built on three foundational pillars.

That translator is the link function. As the statistical software provider Minitab defines it, "The link function provides the relationship between the linear predictor and the mean of the distribution function." It acts as a mathematical funnel. On one side, it takes the bounded, real-world expected outcome (the mean, or mu). On the other side, it transforms that bounded value into an unbounded scale that stretches from negative infinity to positive infinity, matching the natural domain of a linear equation.[5]

The linear predictor itself is simply the sum of the model's coefficients multiplied by their respective variables. Because these variables and weights can theoretically take any value, the resulting sum is entirely unconstrained. The 2023 Bookdown text on GLMs notes that "The link function g() connects the linear predictor to the expected value of the response." By applying the link function to the expected outcome, the model ensures that the linear predictor is always mapping to a valid, mathematically sound space.[3]

The most famous application of this mechanism is logistic regression, which relies on the logit link function. When predicting a binary outcome—like whether an email is spam or not—the expected value is a probability between 0 and 1. The logit link transforms this probability into log-odds. A 50% probability becomes a log-odds of 0. A 99% probability approaches positive infinity, and a 1% probability approaches negative infinity. The linear predictor calculates the log-odds, and the inverse of the link function translates that unbounded number safely back into a valid percentage.[2][6]

The logit link function maps probabilities bounded between 0 and 1 onto an infinite scale.
The most famous application of this mechanism is logistic regression, which relies on the logit link function.

For count data, such as the number of traffic accidents at an intersection, the boundary changes: the outcome must be 0 or greater, but has no upper limit. Here, analysts deploy the log link function. As detailed in a 2021 analysis by Scientifically Sound, the log link takes the strictly positive expected count and takes its natural logarithm. This maps the bounded count space onto the entire real number line. The linear predictor operates in this log space, and the model exponentiates the result to return a valid, non-negative count.[4]

Even standard linear regression is technically a GLM, operating under what is known as the identity link function. In this special case, the expected outcome is already assumed to be continuous and unbounded, meaning no transformation is necessary. The link function simply states that the expected value equals the linear predictor directly. This elegance is why the 1972 Nelder and Wedderburn paper remains foundational: it proved that linear regression, logistic regression, and Poisson regression were not separate algorithms, but variations of a single mathematical architecture.[1][7]

The choice of link function is not merely a mathematical formality; it dictates the fundamental geometry of the model's predictions. A canonical link function—the default link mathematically paired with a specific probability distribution, like the logit link for binomial data—ensures that the model's underlying mathematics remain highly stable and computationally efficient. When software like DataCamp's GLM tutorials teach the framework, they emphasize that matching the correct link to the data's distribution is the primary decision an analyst makes.[6]

The log link function allows strictly positive count data to be modeled using unbounded linear equations.

However, this mathematical elegance comes at a cost to human interpretability. Because the linear predictor operates in a transformed space, the model's coefficients no longer represent direct, additive changes to the real-world outcome. In a logistic regression, a coefficient of 1.5 does not mean the probability increases by 1.5; it means the log-odds increase by 1.5. To understand the actual impact on probability, the analyst must push the result back through the inverse link function, a process that yields different marginal effects depending on where the baseline probability started.[2][3]

The ongoing challenge for applied statisticians is balancing the theoretical purity of canonical link functions with the practical need to explain models to decision-makers. While the mathematics of the link function perfectly solve the boundary problem, they force analysts to rely on secondary calculations, like marginal effects or risk ratios, to translate the model's internal logic back into plain language. The equation is solved, but the translation from log-odds back to human intuition remains a manual step.[4][8]

Unsettled ground

  • How non-canonical link functions behave under extreme data sparsity, as their mathematical properties are less stable than standard defaults.
  • The exact threshold at which the loss of interpretability caused by complex link functions outweighs the predictive accuracy gained by using them.
1972
Year Nelder and Wedderburn published the GLM framework
0 to 1
Strict boundary of the logit link probability space
3
Core components of a Generalized Linear Model
0
Lower bound of the log link for count data

Sources

Source coverage

8 outlets

3 viewpoints surfaced

Statistical Purists 40%Applied Data Scientists 40%Software Developers 20%
  1. [1]P. McCullaghStatistical Purists

    Nelder and Wedderburn (1972) Generalized Linear Models

    Read on P. McCullagh
  2. [2]DTUSoftware Developers

    The Generalized Linear Model. The link function.

    Read on DTU
  3. [3]BookdownApplied Data Scientists

    Chapter 12 Generalized Linear Models

    Read on Bookdown
  4. [4]Scientifically SoundApplied Data Scientists

    Generalised linear models, part 1: Link functions

    Read on Scientifically Sound
  5. [5]MinitabSoftware Developers

    What is a link function?

    Read on Minitab
  6. [6]DataCampApplied Data Scientists

    Generalized Linear Models (GLM): What You Should Know

    Read on DataCamp
  7. [7]Jeff GillStatistical Purists

    Introduction to Generalized Linear Models

    Read on Jeff Gill
  8. [8]Factlen Editorial Team

    Synthesis by Factlen editorial team

    Read on Factlen Editorial Team

Comments

Stay informed

Every angle. Every day.

Get Data & Analysis stories with full source coverage and perspective breakdowns delivered to your inbox.