Tutorials › Generalized Linear Models › Logit Links As Bounded-Mean Transformations

Link Functions and Scale · Tutorial 112 of 981

Logit Links As Bounded-Mean Transformations

Learn how the inverse-logit turns any finite real predictor into a bounded mean, and how to interpret its values and limits.

Beginner 9 min read

What You'll Learn

  • Define the logit link on means strictly between zero and one.
  • Derive the inverse-logit formula by solving for the mean.
  • Prove that finite predictors map strictly inside the unit interval.
  • Interpret the inverse-logit through odds and calculate example values.
  • Describe the limiting behavior as the predictor grows or decreases without bound.
  • Distinguish a bounded-mean transformation from fitting a response model.

From a Real Predictor to a Bounded Mean

A linear predictor can take any real value, but some quantities of interest must lie within a restricted range. A mean representing a proportion, for example, must be between zero and one. The logit link connects these scales: it takes a mean in that open interval to a real number, and its inverse maps a finite real predictor back to a mean strictly inside the interval.

This tutorial focuses on that inverse transformation and its behavior. We will not fit a binary-response model: the calculations concern the link as a mathematical map, without estimating coefficients or specifying a response likelihood.

Definition: For a mean \(\mu\) with \(0<\mu<1\), the logit link is \(\operatorname{logit}(\mu)=\log\!\left(\frac{\mu}{1-\mu}\right)\). Its inverse, the inverse-logit (also called the logistic function), maps a real predictor \(\eta\) to \(\mu=\frac{e^\eta}{1+e^\eta}=\frac{1}{1+e^{-\eta}}\).

The logit is built from the odds \(\mu/(1-\mu)\): it takes their logarithm. The inverse-logit reverses those operations. If \(\eta\) is a linear predictor, applying the inverse-logit gives the corresponding mean on the original, bounded scale. The formula is defined for every finite \(\eta\in\mathbb{R}\), because \(e^\eta>0\) and therefore \(1+e^\eta>0\).

Deriving the Inverse-Logit Formula

The formula follows by solving the defining equation of the logit link for \(\mu\). This algebra also shows why the input to the logit must be strictly between zero and one.

1
Start with the link equation.
Set \(\eta=\log\!\left(\frac{\mu}{1-\mu}\right)\), where \(0<\mu<1\).
2
Exponentiate both sides.
Since the exponential and logarithm are inverse functions, \(e^\eta=\frac{\mu}{1-\mu}\).
3
Isolate the mean.
Multiply by \(1-\mu\), collect the terms containing \(\mu\), and divide by the positive quantity \(1+e^\eta\).
$$ e^\eta(1-\mu)=\mu \quad\Longrightarrow\quad e^\eta=\mu(1+e^\eta) \quad\Longrightarrow\quad \mu=\frac{e^\eta}{1+e^\eta}. $$

Dividing the numerator and denominator by \(e^\eta\) gives the equivalent expression \(\mu=1/(1+e^{-\eta})\). Each form is useful: the first makes positivity and the upper bound easy to see, while the second makes the limit as \(\eta\) grows large especially transparent.

Worked Example: A Zero Predictor

Suppose the predictor is \(\eta=0\). Calculate its inverse-logit mean, then check that applying the logit returns the original predictor.

Inverse transformation. Substitution gives \(\mu=e^0/(1+e^0)=1/(1+1)=1/2\).

Check using the logit. The odds at \(\mu=1/2\) are \((1/2)/(1-1/2)=1\). Thus \(\operatorname{logit}(1/2)=\log(1)=0\), as required.

A predictor of zero therefore corresponds to a mean of one half. This is a property of the transformation, not a statement about data or a fitted model.

Why the Output Is Always Between Zero and One

It is not enough to observe that the inverse-logit formula looks like a fraction. To establish its range, we must show both that its value is positive and that it is less than one for every finite real input.

Theorem: For every finite \(\eta\in\mathbb{R}\), the inverse-logit \(g^{-1}(\eta)=e^\eta/(1+e^\eta)\) satisfies \(0<g^{-1}(\eta)<1\). Moreover, every \(\mu\in(0,1)\) is the inverse-logit of exactly one real number, namely \(\operatorname{logit}(\mu)\).

Proof. For finite \(\eta\), \(e^\eta>0\), so the numerator and denominator of \(e^\eta/(1+e^\eta)\) are positive. Hence \(g^{-1}(\eta)>0\). Also \(1+e^\eta>e^\eta\), so dividing the positive numerator by the larger denominator gives \(g^{-1}(\eta)<1\).

To verify that every \(\mu\in(0,1)\) is attained, note that \(\mu/(1-\mu)>0\), so \(\eta=\log(\mu/(1-\mu))\) is a finite real number. Exponentiating gives \(e^\eta=\mu/(1-\mu)\). Substitution then yields \[ \frac{e^\eta}{1+e^\eta} = \frac{\mu/(1-\mu)}{1+\mu/(1-\mu)} = \frac{\mu/(1-\mu)}{1/(1-\mu)} = \mu, \] where \(1-\mu>0\). Finally, if the inverse-logit of \(\eta\) is \(\mu\), rearranging the defining equation gives \(e^\eta=\mu/(1-\mu)\), and taking logarithms gives \(\eta=\operatorname{logit}(\mu)\). Thus the real number is unique. \(\square\)

The theorem establishes that the inverse-logit is a one-to-one correspondence between the real line and the open interval \((0,1)\). In particular, a finite predictor cannot produce exactly zero or exactly one. The limiting behavior near those endpoints is a related but distinct fact.

Worked Example: A Predictor With Odds of Three to One

Take \(\eta=\log(3)\), a finite predictor. Calculate the mean and verify its odds.

Calculate the mean. Since \(e^{\log(3)}=3\), \(\mu=3/(1+3)=3/4=0.75\).

Check the odds. At \(\mu=3/4\), the odds are \((3/4)/(1-3/4)=(3/4)/(1/4)=3\). Their logarithm is \(\log(3)=\eta\), which confirms the calculation.

Thus a predictor of \(\log(3)\) corresponds to a mean of \(0.75\), whose odds are three to one. The predictor is a log-odds value; it is not itself a probability or a mean.

Odds Interpretation and Concrete Values

The odds identity follows directly from the inverse-logit. If \(\mu=e^\eta/(1+e^\eta)\), then \(1-\mu=1/(1+e^\eta)\), so \(\mu/(1-\mu)=e^\eta\). Taking logarithms recovers \(\eta\). Consequently, exponentiating a predictor gives the odds associated with its inverse-logit mean. This is an algebraic interpretation of the transformation, not a claim that a particular model has been estimated.

Result: If \(\mu=g^{-1}(\eta)\), then \(\frac{\mu}{1-\mu}=e^\eta\). Thus the predictor is the log-odds of the transformed mean, and the odds are positive for every finite predictor.

Worked Example: A Negative Predictor

Let \(\eta=-\log(4)\). Find the mean directly and verify the result through the odds.

Calculate the mean. Since \(e^{-\log(4)}=1/4\), \[ \mu=\frac{1/4}{1+1/4} =\frac{1/4}{5/4} =\frac{1}{5} =0.20. \]

Check the odds. The odds at \(\mu=1/5\) are \((1/5)/(4/5)=1/4\). Their logarithm is \(\log(1/4)=-\log(4)=\eta\).

A negative predictor gives odds below one and hence a mean below one half. The check confirms both the numerical result and the interpretation.

The formula also makes the direction of the transformation precise. If \(\eta_1<\eta_2\), then \(e^{\eta_1}<e^{\eta_2}\). For positive numbers \(a<b\), \(a/(1+a)<b/(1+b)\), because multiplying by the positive denominators reduces that inequality to \(a<b\). Setting \(a=e^{\eta_1}\) and \(b=e^{\eta_2}\) shows that the inverse-logit is strictly increasing. Therefore, larger predictors correspond to larger transformed means. Its shape and local rate of change are separate questions; here the essential point is the ordering and bounded range.

Limiting Behavior for Very Large Predictors

Although every finite predictor gives an interior value, the transformed mean can get arbitrarily close to either endpoint. The limits follow directly from the formula and do not require a model-fitting argument.

Theorem: For the inverse-logit \(g^{-1}(\eta)=1/(1+e^{-\eta})\), \(\lim_{\eta\to+\infty}g^{-1}(\eta)=1\) and \(\lim_{\eta\to-\infty}g^{-1}(\eta)=0\).

Proof for the upper limit. For any \(\eta\), \[ 1-g^{-1}(\eta)=\frac{1}{1+e^\eta}. \] Let \(\varepsilon\) satisfy \(0<\varepsilon<1\). Choose \(M=\log(1/\varepsilon-1)\), which is finite because \(1/\varepsilon-1>0\). For \(\eta>M\), \(e^\eta>1/\varepsilon-1\), and hence \[ 0<1-g^{-1}(\eta)=\frac{1}{1+e^\eta}<\varepsilon. \] This is the definition of convergence to one as \(\eta\to+\infty\).

Proof for the lower limit. Write \(g^{-1}(\eta)=e^\eta/(1+e^\eta)\). Given \(0<\varepsilon<1\), choose \(M=\log(\varepsilon/(1-\varepsilon))\), which is finite. If \(\eta<M\), then \(e^\eta<\varepsilon/(1-\varepsilon)\), so \[ 0<g^{-1}(\eta)=\frac{e^\eta}{1+e^\eta}<\varepsilon. \] The last inequality follows by multiplying by the positive denominator and rearranging to \((1-\varepsilon)e^\eta<\varepsilon\). This proves convergence to zero as \(\eta\to-\infty\). \(\square\)

Worked Example: Predictors of Plus or Minus Four

Compare the inverse-logit means at \(\eta=4\) and \(\eta=-4\). Use \(e^4\approx54.598\).

At \(\eta=4\), \(\mu=e^4/(1+e^4)\approx54.598/55.598\approx0.9820\).

At \(\eta=-4\), \(\mu=e^{-4}/(1+e^{-4})\). Since \(e^{-4}=1/e^4\approx0.01832\), \(\mu\approx0.01832/1.01832\approx0.0180\).

The results are close to one and zero, respectively, but neither equals an endpoint. The exact endpoint statements concern limits as the predictor grows without bound, not these finite values.

Common Mistake and Why the Transformation Matters

Common mistake: “The predictor is positive, so its inverse-logit must be greater than one,” or, “a very large finite predictor gives a mean of exactly one.” Both claims confuse the unbounded predictor scale with the bounded mean scale. The correction is to substitute into the inverse-logit: its positive denominator is always greater than its numerator, so the output stays strictly below one; it is also positive. A large finite predictor may yield a value extremely close to one, but the limit does not make the value equal to one at any finite input.

This distinction matters whenever the quantity being represented must remain a proportion. An unrestricted linear predictor can be transformed into a valid interior mean without restricting the predictor itself. The inverse-logit also provides a coherent way to read the transformed value: take its odds to recover \(e^\eta\), or take the logarithm of those odds to recover \(\eta\). Keeping these scales distinct prevents interpreting a predictor as though it were already a mean.

Key takeaway: The inverse-logit \(e^\eta/(1+e^\eta)\) maps every finite real predictor to exactly one mean in \((0,1)\). Its odds equal \(e^\eta\), and its values approach zero or one only in the corresponding infinite-predictor limits.

Check Your Understanding

Use the formulas and arguments in this tutorial to answer the following questions.

  1. Derive the inverse-logit formula by solving \(\eta=\log(\mu/(1-\mu))\) for \(\mu\).
  2. For \(\eta=\log(2)\), calculate the inverse-logit mean and verify its odds.
  3. Explain why no finite predictor has an inverse-logit equal to zero or one.
  4. What are the limits of the inverse-logit as the predictor tends to positive infinity and negative infinity?
  5. A colleague says that a negative predictor must produce a negative mean. Use the formula to identify the error in this reasoning.
Clinical Biostats