<p>Point prediction and CI are different.</p>

<p>For point prediction, we are better off by correcting the bias as much as possible. For CI, what is required from the beginning is that the probability equals $100(1-\alpha)\%$. When $[a,b]$ is the 95% CI for $\ln(y_0)$ for example, $[e^a,e^b]$ is certainly a 95% CI for $y_0$ because $P(a\le \ln X\le b) = P(e^a \le X \le e^b)$. So your $[e^{7.1563}, e^{7.2175}]$ is certainly a valid CI.</p>

<p>But the center of this CI is neither the naive predictor (exp[predictor of $\ln y_0$]) nor the corrected predictor of $y_0$ (a correction factor times the naive predictor) due to Jensen's inequality, but it does not really matter. In some cases (not always), you may be able to change the CI to $[e^{a-p}, e^{b-q}]$ for some $p$ and $q$ so that the probability is still 95% and its center is the bias-corrected predictor, but I don't see the point in it.</p>

<p>What you suggested, i.e., $[e^{s^2/2}e^a,e^{s^2/2}e^b]$ is not a 95% CI. To see why, let the correction factor be $h$ (nonrandom and perfectly known, for simplicity), so the bias-corrected predictor is $he^{\theta}$, where $\theta$ is the unbiased predictor of $\ln y_0$ ($\hat\beta_0 + \hat\beta_2 \ln x_2 + \hat\beta_3 x_3$ in your example). This "$h$" can be estimated by $e^{s^2/2}$ for example, but while the latter is random, $h$ is assumed nonrandom in order to make it simple. Let $[a,b]$ be the 95% CI for $\ln y_0$, i.e., $P(a\le \ln y_0\le b)=0.95$. Then,
$$
P(he^a \le y_0 \le he^b) = P(\ln h+a \le \ln y_0 \le \ln h+b),
$$
which is <em>not</em> equal to $P(a\le \ln y_0\le b)=0.95$ unless the distribution of $\ln y_0$ is uniform, which is usually not.</p>

<p><strong>EDIT</strong></p>

<p>The above is about the CI of $y_0$, not of $E(y|X=x_0)$. The original question is about the CI for $E(y|X=x_0)$. Let $E(y|X=x_0) = h\exp(x_0\beta)$, which is estimated by $\hat{h} \exp(x_0 \hat{\beta})$. In that case, I think the Delta method is a useful option (see luchonacho's answer).</p>

<p>To be rigorous, we need the joint distribution of $\hat{h}$ and $\hat\beta$, or to be precise, the asymptotic distribution of the vector $\sqrt{n}[(\hat\beta-\beta)', \hat{h}-h]'$. Then the limit distribution of $\sqrt{n}[\hat{h} \exp(x_0\hat{\beta}) - h\exp(x_0\beta)]$ is derived using the Delta method and then CI's for $h\exp(x_0\beta)$ can be constructed.</p>

CC BY-SA 3.0
2017-05-24T12:06:02.837Z
Thanks for you answer Chan. By the way, in this exercise, the point estimator for either $y_0$ or $E(y|X_0)$ is equal. The resulting estimate is outside the CI for $E(y|X_0)$ but inside the CI for $y_0$. Shouldn't they both be inside their CI?
An old man in the sea.
CC BY-SA 3.0
2017-05-24T15:44:33.767Z
Yes, it helps.
Could you check this question of mine. It's related to this. 

https://economics.stackexchange.com/questions/16891/prediction-interval-for-eyx-0-when-model-is-in-lny
An old man in the sea.
CC BY-SA 3.0
2017-05-25T01:17:59.080Z
In a comment I made and deleted, I made a mistake. $E(y|X=x_0)$ is of course different from $\exp\{E(\log y|X=x_0)\}$ as the answer by Alecos Papadopoulos to your question states. Many thanks @Anoldmaninthesea, and sorry about that. I was perhaps thinking that $\exp(x_0{\hat\beta})$ is sufficiently close to $\exp(x_0 \beta)$, which is not what you raised. Hmm, in that case your remark is even more interesting.
chan1142
CC BY-SA 3.0
2017-05-25T01:26:35.010Z
I've never thought about this issue. I will now. So it is about the CI for $E(y|X=x_0)$. The Delta method explained by luchonacho looks useful in this case. Thank you @Anoldmaninthesea for raising it.
chan1142
CC BY-SA 3.0
2017-05-28T09:32:44.517Z
Chan, I've linked another question of mine to this one. In there, you'll find an answer I've written which you might find interesting.
An old man in the sea.
CC BY-SA 3.0
2017-05-29T23:41:34.380Z
@Anoldmaninthesea. So your answer to the other question evaluates the bias and variance under the normality assumption. Fair enough. Thanks for sharing it. It looks useful.
chan1142
CC BY-SA 3.0
2017-05-03T01:42:51.023Z
2017-05-25T02:00:34.793Z
2017-05-25T02:00:34.793Z
chan1142
<p>Use the <a href="http://www.indiana.edu/~jslsoc/stata/ci_computations/spost_deltaci.pdf" rel="nofollow noreferrer">Delta Method</a>. Say the large samples asymptotic distribution of a <strong>single</strong> parameter $\beta$ is:</p>

<p>$$ \hat{\beta} \xrightarrow{a} N\left(\beta,\frac{Var(\hat{\beta})}{n}\right) $$</p>

<p>(assuming your estimation is consistent)</p>

<p>Furthermore, you are interested in a function of $\hat{\beta}$, say, $F(\hat{\beta})$. Then, a first order Taylor <em>approximation</em> of the above leads to the following asymptotic distribution:</p>

<p>$$ F(\hat{\beta}) \xrightarrow{a} N\left(F(\beta),\left(\frac{\partial F(\hat{\beta})}{\partial \hat{\beta}}\right)^2\frac{Var(\hat{\beta})}{n}\right) $$</p>

<p>In your case, $F(\hat{\beta})$ is $e^\hat{\beta}$. From here, you can construct the CI as normal. </p>

<p>Source and more details in the linked document.</p>

CC BY-SA 3.0
2017-05-02T14:37:56.197Z
lucho, I cannot use the Delta method for this... but thanks anyway. ;)
An old man in the sea.
CC BY-SA 3.0
2017-05-02T14:55:49.177Z
:o why not? Any assumption I misread or not stated?
luchonacho
CC BY-SA 3.0
2017-05-02T15:33:43.907Z
It's just not the point of the exercise. I'm really interested in knowing which of the method is correct. Also, your method gives an approximate distribution, whereas in the exercise they want an exact CI.
An old man in the sea.
CC BY-SA 3.0
2017-05-02T14:17:32.867Z
2017-05-02T14:17:32.867Z
luchonacho
<p>You do not find the same answer because of what I suspect to be a typographical error, which would thus be the main reason of your problem: $x_{03}$ would be set to $80$, not $8$. Another possibility, if you keep $x_{03}=8$, is an error in the second estimated coefficient, say, $\hat{\beta}_2 = -0.1$ instead of $-0.01$.</p>

<p>Anyway, one of these modifications solves everything and yields the same result as the solution to this exercise.</p>

<p>Considering this change, with $t_{\alpha/2}=1.96476138969835$, one gets</p>

<h3>Method 1</h3>

<p>$\text{CI}(E[y_0|x_0])=[e^{6.43618291164626},e^{6.49755798189177}]=[624.020307335178,663.519326788772]$
<strong>(the given solution to this exercise)</strong></p>

<p>or <h3>Method 2</h3>
(as stated In Wooldridge's Intro to Econometrics, in page 212) if we're sure the error terms are normal (and one is extremely lucky)</p>

<p>$$\text{CI}(E[y_0|x_0])=\left[e^{s^2/2}624.0203,e^{s^2/2}663.5193 \right] = \left[ 624.0960,663.6002 \right] $$</p>

<h2>however</h2>

<p>the <strong>method 2</strong> is very unlikely to be correct, since as you mention in your question <em>[...] the (underestimation) correction should not be used to the CI but only for the point estimation.</em></p>

<p>Why ? I would say because of the dependency betweeen the two terms, knowing the expectations of $e^{s^2/2}$ on the one hand and $\hat{y_0}$ on the other hand does not mean one knows the one of $e^{\frac{s^2}{2} + \hat{\ln(y_0)}}$.</p>

CC BY-SA 3.0
2017-05-02T17:08:15.233Z
2017-05-07T03:37:35.890Z
2017-05-07T03:37:35.890Z
keepAlive
<p>My estimated model is </p>

<p>$$\hat \ln(y_t)=9.873-0.472\ln(x_{t2})-0.01x_{t3}$$</p>

<p>I'm asked to find a predictive CI at 95% confidence for the mean of $y_0$, when $x_{02}=250$, and $x_{03}=8$. We're to assume that $s^2 x_0(X^TX)^{-1}x_0^T=0.000243952$, where $x_0=(250,8)$.</p>

<p>I have a solution from a previous year, that goes like this:</p>

<blockquote>
  <p>I find the CI of the form 
  $\text{CI}(E[ln(y_0)|x_0])=\left[\hat\ln(y_t)-t_{\alpha/2}s_E,\hat \ln(y_t)+t_{\alpha/2}s_E\right]$, where $t$ is
  the $\alpha/2$ upper-quantile of distribution $t(n-k)$ and
  $s_E=\sqrt{0.000243952}$. This gives me $[7.1563,7.2175]$.</p>
  
  <p>Then the author does
  $\text{CI}(E[y_0|x_0])=[e^{7.1563},e^{7.2175}]=[1282.158,1363.077]$.</p>
</blockquote>

<p>I disagree with this last step (by Jensen's inequality we'll underestimate). In Wooldridge's Intro to Econometrics, in page 212, he states that if we're sure the error terms are normal, then a consistent estimator is:</p>

<p>$$\hat E[y_0|x_0]=e^{s^2/2}e^{\hat \ln(y_0)}$$ </p>

<p>So, I was thinking of doing </p>

<p>$$\text{CI}(E[y_0|x_0])=\left[e^{s^2/2} 1282.158,e^{s^2/2}1363.077 \right] = \left[ 1282.314,1363.243 \right] $$</p>

<p>Is this correct?</p>

<p>Also, the solution to this exercise states that $\text{CI}(E[y_0|x_0])=[624.020,663.519]$, which is far from either solution I've got.</p>

<p>Any help would be appreciated.</p>

<p>P.S: I've also read that the correction should not be used to the CI but only for the point estimation $\hat E[y_0|x_0]$</p>

<econometrics><prediction>
Predicting $y$ when response variable is $\ln(y)$
An old man in the sea.
# Predicting $y$ when response variable is $\ln(y)$

(Asked by: username_0 on 2017-05-02)

My estimated model is

$$\hat \ln(y\_t)=9.873-0.472\ln(x\_{t2})-0.01x\_{t3}$$

I'm asked to find a predictive CI at 95% confidence for the mean of $y\_0$, when $x\_{02}=250$, and $x\_{03}=8$. We're to assume that $s^2 x\_0(X^TX)^{-1}x\_0^T=0.000243952$, where $x\_0=(250,8)$.

I have a solution from a previous year, that goes like this:

> I find the CI of the form
> $\text{CI}(E[ln(y\_0)|x\_0])=\left[\hat\ln(y\_t)-t\_{\alpha/2}s\_E,\hat \ln(y\_t)+t\_{\alpha/2}s\_E\right]$, where $t$ is
> the $\alpha/2$ upper-quantile of distribution $t(n-k)$ and
> $s\_E=\sqrt{0.000243952}$. This gives me $[7.1563,7.2175]$.
>
> Then the author does
> $\text{CI}(E[y\_0|x\_0])=[e^{7.1563},e^{7.2175}]=[1282.158,1363.077]$.

I disagree with this last step (by Jensen's inequality we'll underestimate). In Wooldridge's Intro to Econometrics, in page 212, he states that if we're sure the error terms are normal, then a consistent estimator is:

$$\hat E[y\_0|x\_0]=e^{s^2/2}e^{\hat \ln(y\_0)}$$

So, I was thinking of doing

$$\text{CI}(E[y\_0|x\_0])=\left[e^{s^2/2} 1282.158,e^{s^2/2}1363.077 \right] = \left[ 1282.314,1363.243 \right] $$

Is this correct?

Also, the solution to this exercise states that $\text{CI}(E[y\_0|x\_0])=[624.020,663.519]$, which is far from either solution I've got.

Any help would be appreciated.

P.S: I've also read that the correction should not be used to the CI but only for the point estimation $\hat E[y\_0|x\_0]$

**Tags:** econometrics, prediction


---

## 3 answers

### Answer by username_3 on 2017-05-02. Score: 3 | Accepted answer

You do not find the same answer because of what I suspect to be a typographical error, which would thus be the main reason of your problem: $x\_{03}$ would be set to $80$, not $8$. Another possibility, if you keep $x\_{03}=8$, is an error in the second estimated coefficient, say, $\hat{\beta}\_2 = -0.1$ instead of $-0.01$.

Anyway, one of these modifications solves everything and yields the same result as the solution to this exercise.

Considering this change, with $t\_{\alpha/2}=1.96476138969835$, one gets

### Method 1

$\text{CI}(E[y\_0|x\_0])=[e^{6.43618291164626},e^{6.49755798189177}]=[624.020307335178,663.519326788772]$
**(the given solution to this exercise)**

or

### Method 2

(as stated In Wooldridge's Intro to Econometrics, in page 212) if we're sure the error terms are normal (and one is extremely lucky)

$$\text{CI}(E[y\_0|x\_0])=\left[e^{s^2/2}624.0203,e^{s^2/2}663.5193 \right] = \left[ 624.0960,663.6002 \right] $$

## however

the **method 2** is very unlikely to be correct, since as you mention in your question *[...] the (underestimation) correction should not be used to the CI but only for the point estimation.*

Why ? I would say because of the dependency betweeen the two terms, knowing the expectations of $e^{s^2/2}$ on the one hand and $\hat{y\_0}$ on the other hand does not mean one knows the one of $e^{\frac{s^2}{2} + \hat{\ln(y\_0)}}$.


---

### Answer by username_1 on 2017-05-03. Score: 2

Point prediction and CI are different.

For point prediction, we are better off by correcting the bias as much as possible. For CI, what is required from the beginning is that the probability equals $100(1-\alpha)\%$. When $[a,b]$ is the 95% CI for $\ln(y\_0)$ for example, $[e^a,e^b]$ is certainly a 95% CI for $y\_0$ because $P(a\le \ln X\le b) = P(e^a \le X \le e^b)$. So your $[e^{7.1563}, e^{7.2175}]$ is certainly a valid CI.

But the center of this CI is neither the naive predictor (exp[predictor of $\ln y\_0$]) nor the corrected predictor of $y\_0$ (a correction factor times the naive predictor) due to Jensen's inequality, but it does not really matter. In some cases (not always), you may be able to change the CI to $[e^{a-p}, e^{b-q}]$ for some $p$ and $q$ so that the probability is still 95% and its center is the bias-corrected predictor, but I don't see the point in it.

What you suggested, i.e., $[e^{s^2/2}e^a,e^{s^2/2}e^b]$ is not a 95% CI. To see why, let the correction factor be $h$ (nonrandom and perfectly known, for simplicity), so the bias-corrected predictor is $he^{\theta}$, where $\theta$ is the unbiased predictor of $\ln y\_0$ ($\hat\beta\_0 + \hat\beta\_2 \ln x\_2 + \hat\beta\_3 x\_3$ in your example). This "$h$" can be estimated by $e^{s^2/2}$ for example, but while the latter is random, $h$ is assumed nonrandom in order to make it simple. Let $[a,b]$ be the 95% CI for $\ln y\_0$, i.e., $P(a\le \ln y\_0\le b)=0.95$. Then,
$$
P(he^a \le y\_0 \le he^b) = P(\ln h+a \le \ln y\_0 \le \ln h+b),
$$
which is *not* equal to $P(a\le \ln y\_0\le b)=0.95$ unless the distribution of $\ln y\_0$ is uniform, which is usually not.

**EDIT**

The above is about the CI of $y\_0$, not of $E(y|X=x\_0)$. The original question is about the CI for $E(y|X=x\_0)$. Let $E(y|X=x\_0) = h\exp(x\_0\beta)$, which is estimated by $\hat{h} \exp(x\_0 \hat{\beta})$. In that case, I think the Delta method is a useful option (see username_2's answer).

To be rigorous, we need the joint distribution of $\hat{h}$ and $\hat\beta$, or to be precise, the asymptotic distribution of the vector $\sqrt{n}[(\hat\beta-\beta)', \hat{h}-h]'$. Then the limit distribution of $\sqrt{n}[\hat{h} \exp(x\_0\hat{\beta}) - h\exp(x\_0\beta)]$ is derived using the Delta method and then CI's for $h\exp(x\_0\beta)$ can be constructed.

> **Comments:**
> **username_0**: Thanks for you answer Chan. By the way, in this exercise, the point estimator for either $y_0$ or $E(y|X_0)$ is equal. The resulting estimate is outside the CI for $E(y|X_0)$ but inside the CI for $y_0$. Shouldn't they both be inside their CI?  
> **username_0**: Yes, it helps. Could you check this question of mine. It's related to this.   https://economics.stackexchange.com/questions/16891/prediction-interval-for-eyx-0-when-model-is-in-lny  
> **username_1**: In a comment I made and deleted, I made a mistake. $E(y|X=x_0)$ is of course different from $\exp\{E(\log y|X=x_0)\}$ as the answer by Alecos Papadopoulos to your question states. Many thanks @Anoldmaninthesea, and sorry about that. I was perhaps thinking that $\exp(x_0{\hat\beta})$ is sufficiently close to $\exp(x_0 \beta)$, which is not what you raised. Hmm, in that case your remark is even more interesting.  
> **username_1**: I've never thought about this issue. I will now. So it is about the CI for $E(y|X=x_0)$. The Delta method explained by username_2 looks useful in this case. Thank you @Anoldmaninthesea for raising it.  
> **username_0**: Chan, I've linked another question of mine to this one. In there, you'll find an answer I've written which you might find interesting.  
> **username_1**: @Anoldmaninthesea. So your answer to the other question evaluates the bias and variance under the normality assumption. Fair enough. Thanks for sharing it. It looks useful.  

---

### Answer by username_2 on 2017-05-02. Score: 1

Use the [Delta Method](http://www.indiana.edu/~jslsoc/stata/ci_computations/spost_deltaci.pdf). Say the large samples asymptotic distribution of a **single** parameter $\beta$ is:

$$ \hat{\beta} \xrightarrow{a} N\left(\beta,\frac{Var(\hat{\beta})}{n}\right) $$

(assuming your estimation is consistent)

Furthermore, you are interested in a function of $\hat{\beta}$, say, $F(\hat{\beta})$. Then, a first order Taylor *approximation* of the above leads to the following asymptotic distribution:

$$ F(\hat{\beta}) \xrightarrow{a} N\left(F(\beta),\left(\frac{\partial F(\hat{\beta})}{\partial \hat{\beta}}\right)^2\frac{Var(\hat{\beta})}{n}\right) $$

In your case, $F(\hat{\beta})$ is $e^\hat{\beta}$. From here, you can construct the CI as normal.

Source and more details in the linked document.

> **Comments:**
> **username_0**: lucho, I cannot use the Delta method for this... but thanks anyway. ;)  
> **username_2**: :o why not? Any assumption I misread or not stated?  
> **username_0**: It's just not the point of the exercise. I'm really interested in knowing which of the method is correct. Also, your method gives an approximate distribution, whereas in the exercise they want an exact CI.  

---

