(a)
R-code:
attach(tornadoesinUS)
plot(wt, mpg, main="Scatterplot Example",
xlab="Year ", ylab="Number of tornadoes ", pch=62)
Following is the scatter plot of the data:
Scatter plot shows that there is a strong linear and positive relationship between the variables. There is no outliers.
(b)
Independent variable, X: year
Dependent variable, Y: number of tornadoes
Following is the output of linear regression:
The regression line is:
y' = -24542.4387 + 12.8473* x
(c)
It is not mistake. Intercept is large because value of independent variable year is large.
(d)
R-code:
> plot(torndoseinUS, eruption.res,
+ ylab="Residuals", xlab="year",
+ main="torndoesinUS")
> abline(0, 0)
Following is the residual plot:
It shows a random pattern. That is we can assume that condition for regression has been full-filled and it is a good fit.
Residual table;
Observation | Number of tornadoes | Predicted | Residual |
1 | 421.0 | 548.4 | -127.4 |
2 | 550.0 | 561.3 | -11.3 |
3 | 593.0 | 574.1 | 18.9 |
4 | 504.0 | 587.0 | -83.0 |
5 | 856.0 | 599.8 | 256.2 |
6 | 564.0 | 612.7 | -48.7 |
7 | 604.0 | 625.5 | -21.5 |
8 | 616.0 | 638.4 | -22.4 |
9 | 697.0 | 651.2 | 45.8 |
10 | 657.0 | 664.1 | -7.1 |
11 | 464.0 | 676.9 | -212.9 |
12 | 704.0 | 689.8 | 14.2 |
13 | 906.0 | 702.6 | 203.4 |
14 | 585.0 | 715.4 | -130.4 |
15 | 926.0 | 728.3 | 197.7 |
16 | 660.0 | 741.1 | -81.1 |
17 | 608.0 | 754.0 | -146.0 |
18 | 653.0 | 766.8 | -113.8 |
19 | 888.0 | 779.7 | 108.3 |
20 | 741.0 | 792.5 | -51.5 |
21 | 1,102.0 | 805.4 | 296.6 |
22 | 947.0 | 818.2 | 128.8 |
23 | 920.0 | 831.1 | 88.9 |
24 | 835.0 | 843.9 | -8.9 |
25 | 852.0 | 856.8 | -4.8 |
26 | 788.0 | 869.6 | -81.6 |
27 | 852.0 | 882.5 | -30.5 |
28 | 866.0 | 895.3 | -29.3 |
29 | 783.0 | 908.2 | -125.2 |
30 | 1,046.0 | 921.0 | 125.0 |
31 | 931.0 | 933.9 | -2.9 |
32 | 907.0 | 946.7 | -39.7 |
33 | 684.0 | 959.5 | -275.5 |
34 | 764.0 | 972.4 | -208.4 |
35 | 656.0 | 985.2 | -329.2 |
36 | 702.0 | 998.1 | -296.1 |
37 | 856.0 | 1,010.9 | -154.9 |
38 | 1,133.0 | 1,023.8 | 109.2 |
39 | 1,132.0 | 1,036.6 | 95.4 |
40 | 1,298.0 | 1,049.5 | 248.5 |
41 | 1,176.0 | 1,062.3 | 113.7 |
42 | 1,082.0 | 1,075.2 | 6.8 |
43 | 1,235.0 | 1,088.0 | 147.0 |
44 | 1,173.0 | 1,100.9 | 72.1 |
45 | 1,148.0 | 1,113.7 | 34.3 |
46 | 1,449.0 | 1,126.6 | 322.4 |
47 | 1,340.0 | 1,139.4 | 200.6 |
48 | 1,075.0 | 1,152.3 | -77.3 |
49 | 1,215.0 | 1,165.1 | 49.9 |
50 | 934.0 | 1,178.0 | -244.0 |
51 | 1,374.0 | 1,190.8 | 183.2 |
52 | 1,817.0 | 1,203.6 | 613.4 |
53 | 1,265.0 | 1,216.5 | 48.5 |
54 | 1,103.0 | 1,229.3 | -126.3 |
55 | 1,096.0 | 1,242.2 | -146.2 |
56 | 1,692.0 | 1,255.0 | 437.0 |
57 | 1,166.0 | 1,267.9 | -101.9 |
58 | 1,282.0 | 1,280.7 | 1.3 |
59 | 1,691.0 | 1,293.6 | 397.4 |
60 | 938.0 | 1,306.4 | -368.4 |
61 | 907.0 | 1,319.3 | -412.3 |
62 | 888.0 | 1,332.1 | -444.1 |
Question 3 is the same as 10.19 below, they are just for reference. Please do question...