<p>Because <span class="math-container">$\Bbb E[\varepsilon \mid x]= 0$</span> is one of the key assumptions for the estimation. </p>

CC BY-SA 4.0
2019-10-15T14:49:54.657Z
When it comes to the error term, the moments are the only things you can reason meaningfully with. In the context of regression analysis, once you're here: $$\implies\frac{1}{ y}\frac{\partial{y}}{\partial{x}} = \beta \frac{1}{x} + \frac{\partial{\varepsilon}}{\partial{x}}$$, take the expected value of both sides and rely on your assumptions about the distribution of $\epsilon$.
heh
CC BY-SA 4.0
2019-10-14T09:40:40.273Z
2019-10-15T03:50:12.583Z
2019-10-15T03:50:12.583Z
E. Sommer
<p>The normal procedure is to estimate the model using sample data for <span class="math-container">$x$</span> and <span class="math-container">$y$</span>, obtaining a fitted regression line:</p>

<p><span class="math-container">$$\ln(\hat{y})=\hat{\alpha}+\hat{\beta}\ln(x)$$</span></p>

<p>You then have a straightforward log-linear relation between <span class="math-container">$x$</span> and fitted values of <span class="math-container">$y$</span> and can use partial differentiation as in your question, but without the <span class="math-container">$\varepsilon$</span> terms, to show that:</p>

<p><span class="math-container">$$\hat{\beta}=\frac{\partial \hat{y}}{\partial x}\frac{x}{\hat{y}}$$</span></p>

<p>If the sample is representative of the population of interest, one can then infer that <span class="math-container">$\hat{\beta}$</span> is a good estimate of elasticity in the population.  </p>

<p>Trying instead to differentiate the original stochastic model leads into the difficult issue (see <a href="https://mathoverflow.net/questions/26067/derivative-of-a-random-variable">here</a>) of whether it makes any sense to differentiate a random variable.</p>

CC BY-SA 4.0
2019-10-15T14:47:46.590Z
But those "difficulties" are precisely why the question is of any practical interest, so I'm not sure dropping the error term is the right approach. Your model should have $\hat{\epsilon}$ in it.  And I think there's an abuse of notation here, as you moved from $\hat{y}$ to $y$ without taking an expected value - which is the key operation, as given a well-behaved error term, that is what makes the offending derivative vanish.
heh
CC BY-SA 4.0
2019-10-16T13:14:30.973Z
@heh Agreed that my original version moved from $\hat{y}$ to $y$ without a justification (edited to correct).
Adam Bailey
CC BY-SA 4.0
2019-10-17T14:33:16.080Z
Your estimator for the error really needs to stick around, though.  The true model would be what you've presented without the "hats", but again - doing this analysis on the true model is just algebra.  There is no need to get philosophical about differentiation of a random variable provided one uses the necessary assumptions about the error's distribution.
heh
CC BY-SA 4.0
2019-10-14T10:05:54.420Z
2019-10-16T12:58:38.390Z
2019-10-16T12:58:38.390Z
Adam Bailey
<p>I am trying to see how we treat <span class="math-container">$\varepsilon$</span> in the following proof:</p>

<p>Suppose we have a log-log single variable regression model</p>

<p><span class="math-container">$$ \ln(y) = \alpha + \beta \ln(x) + \varepsilon $$</span></p>

<p>then take partial derivative with respect to <span class="math-container">$x$</span> on both sides</p>

<p><span class="math-container">\begin{align}&amp;\implies \frac{\partial}{\partial x} \ln(y) = \frac{\partial}{\partial x} (\alpha + \beta \ln(x) + \varepsilon)\\&amp;\implies\frac{\partial \ln(y)}{\partial y} \frac{\partial y}{\partial x} = 0 + \beta \frac{1}{x} + \frac{\partial \varepsilon}{\partial x}\\&amp;\implies\frac{1}{ y} \frac{\partial y}{\partial x} = \beta \frac{1}{x} + \frac{\partial \varepsilon}{\partial x}\end{align}</span></p>

<p>We want to show that <span class="math-container">$\beta$</span> is equal to the elasticity of <span class="math-container">$y$</span> with respect to <span class="math-container">$x$</span></p>

<p><span class="math-container">$$ \beta = \frac{\partial y}{\partial x} \frac{x}{y} $$</span></p>

<p>But how do we know the <span class="math-container">$\dfrac{\partial \varepsilon}{\partial x} $</span> term is zero?</p>

<elasticity><regression>
Proof coefficient in log-log model is equal to coefficient of elasticity
Sunhwa
# Proof coefficient in log-log model is equal to coefficient of elasticity

(Asked by: username_0 on 2019-10-14)

I am trying to see how we treat $\varepsilon$ in the following proof:

Suppose we have a log-log single variable regression model

$$ \ln(y) = \alpha + \beta \ln(x) + \varepsilon $$

then take partial derivative with respect to $x$ on both sides

\begin{align}&\implies \frac{\partial}{\partial x} \ln(y) = \frac{\partial}{\partial x} (\alpha + \beta \ln(x) + \varepsilon)\\&\implies\frac{\partial \ln(y)}{\partial y} \frac{\partial y}{\partial x} = 0 + \beta \frac{1}{x} + \frac{\partial \varepsilon}{\partial x}\\&\implies\frac{1}{ y} \frac{\partial y}{\partial x} = \beta \frac{1}{x} + \frac{\partial \varepsilon}{\partial x}\end{align}

We want to show that $\beta$ is equal to the elasticity of $y$ with respect to $x$

$$ \beta = \frac{\partial y}{\partial x} \frac{x}{y} $$

But how do we know the $\dfrac{\partial \varepsilon}{\partial x} $ term is zero?

**Tags:** elasticity, regression

---

## 2 answers

### Answer by username_1 on 2019-10-14. Score: 10

Because $\Bbb E[\varepsilon \mid x]= 0$ is one of the key assumptions for the estimation.

> **Comments:**
> **username_2**: When it comes to the error term, the moments are the only things you can reason meaningfully with. In the context of regression analysis, once you're here: $$\implies\frac{1}{ y}\frac{\partial{y}}{\partial{x}} = \beta \frac{1}{x} + \frac{\partial{\varepsilon}}{\partial{x}}$$, take the expected value of both sides and rely on your assumptions about the distribution of $\epsilon$.  

---

### Answer by username_3 on 2019-10-14. Score: 1

The normal procedure is to estimate the model using sample data for $x$ and $y$, obtaining a fitted regression line:

$$\ln(\hat{y})=\hat{\alpha}+\hat{\beta}\ln(x)$$

You then have a straightforward log-linear relation between $x$ and fitted values of $y$ and can use partial differentiation as in your question, but without the $\varepsilon$ terms, to show that:

$$\hat{\beta}=\frac{\partial \hat{y}}{\partial x}\frac{x}{\hat{y}}$$

If the sample is representative of the population of interest, one can then infer that $\hat{\beta}$ is a good estimate of elasticity in the population.

Trying instead to differentiate the original stochastic model leads into the difficult issue (see [here](https://mathoverflow.net/questions/26067/derivative-of-a-random-variable)) of whether it makes any sense to differentiate a random variable.

> **Comments:**
> **username_2**: But those "difficulties" are precisely why the question is of any practical interest, so I'm not sure dropping the error term is the right approach. Your model should have $\hat{\epsilon}$ in it.  And I think there's an abuse of notation here, as you moved from $\hat{y}$ to $y$ without taking an expected value - which is the key operation, as given a well-behaved error term, that is what makes the offending derivative vanish.  
> **username_3**: @heh Agreed that my original version moved from $\hat{y}$ to $y$ without a justification (edited to correct).  
> **username_2**: Your estimator for the error really needs to stick around, though.  The true model would be what you've presented without the "hats", but again - doing this analysis on the true model is just algebra.  There is no need to get philosophical about differentiation of a random variable provided one uses the necessary assumptions about the error's distribution.  

---

