<p>Let <span class="math-container">$X_j = v_j + e_j$</span> with <span class="math-container">$e_j$</span>'s being IID type I extreme. Define</p>
<p><span class="math-container">$$\hat X= \max \{ X_1,...,X_J\},$$</span></p>
<p>and let <span class="math-container">$\hat X_j$</span> be the variables <span class="math-container">$X_j$</span> conditional on being the max. Then the invariance property states that</p>
<p><span class="math-container">$$\hat X,\hat X_1,...,\hat X_J \sim F^*,$$</span></p>
<p>all have the same distribution <span class="math-container">$F^*$</span>. They, therefore, have the same expectation. It follows that</p>
<p><span class="math-container">$$\mathbb E[v_j + e_j\lvert j = j^*] = \mathbb E[\hat X],$$</span></p>
<p>where <span class="math-container">$j^*\in \arg \max_j \{ X_1,...,X_J\}$</span>. Hence</p>
<p><span class="math-container">$$\mathbb E[\hat X] - v_j = \mathbb E[e_j \lvert j=j^*],$$</span></p>
<p>where <span class="math-container">$v_j$</span> is known and there is an analytical closed form for <span class="math-container">$\mathbb E[\hat X]$</span> as the standard log-sum expression.</p>
<p>Here is a simulation in R displaying the property of invariance</p>
<pre><code>library(evd)
v_1 &lt;- 1
v_2 &lt;- 2

N &lt;- 100000
Z &lt;- matrix(rgumbel(2*N),nrow=2)
W &lt;- Z + c(v_1,v_2)
index1 &lt;- W[1,]&gt;W[2,]
index2 &lt;- W[2,]&gt;W[1,]

mean(W[1,index1])
mean(W[2,index2])
0.5772 + log(sum(exp(c(v_1,v_2))))  
</code></pre>

CC BY-SA 4.0
2021-11-28T00:59:10.773Z
Thanks! For future reference, the "invariance property" of logit in this answer is discussed e.g. in Lindberg, Eriksson, and Mattsson. "Invariance of achieved utility in random utility models" 1995 Environment and Planning.
Smithey
CC BY-SA 4.0
2021-11-28T07:51:50.047Z
You are welcome.  Yes, invariance property is mentioned in many places. For a newer reference see for example: Fosgerau, Weibull, Lindberg, Mattson (2018) A note on the invariance of the distribution of the maximum.
Jesper Hybel
CC BY-SA 4.0
2021-11-22T06:50:02.697Z
2021-11-22T07:47:56.187Z
2021-11-22T07:47:56.187Z
Jesper Hybel
<p>Consider a standard multinomial logit choice model. A consumer chooses a good <span class="math-container">$j$</span> from a choice set <span class="math-container">$J$</span> by choosing the good with the highest realized utility where the utility of good <span class="math-container">$j$</span> is given by</p>
<p><span class="math-container">$$u_j = -p_j + \varepsilon_j,$$</span> where <span class="math-container">$p_j$</span> is the price of good <span class="math-container">$j$</span> and <span class="math-container">$\varepsilon_j$</span> is iid type-I extreme value. I am interested in finding a closed-form formula for the expected value of <span class="math-container">$\varepsilon_j$</span> conditional on <span class="math-container">$j$</span> being chosen--that is, conditional on, for all <span class="math-container">$k\in J \neq j$</span>,
<span class="math-container">$$-p_j + \varepsilon_j \geq -p_k + \varepsilon_k.$$</span> Has such a formula been found?</p>
<p>Thanks!</p>

<econometrics><demand><measuring-utility>
Computing expectation of logit error conditional on choice
Smithey
# Computing expectation of logit error conditional on choice

(Asked by: username_0 on 2021-11-20)

Consider a standard multinomial logit choice model. A consumer chooses a good $j$ from a choice set $J$ by choosing the good with the highest realized utility where the utility of good $j$ is given by

$$u\_j = -p\_j + \varepsilon\_j,$$ where $p\_j$ is the price of good $j$ and $\varepsilon\_j$ is iid type-I extreme value. I am interested in finding a closed-form formula for the expected value of $\varepsilon\_j$ conditional on $j$ being chosen--that is, conditional on, for all $k\in J \neq j$,
$$-p\_j + \varepsilon\_j \geq -p\_k + \varepsilon\_k.$$ Has such a formula been found?

Thanks!

**Tags:** econometrics, demand, measuring-utility

---

## 1 answers

### Answer by username_1 on 2021-11-22. Score: 3 | Accepted answer

Let $X_j = v_j + e_j$ with $e_j$'s being IID type I extreme. Define
$$\hat X= \max \{ X_1,...,X_J\},$$
and let $\hat X_j$ be the variables $X_j$ conditional on being the max. Then the invariance property states that
$$\hat X,\hat X_1,...,\hat X_J \sim F^*,$$
all have the same distribution $F^*$. They, therefore, have the same expectation. It follows that
$$\mathbb E[v_j + e_j\lvert j = j^*] = \mathbb E[\hat X],$$
where $j^*\in \arg \max_j \{ X_1,...,X_J\}$. Hence
$$\mathbb E[\hat X] - v_j = \mathbb E[e_j \lvert j=j^*],$$
where $v_j$ is known and there is an analytical closed form for $\mathbb E[\hat X]$ as the standard log-sum expression.
Here is a simulation in R displaying the property of invariance
library(evd)
v_1 <- 1
v_2 <- 2

N <- 100000
Z <- matrix(rgumbel(2*N),nrow=2)
W <- Z + c(v_1,v_2)
index1 <- W[1,]>W[2,]
index2 <- W[2,]>W[1,]

mean(W[1,index1])
mean(W[2,index2])
0.5772 + log(sum(exp(c(v_1,v_2))))

> **Comments:**
> **username_0**: Thanks! For future reference, the "invariance property" of logit in this answer is discussed e.g. in Lindberg, Eriksson, and Mattsson. "Invariance of achieved utility in random utility models" 1995 Environment and Planning.  
> **username_1**: You are welcome.  Yes, invariance property is mentioned in many places. For a newer reference see for example: Fosgerau, Weibull, Lindberg, Mattson (2018) A note on the invariance of the distribution of the maximum.  

---

