00:01
All right, we're told to generate 100 samples, n is 100, from x, the distribution x, which is normally distributed with a mean of zero.
00:11
And this number is the variance.
00:15
Because traditionally you have the parameters of this, mu and sigma squared, that's your variance.
00:21
And we're going to simulate using r.
00:23
And then with that, we're also going to simulate y, a bunch of yis.
00:29
And y i's are going to be equal to 2 .5 minus 1 .0 times x i so all these samples for each of the samples here and then i or x oh then we're going to do plus i where i itself it's going to be an error term so it'll be error i i've searched that the epsilon i is normally distributed with a mean of zero and a variance of three.
01:18
And we're going to use r to do all this.
01:20
So if these are the variances, just so we know the standard deviations are equal to the square root of those values.
01:27
So the same deviation of x, same deviation of this error term is going to be root 3.
01:33
All right, and we've gone ahead to, if i've done that already, in r, here's the code.
01:41
X, r norm, and this is the number of samples, the mean of zero.
01:45
The standard deviation is the square root of 2, back to the 0 .5, is that, run it.
01:51
Y, this is defined with that function...