Course contentsShow
← Data Science
Lesson 671 of 2,14518. Generalized Linear ModelsFree lesson

What is a Link Function?

Understand how link functions connect linear predictors to non-normal response distributions in GLMs.

What is a Link Function?

You'll learn: How link functions bridge the gap between linear predictors and non-normal response variables in Generalized Linear Models.


In ordinary linear regression, we assume our response variable follows a normal distribution and model it directly as a linear combination of predictors. But what happens when your response is binary (0/1), a count, or strictly positive? Those outcomes don't follow normal distributions, yet we still want to use the power of linear modeling.

This is where link functions come in.

The Core Idea

A link function transforms the expected value of your response variable so it can be modeled with a linear predictor. Think of it as a mathematical translator:

  • On one side, you have your linear combination of predictors: β₀ + β₁X₁ + β₂X₂ + ... (which can range from -∞ to +∞)
  • On the other side, you have the mean of your response variable, which might be constrained (e.g., probabilities must be between 0 and 1)
  • The link function connects these two worlds

An Analogy

Imagine you're translating between two languages with different grammars. The link function is your grammar converter—it takes a sentence structure that works in one language (linear predictors with no constraints) and reshapes it to work properly in another (constrained response means).

Why This Matters

Without link functions, we couldn't properly model:

  • Binary outcomes (logistic regression uses a logit link)
  • Count data (Poisson regression uses a log link)
  • Positive continuous data (gamma regression uses various links)

The link function ensures predictions stay in valid ranges while preserving the interpretability of linear modeling.

Key Takeaway: A link function transforms the mean of a response variable to connect it with an unconstrained linear predictor, enabling linear modeling techniques for non-normal distributions in GLMs.