Tutorials › Econometrics (Graduate) › Nested Logit Probabilities And Inclusive Values

Multinomial and Ordinal Outcomes · Tutorial 490 of 952

Nested Logit Probabilities And Inclusive Values

Learn how inclusive values connect conditional choice within a nest to marginal choice between nests, producing a coherent probability for every alternative.

Advanced 12 min read

What You'll Learn

  • Define the inclusive value as the log-sum of scaled utilities within a nest.
  • Calculate conditional probabilities for alternatives within their nest.
  • Calculate marginal probabilities for choosing each nest.
  • Combine the two stages to obtain unconditional alternative probabilities.
  • Check that the probabilities sum to one and respond correctly to utility shifts.
  • Avoid confusing conditional probabilities with unconditional choice probabilities.

From Choice Trees to Probabilities

A nested logit choice tree represents a choice in two stages: a decision-maker first chooses a nest, then chooses an alternative within that nest. The probability of an alternative therefore depends on both stages. A high probability conditional on entering a nest does not, by itself, imply a high probability of being chosen overall; the nest itself may be rarely selected.

The key link between the stages is the inclusive value. It summarizes the systematic utility available among the alternatives in a nest, while accounting for their number and relative attractiveness. The inclusive value enters the marginal probability of choosing that nest. Multiplying the marginal nest probability by the conditional alternative probability then gives the unconditional probability of each alternative.

Definition: Suppose the available alternatives are partitioned into nests \(m=1,\ldots,M\), and alternative \(i\) belongs to nest \(m\). Let \(V_i\) be its systematic utility, \(\lambda_m>0\) the within-nest scale parameter, and \(A_m\) a systematic component specific to nest \(m\). Define the inclusive value of nest \(m\) as $$ I_m=\ln\left(\sum_{j\in m}\exp\left(\frac{V_j}{\lambda_m}\right)\right). $$ The conditional probability of alternative \(i\) given nest \(m\) is $$ P(i\mid m)=\frac{\exp(V_i/\lambda_m)} {\sum_{j\in m}\exp(V_j/\lambda_m)}. $$ The marginal probability of choosing nest \(m\) is $$ P(m)=\frac{\exp(A_m+\lambda_m I_m)} {\sum_{\ell=1}^{M}\exp(A_\ell+\lambda_\ell I_\ell)}. $$ The unconditional probability of choosing alternative \(i\) in nest \(m\) is \(P(i)=P(m)P(i\mid m)\).

Here \(P(i\mid m)\) describes the choice among alternatives in nest \(m\), conditional on that nest having been selected. In contrast, \(P(m)\) is the probability of selecting the nest, taking account of its inclusive value and its nest-specific component. The unconditional probability \(P(i)\) is the probability of the complete path through the tree: choose nest \(m\), then choose alternative \(i\) within it.

For a singleton nest containing one alternative, the within-nest probability of that alternative is one. Its inclusive value is its scaled systematic utility, \(I_m=V_i/\lambda_m\), so its contribution to the nest-level weight is \(\exp(A_m+V_i)\). This makes singleton alternatives easy to combine with larger nests.

Why the Inclusive Value Is a Log-Sum

The sum inside \(I_m\) aggregates the exponentiated, scaled utilities of all alternatives in a nest. A nest with more attractive alternatives tends to have a larger sum and thus a larger inclusive value. Since the nest-level probability uses \(\exp(A_m+\lambda_m I_m)\), this summary carries information from the within-nest alternatives into the comparison between nests.

The conditional probabilities can also be written directly using the inclusive value:

$$ P(i\mid m)=\exp\left(\frac{V_i}{\lambda_m}-I_m\right). $$

This follows because \(\exp(I_m)\) is exactly the denominator of the conditional-probability formula. The representation is useful for computation: first calculate each nest’s log-sum, then use it to calculate the nest probabilities, and finally multiply the two stages.

Worked Example: Two Alternatives in One Nest and a Singleton

Consider a hypothetical choice among alternatives 1 and 2 in nest A and alternative 3 in singleton nest B. Let \(\lambda_A=\lambda_B=0.5\), let \(A_A=A_B=0\), and set \(V_1=0\), \(V_2=0.5\ln(3)\), and \(V_3=0\). Calculate the inclusive values and all three unconditional probabilities.

For nest A, the scaled exponentiated utilities are \(\exp(V_1/0.5)=1\) and \(\exp(V_2/0.5)=\exp(\ln 3)=3\). Thus

$$ I_A=\ln(1+3)=\ln(4),\qquad P(1\mid A)=\frac{1}{4}=0.25,\qquad P(2\mid A)=\frac{3}{4}=0.75. $$

The weight for nest A is \(\exp(A_A+\lambda_A I_A)=\exp(0.5\ln4)=2\). Nest B is a singleton with \(I_B=V_3/0.5=0\), so its weight is \(\exp(A_B+\lambda_B I_B)=1\). Therefore

$$ P(A)=\frac{2}{2+1}=\frac{2}{3},\qquad P(B)=\frac{1}{2+1}=\frac{1}{3}. $$

Multiplication gives the alternative probabilities:

$$ P(1)=\frac{2}{3}\left(\frac{1}{4}\right)=\frac{1}{6}\approx0.1667,\qquad P(2)=\frac{2}{3}\left(\frac{3}{4}\right)=\frac{1}{2}=0.5000,\qquad P(3)=\frac{1}{3}\approx0.3333. $$

The probabilities sum to one: \(1/6+1/2+1/3=1\). Alternative 2 has the largest probability because it is attractive conditional on nest A, and nest A itself has probability \(2/3\).

Combining the Stages: A Derivation

The multiplication rule for probabilities gives the unconditional probability of reaching alternative \(i\) through nest \(m\):

$$ P(i)=P(i,m)=P(m)P(i\mid m). $$

Substitute the two probability formulas. The denominator of the conditional probability is \(\exp(I_m)\), so the result can also be expressed as a single fraction:

$$ \begin{aligned} P(i) &=\frac{\exp(A_m+\lambda_m I_m)} {\sum_{\ell=1}^{M}\exp(A_\ell+\lambda_\ell I_\ell)} \cdot \frac{\exp(V_i/\lambda_m)}{\exp(I_m)}\\ &=\frac{\exp\left(A_m+\lambda_m I_m+V_i/\lambda_m-I_m\right)} {\sum_{\ell=1}^{M}\exp(A_\ell+\lambda_\ell I_\ell)}\\ &=\frac{\exp\left(A_m+V_i/\lambda_m-(1-\lambda_m)I_m\right)} {\sum_{\ell=1}^{M}\exp(A_\ell+\lambda_\ell I_\ell)}. \end{aligned} $$

This expression is algebraically equivalent to the two-stage calculation, but the product form is usually easier to interpret and implement. It also shows why the unconditional probability is not simply a within-nest softmax over all alternatives: alternatives in different nests are combined through the nest-level denominator.

The probabilities are properly normalized. Within each nest, the conditional probabilities sum to one. Consequently,

$$ \sum_m\sum_{i\in m}P(i) =\sum_m P(m)\sum_{i\in m}P(i\mid m) =\sum_m P(m)=1. $$

This identity is a useful check on both algebra and numerical calculations. If the unconditional probabilities do not sum to one, a stage has likely been omitted or a denominator has been applied incorrectly.

Worked Probabilities With Multiple Alternatives

The next example uses a hypothetical travel-choice tree. It illustrates how conditional shares and marginal nest probabilities combine, including the effect of a change in one nest’s systematic component.

Worked Example: Transit and Car Nests

Suppose bus and rail are in a transit nest, while compact and sedan are in a car nest. Let both nest parameters be \(0.9\), and let both nest-specific components be zero. For the transit alternatives, suppose the scaled exponentiated utility terms \(\exp(V_i/0.9)\) are 5.110 for bus and 1.880 for rail. For compact and sedan, let the utilities be 0.7 and \(-0.1\), respectively. Calculate the nest probabilities and the four unconditional probabilities.

The inclusive-value sums (before taking logs) are

$$ D_{\mathrm{transit}}=5.110+1.880=6.990, $$ $$ D_{\mathrm{car}}=\exp(0.7/0.9)+\exp(-0.1/0.9) \approx2.176631+0.894838=3.071469. $$

The corresponding nest weights are \(D_m^{0.9}\), because \(A_m=0\) and \(I_m=\ln(D_m)\). Using unrounded weights,

$$ 6.990^{0.9}\approx5.754790,\qquad 3.071469^{0.9}\approx2.745438. $$

Thus the marginal nest probabilities are

$$ P(\mathrm{transit})= \frac{5.754790}{5.754790+2.745438}\approx0.6770,\qquad P(\mathrm{car})= \frac{2.745438}{5.754790+2.745438}\approx0.3230. $$

Within transit, the conditional probabilities are \(5.110/6.990\approx0.7310\) for bus and \(1.880/6.990\approx0.2690\) for rail. Within car, they are \(\exp(0.7/0.9)/3.071469\approx0.7087\) for compact and \(\exp(-0.1/0.9)/3.071469\approx0.2913\) for sedan. Multiplying the conditional and marginal probabilities, using unrounded intermediate values, gives

$$ \begin{aligned} P(\mathrm{bus})&\approx0.4949,& P(\mathrm{rail})&\approx0.1821,\\ P(\mathrm{compact})&\approx0.2289,& P(\mathrm{sedan})&\approx0.0941. \end{aligned} $$

These probabilities sum to approximately one, with any small discrepancy due to display rounding. The bus probability, for example, is the probability of choosing transit multiplied by the probability of choosing bus conditional on transit; it is not the conditional bus share alone.

Worked Example: Shifting the Transit Nest Component

Continue with the hypothetical transit-and-car model above. Suppose the systematic component for the transit nest rises by 0.5, while all alternative utilities and the car nest component remain unchanged. Find the new transit probability and the new bus probability.

The transit nest weight is multiplied by \(\exp(0.5)\), because its weight is \(\exp(A_{\mathrm{transit}}+0.9I_{\mathrm{transit}})\). The car weight is unchanged. Using the original unrounded nest probabilities, the new transit probability is

$$ P'(\mathrm{transit}) =\frac{\exp(0.5)(0.677016)} {\exp(0.5)(0.677016)+0.322984} \approx0.7756, \qquad P'(\mathrm{car})\approx0.2244. $$

The change is to a nest-specific component, not to the utilities that distinguish bus from rail within transit. Therefore the conditional bus share remains \(5.110/6.990\), approximately 0.7310. The new unconditional bus probability is

$$ P'(\mathrm{bus})=P'(\mathrm{transit})P(\mathrm{bus}\mid\mathrm{transit}) \approx0.775580\left(\frac{5.110}{6.990}\right) \approx0.5670. $$

The other alternative probabilities change through their nest probabilities as well. The within-nest shares remain fixed in this example, while the transit alternatives collectively gain probability relative to the car alternatives.

Computation and Interpretation

A reliable calculation follows the structure of the tree. For each nest, calculate the scaled exponentiated utilities and their sum, or calculate the log-sum directly. Use each inclusive value to form a nest weight, normalize the weights to get marginal nest probabilities, and then calculate conditional probabilities within each nest. The last step is multiplication.

1
Calculate each inclusive value.
For nest \(m\), compute \(I_m=\ln\sum_{j\in m}\exp(V_j/\lambda_m)\).
2
Normalize nest weights.
Compute \(\exp(A_m+\lambda_m I_m)\) for every nest and divide each weight by their sum to obtain \(P(m)\).
3
Calculate within-nest shares.
For each alternative, divide \(\exp(V_i/\lambda_m)\) by the corresponding within-nest sum to obtain \(P(i\mid m)\).
4
Recover alternative probabilities.
For each alternative \(i\) in nest \(m\), calculate \(P(i)=P(m)P(i\mid m)\), then verify that the probabilities sum to one.

In numerical work, log-sum-exp calculations can help avoid overflow when utilities are large. For example, for values \(z_j=V_j/\lambda_m\), choose \(c=\max_j z_j\) and compute \(I_m=c+\ln\sum_j\exp(z_j-c)\). Subtracting \(c\) changes neither the resulting inclusive value nor the probabilities, and keeps the exponentials at manageable magnitudes.

Common Mistakes and Why the Structure Matters

  • Reporting a conditional share as an unconditional probability. A value such as \(P(i\mid m)=0.73\) says how often alternative \(i\) is chosen among choices in nest \(m\); the overall probability is \(P(m)\times0.73\).
  • Leaving the inclusive value out of the nest comparison. The marginal nest probability must account for the systematic utilities of alternatives within the nest through \(\lambda_m I_m\), as well as the nest-specific component \(A_m\).
  • Using the wrong denominator. Conditional probabilities have a denominator containing alternatives in the same nest. Marginal nest probabilities have a denominator containing all nests. Those are different normalizations.
  • Rounding too early. Keep full precision for inclusive values, nest weights, and conditional shares; round only the final reported probabilities. Small intermediate rounding differences can change the last displayed digit.

Nested probabilities matter because they make the two levels of a choice tree explicit. They show how the attractiveness of a set of alternatives can influence the probability of entering its nest, while the conditional probabilities describe how choices are divided within that nest. This decomposition is also useful for interpreting model predictions: a change in an alternative utility can affect its within-nest share and the nest’s inclusive value, whereas a change in a nest-specific component directly changes the marginal nest comparison.

Key takeaway: The inclusive value carries the within-nest utility information into the nest-level comparison. The probability of an alternative is the product of its marginal nest probability and its conditional probability within that nest.

Check Your Understanding

Answer each question using the two-stage probability structure.

  1. In words, what does \(P(i\mid m)\) represent, and how does it differ from \(P(i)\)?
  2. A nest has scaled exponentiated utility terms 2 and 3. What is its inclusive value?
  3. If \(P(m)=0.40\) and \(P(i\mid m)=0.25\), what is the unconditional probability \(P(i)\)?
  4. Why must the conditional probabilities within each nest sum to one?
  5. If only a nest-specific component \(A_m\) changes, which probability stage is directly affected by that change?
Clinical Biostats