# Confidence interval for variance in simple regression model

I am attempting to create a confidence interval for $\sigma^2$ in simple regression model $$Y_i = \beta_0 + \beta_1 x_i + \epsilon_i , \ \ \epsilon_i \sim \text{ Normal(0, \sigma^2)}$$ We know that $$\frac{(n-2)S^2}{\sigma^2}$$ Has chi-squared distribution with $n-2$ degrees of freedom, which allows for us to create such confidence intervals. However, I am unsure what to do in the case when $S^2$, given by $$\frac{1}{n-2}\sum_{i=1}^n(Y_i - \hat{\beta}_0 - \hat{\beta}_1x_i)^2$$ Is actually exactly $0$ in the given sample data. In other words, the data presented perfectly fits a straight line. Any advice for how to proceed is much appreciated. Thank you.

• If there is a perfect fit, there isn't any confidence interval to compute, since there is no stochasticity. That would be my intuition. – user89073 Mar 1 '16 at 10:48
• Welcome to the site. Could you provide some background on the circumstances that produced $S^2=0$ (which is unusual for real-life data), eg sample size, whether the variables are continuous or discrete and, if continuous, whether there was any rounding of values? – Adam Bailey Mar 1 '16 at 16:42
• Hello Adam, I was actually given this question on an assignment. The numbers were likely drawn up by the professor himself. The data is discrete, with a sample size of 6. I can only assume there was no rounding involved. – Harrison Mar 1 '16 at 17:38
• If this is from an assignment you should give your question the Homework tag. Homework questions are welcome but the site policy is to respond to them by giving hints rather than complete answers. – Adam Bailey Mar 1 '16 at 17:49

1. How can the distribution formula be rearranged to give the distribution of $S^2$ in terms of $\sigma^2$?
2. What are the mean and variance of the distribution of $S^2$?
3. Assuming $\sigma^2$ is unknown, as a preliminary to 4 below pick a value for it and find the implied upper and lower 5% (say) confidence limits. Is zero within these limits?
4. Are there values of $\sigma^2$ that would result in zero being within the confidence limits? If yes, what range of values? If no, what follows?