I have to generate a sample $(X_i,Y_i,W_i), i=1,...,1000$ from a trivariate Normal distribution with mean $(0,1,2)$ and covariance matrix $\begin{bmatrix}1 & 1 & 1.7\\& 2 & 1.5\\ & & 4\end{bmatrix}$. Then, I have to fit the regression model $Y=\beta_0+\beta_1X+\epsilon$ and calculate Bias and MSE of the estimators of $\beta_0, \beta_1$ and $\sigma^2$. For that, I need the true values. I know how to calculate $\beta_0$ and $\beta_1$, but how can I get the true value of $\sigma^2$?
Asked
Active
Viewed 44 times
0
-
Please explain how $W$ might be related to the regression model you wrote, which doesn't include $W$ at all. – whuber Jan 15 '20 at 14:23
-
$W$ is not related to the model. It is relevant for a different part of the exercise, but for the regression, only $Y$ and $X$ are used. – user9221034 Jan 15 '20 at 15:13
-
In that case https://stats.stackexchange.com/questions/71260 provides several ways to find $\sigma^2.$ Alternatively, use your values of the $\beta_i$ to compute $\operatorname{Var}(Y - \beta_0 - \beta_1 X) = \operatorname{Var}(\epsilon) = \sigma^2.$ – whuber Jan 15 '20 at 16:04
-
Thank you very much, that definitely brought me closer to the solution. I'm still not exactly sure whether I got it, though. You write that for a bivariate distribution, the conditional variance of $Y|X$ is $\sigma^2_y(1-\rho^2)$. Can I apply this in this case? After all, it is a trivariate distribution although I'm only using two of the variables. – user9221034 Jan 15 '20 at 16:48
-
As you stated earlier, this is not a trivariate distribution: you are ignoring $W$ altogether. The only relevant information concerns the bivariate distribution of $(X,Y)$ which you can read directly off the information given in the question. – whuber Jan 15 '20 at 16:49