# How to find the confidence interval for a new Y point? [duplicate]

In a linear regression model, as Y is the target and X are predictive features,the CI for $$E[Y_{new}|X_{new}]$$ is as follows:

Assuming $$X_{new}$$ is given, $$X_{new}$$ is the new data given for a target label $$Y_{new}$$, and that $$C = (X^t X)^{-1}$$

$$\hat{E}[Y_{new}|X_{new}] = \hat{Y}_{new} = \hat{\beta}^t X_{new}$$

It can be show that $$E[\hat{Y}_{new}] = \beta_{0}^t X_{new}$$

thus $$\hat{Y}_{new}$$ is an unbiased estimator.

$$Var(\hat{Y}_{new}) = Var(\hat{\beta}^t X_{new})$$

$$X_{new}$$ is a vector, hence if we want to get it out of the Var(), we neet to put it on the right and on the left as transpose, like this:

$$Var(\hat{Y}_{new}) = X^t_{new}Var(\hat{\beta})X_{new} = \sigma_{\epsilon}^2 X_{new}^t C X_{new}$$

$$\hat{s.e}(\hat{Y}_{new}) = \sqrt{\hat{\sigma}^2_{\epsilon}X^t_{new}CX_{new}}$$

Thus, a confedence interval for the expectation $$E[Y_{new}]$$ is:

$$\hat{Y}_{new} \pm z_{\alpha / 2} \hat{s.e}(\hat{Y}_{new})$$

This is the CI for the expected value. How do I find the CI for the $$Y_{min}$$ itself? cause that would also include the noise.

This pictue shows more or less the difference, between CI for the expected value of $$Y_{min}$$ and the CI for $$Y_{min}$$ (The difference is basically the noise): 