0
$\begingroup$

I have a model $Y_i= \beta_0 + \beta_1X_i+\beta_2X_i^2+\beta_3X_i^3+\epsilon_i$ with $\epsilon_i\sim\mathcal{N}(0,\sigma^2)$. Is the following formula correct for calculating the width of a 95% prediction interval for a new datapoint $x_{new}$:

$2 \times t_{0.975,n-4} \sigma_p$,

where $\sigma_p^2=\sigma^2[x_{new}(X^tX)^{-1}x_{new}+1]$ and $X$ is the design matrix.

If I have only 4 points in the design matrix ($n=4$), it means I need to take a quantile of a t-distribution with 0 degrees of freedom. There must be something wrong with my formula.

Please help me.Thank you very much!

$\endgroup$
  • 1
    $\begingroup$ The formula is correct as long as all assumptions of OLS are fulfilled. If you have only four observations and four parameters, then you have perfect fit. Performing statistical inference is useless in such a case. $\endgroup$ – Michael M Apr 20 '15 at 17:48
1
$\begingroup$

It is not correct, the width of the interval is $$ 2\times t_{0.975, n-p}\sigma_p, $$ i.e., without the square.

You'll need at least one more observation, or you must drop a term from your polynomial.

$\endgroup$
  • $\begingroup$ Thanks! I've corrected it, but it doesn't answer my question. If I have 4 points, I can estimate all 4 beta parameters. Why do I need the 5th one? I still suspect it's something wrong with the quantile $\endgroup$ – user2575760 Apr 20 '15 at 11:37
  • $\begingroup$ Your models eats all your degrees of freedom and there is nothing left for the residual. The sample standard deviation of your residual approaches infinity when the degrees of freedom of the residual approaches zero. You need to free a parameter (remove a term in the polynomial) or add another constraint (another sample). $\endgroup$ – Tommy L Apr 20 '15 at 11:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.