# When using OLS on $\ln(y) = \beta_1 \ln(x) + \epsilon$, is $\beta_1$ the elasticity of $E[y\vert x]$, or the $y$ in the data (or both)?

Specifically, suppose we are estimating $$\ln(y)=\beta_1\ln(x) + \epsilon$$ I understand that $$\beta_1 = \frac{\partial \ln(y)}{\partial \ln(x)}$$ which is the elasticity of $$y$$ with respect to $$x$$

However I am confused since OLS estimates the conditional mean function, i.e. OLS estimates $$E[\ln{y} \vert \ln{x}]$$

So then would $$\beta_1$$ in the above regression be -- or at least converge to as sample size becomes large -- $$\frac{\partial E[\ln{y} \vert \ln{x}]}{\partial \ln{x}}$$ which does not look like an elasticity to me (maybe it is and I just don't realize it?)

(Aside: this is probably really a question about how OLS relates to the conditional mean. Basically, it is my understanding that the standard OLS assumptions ensure a linear conditional mean, and this is what we are actually estimating.

However, if what we are actually estimating is the conditional mean of $$y$$ and not $$y$$ itself, then why is $$\beta_1$$ in equation (1) the elasticity of $$y$$?

• the answer is perhaps as simple as "we are not estimating the conditional mean", in which case I apologize for being misguided)

Edit: let me try to illustrate my particular question more clearly:

Suppose we have the following relationship: $$ln(y) = \beta_1 ln(x) + \epsilon$$ Then if we take the derivative of both sides w.r.t $$x$$ and rearrange, as is done here, we can show that $$\beta_1 = \frac{\partial y}{\partial x}\frac{x}{y}$$

That final quantity we call the "elasticity"

If instead we have the following relationship $$E[ln(y) \vert x ] = \beta_1 ln(x)$$ is $$\beta_1$$ still the elasticity? If so, how can we rigorously prove this?

I ask, because when we do ordinary least squares, when we think about $$y$$ as being uncertain (i.e. drawn from some distribution), then OLS estimates the condition mean.

• Note: perhaps I am wrong and OLS on $$\beta_1 ln(x) + \epsilon$$ estimates $$ln(E[y\vert x])$$ and not $$E[ln(y) \vert x]$$ If so, then I will be satisfied with a clarification of this point.

I think I understand your confusion. A standard approach when working with mathematics is to start from a definition. Since you are interested in an elasticity you choose to start from the definition of the elasticity:

Let the elasticity $$El_x q(x)$$ of $$q(x)$$ with respect to the variable $$x$$ defined

$$El_x q(x):=\frac{x}{q(x)} \frac{\partial q(x)}{\partial x}$$

assuming that $$q(x)>0$$ and $$x >0$$ it follows that

$$El_x q(x) = \frac{\partial \log q(x)}{\partial \log x}.$$

Let $$q(x) = \mathbb E[y\lvert x]$$ it then follows that

$$El_x \mathbb E[y\lvert x] = \frac{\partial \log \mathbb E[y\lvert x]}{\partial \log x} = \frac{x}{\mathbb E[y\lvert x]} \frac{\partial \mathbb E[y\lvert x]}{\partial x},$$ having imposed that $$\mathbb E[y\lvert x]>0$$ and $$x>0$$.

The next step is then to apply this definition to the model

$$\log y = \beta\log x + \epsilon$$ under the standard assumption that $$\mathbb E[\log y\lvert x]=\beta \log x$$. To do this you must find an expression for $$y$$ to insert in $$\mathbb E[y\lvert x]$$ so you take the exponential to get $$y = \exp(\beta\log x)\exp(\epsilon)$$. You then insert this into your expression for the elasticity and get

$$El_x \mathbb E[y\lvert x] = \frac{\partial \log \mathbb E[y\lvert x]}{\partial \log x} = \frac{\partial \log \mathbb E[\exp(\beta\log x)\exp(\epsilon)\lvert x]}{\partial \log x},$$ and because you are conditioning on $$x$$ you can then get the result $$El_x \mathbb E[y\lvert x] = \beta + \frac{\log \mathbb E[\exp(\epsilon) \lvert x]}{\partial \log x},$$

which implies that $$\beta$$ is an elasticity in the sense defined if and only if the second summand is equal to zero which does not follow from $$\mathbb E[\log y\lvert x]=\beta \log x$$ equivalent to $$\mathbb E[\epsilon\lvert x]=0$$.

One option here would then be to assume that $$\epsilon$$ is independent of $$x$$ such that $$\mathbb E[\exp(\epsilon) \lvert x] = c$$ just some constant not depending on $$x$$ (assuming at the same time offcourse that the expectation exists). It then follows that $$El_x \mathbb E[y\lvert x] = \beta.$$

In the case where you are not assuming this stronger assumption and insist that $$\beta$$ is an elasticity you are de facto talking about

$$\frac{\partial\mathbb E[ \log y\lvert x]}{\partial \log x} = \beta$$

as being an elasticity.

So the confusion arise because econometricians are actually using two mathematically different definitions of elasticity.

And offcourse $$\beta$$ is in this sense the elasticity of systematic part of the demand model: $$g(x,\beta) = \beta \log x$$ which may or may not be derived from some economic theory after which the error is added simply as measurement error. So you could say something like it is the elasticity when you ignore the error.

You can find the above also presented in Wooldridge (2009) Econometric Analysis of Cross Section and Panel Data page 16-17.

The elasticity relates to how the conditional mean of $$y$$ changes as $$x$$ changes.

In economics, $$y$$ denotes the "true demand", shorn of randomness or errors, as a function of price ($$x$$); $$y$$ is always conditional upon $$x$$, and no-one would ever bother to write $$\mathbb{E}[y|x]$$, especially given that there's no randomness. In statistics, however, we have an observed demand which is not always exactly equal to its mean, and we want to estimate the relationship between changes in price and changes in the mean demand, i.e., how $$\mathbb{E}[y|x]$$ changes as $$x$$ changes. Our pair $$(\mathbb{E}[y|x], x)$$ corresponds to the economist's (demand, price) pair $$(y,x)$$.

With respect to your last question - we are estimating $$y|x$$, and the best estimate for $$y|x$$ under squared error loss is the conditional mean of $$y|x$$, so we estimate that conditional mean $$\mathbb{E}[y|x]$$ and use it as our estimate for $$y|x$$. So the answer is, perhaps confusingly, "we are estimating both $$y|x$$ and the conditional mean of $$y|x$$."

• Could you clarify your first sentence " The elasticity relates to how the conditional mean of $y$ changes as $x$ changes". Are you saying that $\beta_1 = \frac{\partial y}{\partial x}\frac{x}{y}$, which relates to how to conditional mean of $y$ changes as $x$ changes, but is not necessarily equal to $\frac{\partial E[y \vert x]}{\partial x} \frac{x}{E[y\vert x]}$.? (Really, I just want to know whether $\beta_1 = \frac{\partial E[y\vert x]}{\partial x}\frac{x}{E[y\vert x]}$, and if it does how this can be proven) – user106860 Feb 29 at 0:36
• I think this is all addressed by the next paragraph, albeit perhaps implicitly. With respect to your last sentence, if you write out the equation being estimated, it's clear that that is exactly what $\beta_1$ is, and we are trying to estimate it using a linear regression with additive errors. – jbowman Feb 29 at 0:56