In: Statistics and Probability
Consider the simple linear regression model y = 10+25x+e where the random error term is normally and independently distributed with mean zero and standard deviation 2. Do NOT use software, generate a sample of eight observations, one each at the levels x = 10, 12, 14, 16, 18, 20, 22, and 24.
DO NOT USE SOFTWARE!
A.Fit the linear regression model by least squares and find the
estimates of the slope and intercept.
B.Find the estimate of s^2.
C. Find the standard errors of the slope and intercept.
D. do NOT use software, generate a sample of 16 observations, two each at the same levels of x used previously. Fit the model using least squares.
E. Find the estimate of s2 for the new model in part (d). Compare this to the estimate obtained in part (b). What impact has the increase in sample size had on the estimate?
F. Find the standard errors of the slope and intercept using the new model from part (d). Compare these standard errors to the ones that you found in part (c). What impact has the increase in sample size had on the estimated standard errors?
a) The least squares estimates of the intercept and slope in the simple linear regression model are
Using the data point x = 10, 12, 14, 16, 18, 20, 22, and 24. and equation y = 10+25x+e
e is normally distributed with mean 0 and standard deviation of 2. Since we need to do it manually without software. I have picked random values ranging from -6 to 6.
X | e | Y | X^2 | Y^2 | XY | |
1 | 10 | 2.820463 | 262.8205 | 100 | 69074.6 | 2628.205 |
2 | 12 | 0.666063 | 310.6661 | 144 | 96513.4 | 3727.993 |
3 | 14 | -0.10547 | 359.8945 | 196 | 129524.1 | 5038.523 |
4 | 16 | -0.40763 | 409.5924 | 256 | 167765.9 | 6553.478 |
5 | 18 | -5.68276 | 454.3172 | 324 | 206404.2 | 8177.71 |
6 | 20 | -1.26842 | 508.7316 | 400 | 258807.8 | 10174.63 |
7 | 22 | -3.15955 | 556.8404 | 484 | 310071.3 | 12250.49 |
8 | 24 | 0.943738 | 610.9437 | 576 | 373252.3 | 14662.65 |
mean | 17 | -0.7742 | 434.2258 | 310 | 201426.7 | 7901.71 |
Sum | 136 | -6.19357 | 3473.806 | 2480 | 1611413 | 63213.68 |
the predicted least square model is
B. Find the estimate of s^2.
The formula for calculating error sum of square and estimate of s^2 is as follows
using the predicted least square model is , we calculated respective y values
Count | Y | y hat | e | e^2 |
1 | 262.8205 | 260.9354 | 1.885111 | 3.553644 |
2 | 310.6661 | 310.4469 | 0.219154 | 0.048028 |
3 | 359.8945 | 359.9585 | -0.06394 | 0.004088 |
4 | 409.5924 | 409.47 | 0.12235 | 0.014969 |
5 | 454.3172 | 458.9816 | -4.66434 | 21.75605 |
6 | 508.7316 | 508.4931 | 0.238436 | 0.056852 |
7 | 556.8404 | 558.0047 | -1.16425 | 1.355485 |
8 | 610.9437 | 607.5163 | 3.427481 | 11.74763 |
SUM | 38.53674 |
C. Find the standard errors of the slope and intercept.
In simple linear regression, the estimated standard error of the slope and the estimated standard error of the intercept are
X | x - x mean | (x - x mean)^2 | X^2 | |
1 | 10 | -7 | 49 | 100 |
2 | 12 | -5 | 25 | 144 |
3 | 14 | -3 | 9 | 196 |
4 | 16 | -1 | 1 | 256 |
5 | 18 | 1 | 1 | 324 |
6 | 20 | 3 | 9 | 400 |
7 | 22 | 5 | 25 | 484 |
8 | 24 | 7 | 49 | 576 |
mean | 17 | 0 | 21 | 310 |
sum | 136 | 0 | 168 | 2480 |
d) generate a sample of 16 observations, two each at the same levels of x used previously. Fit the model using least squares.
X | e | Y | X^2 | Y^2 | XY | |
1 | 10 | 5.175403 | 265.1754 | 100 | 70317.99 | 2651.754 |
2 | 10 | -0.56329 | 259.4367 | 100 | 67307.41 | 2594.367 |
3 | 12 | -0.80382 | 309.1962 | 144 | 95602.28 | 3710.354 |
4 | 12 | -0.75815 | 309.2418 | 144 | 95630.52 | 3710.902 |
5 | 14 | -0.95333 | 359.0467 | 196 | 128914.5 | 5026.653 |
6 | 14 | 1.87862 | 361.8786 | 196 | 130956.1 | 5066.301 |
7 | 16 | 1.949255 | 411.9493 | 256 | 169702.2 | 6591.188 |
8 | 16 | 1.142205 | 411.1422 | 256 | 169037.9 | 6578.275 |
9 | 18 | -1.26444 | 458.7356 | 324 | 210438.3 | 8257.24 |
10 | 18 | 1.37192 | 461.3719 | 324 | 212864 | 8304.695 |
11 | 20 | -0.19699 | 509.803 | 400 | 259899.1 | 10196.06 |
12 | 20 | 1.891849 | 511.8918 | 400 | 262033.3 | 10237.84 |
13 | 22 | -0.19273 | 559.8073 | 484 | 313384.2 | 12315.76 |
14 | 22 | -4.55689 | 555.4431 | 484 | 308517 | 12219.75 |
15 | 24 | -0.15097 | 609.849 | 576 | 371915.8 | 14636.38 |
16 | 24 | 3.524011 | 613.524 | 576 | 376411.7 | 14724.58 |
mean | 16.53333 | 0.264576 | 423.5979 | 292.2667 | 191101.4 | 7473.167 |
Sum | 248 | 3.968634 | 6353.969 | 4384 | 2866521 | 112097.5 |
y = 11.74769 + 24.92474