<p>We cannot obtain "demand" in the usual sense, because demand is a random variable. The "best" we can do is first, to obtain the Conditional Expectation of individual demand (conditional on the variables that determine the probability of whether the consumer will demand/buy).<br>
Let a situation where consumers decide to buy or not to buy a single (for simplicity) item of a good $A$. We can model this underlying utility framework by</p>

<p>$$u_i(A) = \alpha p_i+\mathbf x_i'\beta +e_i$$</p>

<p>with $i$ denoting the consumer, $p_i$ is the good's price, <em>faced by consumer $i$</em>, $\mathbf x_i$ containing various other variables pertinent to the case, and $e_i$ representing a "random" preference shock, assumed, say, to follow the standard logistic distribution, conditional on the $x$'s.
The consumer will demand/buy, $q^d_i=1$, if (by convention) $u_i(A)&gt;0$, so we can model the conditional probability of buying by </p>

<p>$$E(q_i^d =1\mid p, \mathbf x_i) = \Lambda(\alpha p_i+\mathbf x_i'\beta)$$</p>

<p>Then the conditional expectation of Market demand is </p>

<p>$$Q_d = \sum_{i=1}^nq^d_i = \sum_{i=1}^n\Lambda(\alpha p_i+\mathbf x_i'\beta)$$</p>

<p>This is still a random variable, and with unknown parameters. To obtain something one dimensional, given a sample of size $n$ on $\mathbf x_i$ and on relevant transactions (and so on $p_i$), one can estimate $\hat \alpha, \; \hat \beta $, say by maximum likelihood. Then we can obtain some concept of "average market demand curve" by using the sample means of the $x$'s as</p>

<p>$$\hat Q_d(p\,; \mathbf {\bar x}) = \sum_{i=1}^n\Lambda(\hat \alpha p+ \mathbf {\bar x'}\hat \beta) = n\cdot \Lambda(\hat \alpha p+ \mathbf {\bar x'}\hat \beta)$$</p>

<p>where here the price $p$ is not indexed anymore, and we vary it to obtain a curve.  </p>

<p>As a toy numerical example, assume there are $100$ consumers, that ${\bar x'}\hat \beta =1$, and  $\hat \alpha = -2$. Then $\hat Q_d(p\,; \mathbf {\bar x_i})$ will look like</p>

<p><a href="https://i.sstatic.net/qI6rz.png" rel="noreferrer"><img src="https://i.sstatic.net/qI6rz.png" alt="enter image description here"></a></p>

<p><strong>MULTINOMIAL LOGIT</strong> </p>

<p>In a multinomial logit where we examine the choice to buy "this <em>or</em> this <em>or</em> this" (mutually exclusive choices $k=1,..,K$), we end up with (after the usual normalization)</p>

<p>$$\hat E(q^d_{ik} \mid p_{ik}, \mathbf x_{ik}) = \frac {\exp\{\hat \alpha p_{ik} + \mathbf x'_{ik}\hat \beta\}}{1+\sum_{k=2}^K\exp\{\hat \alpha p_{ik} + \mathbf x'_{ik}\hat \beta\}}$$</p>

<p>Then we can obtain $K$ demands (each conditional on the rest) using (say, for good $1$)</p>

<p>$$\hat Q^{(1)}_d(p_1) = \frac {n\cdot \exp\{\hat \alpha p_1 + \mathbf {\bar x}_{1}'\hat \beta\}}{1 + \sum_{k=2}^{K}\exp\{\hat \alpha \bar p_{k} + \mathbf {\bar x}_k'\hat \beta\}} $$</p>

<p>Note that here we have to average the prices of the other goods also.</p>

CC BY-SA 3.0
2015-09-10T19:07:20.233Z
It's a good answer. If I extend the binary logit to a multinomial logit, I would just need to aggregate the probability of purchasing each good over the entire sample. Am I undestanding it correctly.
Yan Song
CC BY-SA 3.0
2015-09-10T19:21:42.223Z
@YanSong Are you using multinomial logit to model alternative, mutually exclusive choices?
Alecos Papadopoulos
CC BY-SA 3.0
2015-09-10T19:30:07.587Z
Yes. I just want to relate it to the standard demand curve to explain how to calculate the consumer surplus.
Yan Song
CC BY-SA 3.0
2015-09-10T20:06:16.490Z
@YanSong I extended the answer to cover multinomial logit.
Alecos Papadopoulos
CC BY-SA 3.0
2015-09-10T20:48:14.250Z
I hope this answer gets the upvotes it deserves.
Ubiquitous
CC BY-SA 3.0
2015-09-10T17:17:57.010Z
2015-09-27T00:46:28.073Z
2015-09-27T00:46:28.073Z
Alecos Papadopoulos
<p>Is it possible to derive a demand curve from a discrete choice multinomial model. For instance, a logit model would give the probability of purchasing each good. But can I translate that into a demand curve.            </p>

<supply-and-demand>
Demand curve from logit model
Yan Song
# Demand curve from logit model

(Asked by: username_0 on 2015-09-10)

Is it possible to derive a demand curve from a discrete choice multinomial model. For instance, a logit model would give the probability of purchasing each good. But can I translate that into a demand curve.

**Tags:** supply-and-demand


---

## 1 answers

### Answer by username_1 on 2015-09-10. Score: 9 | Accepted answer

We cannot obtain "demand" in the usual sense, because demand is a random variable. The "best" we can do is first, to obtain the Conditional Expectation of individual demand (conditional on the variables that determine the probability of whether the consumer will demand/buy).  
Let a situation where consumers decide to buy or not to buy a single (for simplicity) item of a good $A$. We can model this underlying utility framework by

$$u\_i(A) = \alpha p\_i+\mathbf x\_i'\beta +e\_i$$

with $i$ denoting the consumer, $p\_i$ is the good's price, *faced by consumer $i$*, $\mathbf x\_i$ containing various other variables pertinent to the case, and $e\_i$ representing a "random" preference shock, assumed, say, to follow the standard logistic distribution, conditional on the $x$'s.
The consumer will demand/buy, $q^d\_i=1$, if (by convention) $u\_i(A)>0$, so we can model the conditional probability of buying by

$$E(q\_i^d =1\mid p, \mathbf x\_i) = \Lambda(\alpha p\_i+\mathbf x\_i'\beta)$$

Then the conditional expectation of Market demand is

$$Q\_d = \sum\_{i=1}^nq^d\_i = \sum\_{i=1}^n\Lambda(\alpha p\_i+\mathbf x\_i'\beta)$$

This is still a random variable, and with unknown parameters. To obtain something one dimensional, given a sample of size $n$ on $\mathbf x\_i$ and on relevant transactions (and so on $p\_i$), one can estimate $\hat \alpha, \; \hat \beta $, say by maximum likelihood. Then we can obtain some concept of "average market demand curve" by using the sample means of the $x$'s as

$$\hat Q\_d(p\,; \mathbf {\bar x}) = \sum\_{i=1}^n\Lambda(\hat \alpha p+ \mathbf {\bar x'}\hat \beta) = n\cdot \Lambda(\hat \alpha p+ \mathbf {\bar x'}\hat \beta)$$

where here the price $p$ is not indexed anymore, and we vary it to obtain a curve.

As a toy numerical example, assume there are $100$ consumers, that ${\bar x'}\hat \beta =1$, and $\hat \alpha = -2$. Then $\hat Q\_d(p\,; \mathbf {\bar x\_i})$ will look like

[![enter image description here](https://i.sstatic.net/qI6rz.png)](https://i.sstatic.net/qI6rz.png)

**MULTINOMIAL LOGIT**

In a multinomial logit where we examine the choice to buy "this *or* this *or* this" (mutually exclusive choices $k=1,..,K$), we end up with (after the usual normalization)

$$\hat E(q^d\_{ik} \mid p\_{ik}, \mathbf x\_{ik}) = \frac {\exp\{\hat \alpha p\_{ik} + \mathbf x'\_{ik}\hat \beta\}}{1+\sum\_{k=2}^K\exp\{\hat \alpha p\_{ik} + \mathbf x'\_{ik}\hat \beta\}}$$

Then we can obtain $K$ demands (each conditional on the rest) using (say, for good $1$)

$$\hat Q^{(1)}\_d(p\_1) = \frac {n\cdot \exp\{\hat \alpha p\_1 + \mathbf {\bar x}\_{1}'\hat \beta\}}{1 + \sum\_{k=2}^{K}\exp\{\hat \alpha \bar p\_{k} + \mathbf {\bar x}\_k'\hat \beta\}} $$

Note that here we have to average the prices of the other goods also.

> **Comments:**
> **username_0**: It's a good answer. If I extend the binary logit to a multinomial logit, I would just need to aggregate the probability of purchasing each good over the entire sample. Am I undestanding it correctly.  
> **username_1**: @username_0 Are you using multinomial logit to model alternative, mutually exclusive choices?  
> **username_0**: Yes. I just want to relate it to the standard demand curve to explain how to calculate the consumer surplus.  
> **username_1**: @username_0 I extended the answer to cover multinomial logit.  
> **username_2**: I hope this answer gets the upvotes it deserves.  

---

