Microsoft Word - Homework assignment 1.docx 1 Homework Assignment 1 Problem 1 The following data show Days = number of rainy days and Temp = temperature for a sample of 10. Days Temp XXXXXXXXXX...

1 answer below »
any graphs should be done in Ror R Studio



Microsoft Word - Homework assignment 1.docx 1    Homework Assignment 1 Problem 1 The following data show Days = number of rainy days and Temp = temperature for a sample of 10. Days Temp 169.6 71.2 166.8 58.2 157.1 56.0 181.1 64.5 158.4 53.0 165.6 52.4 166.7 56.8 156.5 49.2 168.1 55.6 165.3 77.8 a) Draw a scatterplot of number of rainy days (vertical axis) versus temperature (horizontal axis), and explain if a linear regression model will work for these data? b) Calculate the estimates of 1 and 2 and complete their t-tests, i.e. check the null hypothesis that 1=0 and 2=0. What are the p-values for these tests? c) Compute the F-statistic for this regression, and show that F = t2, taking the t value found in Part (b). Problem 2 Sometimes linear regression models are represented in a different form called the deviations from the sample average form. This is shown as: yi = β0 + β1xi + εi yi = β0 + β1x̄ + β1xi − β1x̄ + εi = (β0 + β1x̄) + β1(xi − x̄) + εi = α + β1(xi − x̄) + εi where α = β0 + β1x̄.   a) Explain the meaning of α? b) If the residual sum of squares is given as prove that the least squares estimates are: where 2    Problem 3 Sometimes the intercept in a mean function is known in advance to be zero. In such cases the mean function can be expressed as: E(y|x) = β1x Thus, the residual sum of squares is can be given as: a) Prove that the LSE of β1 is . Also, show that it is unbiased and its variance is b) Using the following data run a regression and find the LSE of β1 and σ2. Construct a 95% confidence interval for β1. Test the null hypothesis that the intercept is equal to zero. c) Show a plot of the residuals versus the fitted values. Discuss the appropriateness of using a mean function with zero intercept. Problem 4 The relationship between per capita GDP and birth rate is being analyzed by an international panel of scientists. The database is available for about 200 regions. a) Use base-ten logarithms to compute the linear regression model. b) Show the summary graph, and plot the fitted line. c) Test the null hypothesis to check if the slope is zero by specifying the significance level of the test. d) Show the values of R2 and adjusted R2, and explain the meaning. e) Show two regions with lowest and highest birth rate values. Also, identify two regions with the largest positive residuals and two regions with the largest negative residuals when both variables are measured in log scale.   3    Region Birth Rate Per capita GDP Region Birth Rate Per capita GDP Afghanistan 6.8 98 Lesotho 3.84 419 Albania 2.28 1317 Liberia 6.8 256 Algeria 2.8 1784 Libya 3.02 5099 Angola 7.2 739 Liechtenstein 1.64 34504 Argentina 2.44 7163 Lithuania 1.25 3442 Armenia 1.15 687 Luxembourg 1.73 43041 Australia 1.7 18788 Madagascar 5.7 278 Austria 1.28 23260 Malawi 6.1 129 Azerbaijan 2.1 695 Malaysia 2.9 3748 Bahamas 2.29 14856 Maldives 5.33 1947 Bahrain 2.66 12012 Mali 7 200 Bangladesh 3.46 345 Malta 1.77 9245 Barbados 1.5 9255 Marshall Is 3.68 1938 Belarus 1.2 1217 Martinique 1.9 10723 Belgium 1.66 22351 Mauritania 5.79 353 Belize 3.15 3123 Mauritius 1.95 3787 Benin 5.66 361 Mexico 2.5 6150 Bermuda 1.67 44579 Micronesia 3.8 2215 Bhutan 5.02 241 Mongolia 2.42 417 Bolivia 3.82 935 Morocco 2.75 1145 Bosnia-Herzegovina 1.3 1117 Mozambique 5.63 196 Botswana 3.7 2872 Namibia 4.56 1639 Brazil 2.21 2888 Nepal 4.26 226 Brunei 2.48 12435 Netherlands 1.72 23785 Bulgaria 1.1 1622 Neth. Antilles 2.05 12149 Burkina Faso 6.68 203 New Caledonia 2.45 15750 Burundi 6.8 107 New Zealand 2.01 13185 Cambodia 4.77 233 Nicaragua 3.75 489 Cameroon 4.61 557 Niger 8 176 Canada 1.48 22385 Nigeria 5.42 435 Cape Verde 3.3 1259 Norway 1.8 36445 Central African Rep 4.92 242 Oman 4.96 7421 Chad 6.65 127 Pakistan 5.08 418 Chile 2.35 3992 Palau 3 6179 China 1.83 918 Panama 2.7 3391 Hong Kong 1 23499 Papua New Guinea 4.09 545 Macao 1.1 14281 Paraguay 3.84 1286 Colombia 2.62 1900 Peru 2.86 2053 Comoros 4.9 278 Philippines 3.18 924 Congo 6.29 779 Poland 1.26 4657 Cook Islands 3.5 4388 Portugal 1.45 10944 Costa Rica 2.28 4148 Puerto Rico 1.89 19083 Cote d Ivoire 4.73 637 Qatar 3.22 30493 Croatia 1.65 4558 Moldova 1.4 346 Cuba 1.55 2545 Reunion 2.3 9188 Cyprus 1.9 11449 Romania 1.32 1698 Czech Rep 1.16 5501 Russia 1.14 2139 Dem Rep Congo 6.7 138 Rwanda 5.74 205 Denmark 1.77 30265 Saint Kitts and Nevis 2.41 8426 Djibouti 5.7 819 Saint Lucia 2.27 4994 Dominican Rep 2.71 2500 St Vincent/Grenadines 2.23 2940 Ecuador 2.76 1425 Samoa 4.12 1402 Egypt 3.29 1390 Sao Tome and Principe 3.99 312 El Salvador 2.88 2189 Saudi Arabia 4.53 7724 Equatorial Guinea 5.89 3940 Senegal 4.97 479 Eritrea 5.43 177 Serbia and Montenegro 1.65 1008 Estonia 1.22 4010 Seychelles 2 7850 Ethiopia 6.14 90 Sierra Leone 6.5 164 Fiji 2.88 2046 Singapore 1.36 20755 Finland 1.73 23456 Slovakia 1.28 3767 France 1.89 21990 Slovenia 1.14 9463 Fr Guiana 3.33 7737 Solomon Islands 4.42 760 Fr Polynesia 2.44 13891 Somalia 7.25 110 Gabon 3.99 3379 South Africa 2.61 2550 Gambia 4.7 300 Spain 1.15 14234 Georgia 1.4 601 Sri Lanka 2.01 827 Germany 1.35 22418 Sudan 4.39 376 Ghana 4.11 265 Suriname 2.45 1965 Greece 1.27 10727 Swaziland 4.54 1204 Guadeloupe 2.1 10323 Sweden 1.64 23680 Guatemala 4.41 1717 Switzerland 1.41 34449 Guinea 5.82 375 Syria 3.32 4976 Guinea-Bissau 7.1 174 Tajikistan 3.06 172 Guyana 2.31 936 Thailand 1.93 1858 Haiti 3.98 431 Macedonia 1.9 1723 Honduras 3.72 960 Timor-Leste 3.85 438 Hungary 1.2 5209 Togo 5.33 273 Iceland 1.95 27281 Tonga 3.71 1284 India 3.01 467 Trinidad and Tobago 1.55 6817 Indonesia 2.35 678 Tunisia 2.01 2077 Iran 2.33 5645 Turkey 2.43 2136 Ireland 1.9 26725 Turkmenistan 2.7 1263 Israel 2.7 18816 Uganda 7.1 239 Italy 1.23 18928 Ukraine 1.15 763 Jamaica 2.36 2990 United Arab Emirates 2.82 19816 Japan 1.32 32540 United Kingdom 1.6 24186 Jordan 3.57 1726 Tanzania 5.11 263 Kazakhstan 1.95 1441 USA 2.11 34788 Kenya 4 367 Uruguay 2.3 5514 Kiribati 3.8 468 Uzbekistan 2.44 418 N Korea 1.41 571 Vanuatu 4.13 1085 S Korea 2.02 8955 Venezuela 2.72 5009 Kuwait 2.66 16782 Vietnam 2.3 416 Kyrgyzstan 2.64 306 Yemen 7.01 431 Laos 4.78 324 Zambia 5.64 345 Latvia 1.1 3212 Zimbabwe 3.9 703 Lebanon 2.18 5087 4    Problem 5 For the following snowfall data, test the null hypothesis that the slope is equal to zero. Illustrate that t2 = F, i.e. the t-test of the null hypothesis is the same as the F-test. Year Early snow Late snow Year Early snow Late snow 1900 3 44.5 1947 28.5 34.7 1901 15.8 12.5 1948 27.5 34.5 1902 13.1 36.8 1949 4.2 21.5 1903 4 7.6 1950 7.5 26.7 1904 1 28.7 1951 21.8 24.4 1905 10.5 28.3 1952 12.9 35.7 1906 27.5 49.7 1953 7.1 17.2 1907 7 15.1 1954 11.4 38.5 1908 28.7 51.2 1955 16.5 46.5 1909 19.9 5.9 1956 14.2 43.2 1910 6.1 33 1957 4 28.3 1911 14.2 54.1 1958 21.8 44.8 1912 10.3 28
Answered 1 days AfterFeb 13, 2021

Answer To: Microsoft Word - Homework assignment 1.docx 1 Homework Assignment 1 Problem 1 The following data...

Shweta answered on Feb 14 2021
133 Votes
3.1
3.2
> # to import given data
> library(readxl)
> Data1 <- read_excel("E:/Project/Data1.xlsx")
> View(Data1)
> Data1
#
A tibble: 17 x 2
X Y

1 23.1 10.5
2 31.8 18.2
3 30.4 16.3
4 39.5 23.1
5 52.5 24.9
6 30.5 14.1
7 12.4 8.8
8 31.5 14.9
9 27.6 16.1
10 32.8 16.7
11 32 17
12 24 10.5
13 24.2 12.4
14 37.9 22.8
15 25.1 12.9
16 35.1 17.4
17 21.1 10.5
> attach(Data1)
> mod=lm(Y~X)
> mod
Call:
lm(formula = Y ~ X)
Coefficients:
(Intercept) X
0.7254 0.4981
> plot(X,Y)
> abline(mod) # regression plot of data
> summary(mod) # to get the LSE of β1
Call:
lm(formula = Y ~ X)
Residuals:
Min 1Q Median 3Q Max
-2.1793 -1.5149 -0.3624 1.6276 3.1973
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.72538 1.54882 0.468 0.646
X 0.49808 0.04952 10.058 4.63e-08 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 1.743 on 15 degrees of freedom
Multiple R-squared: 0.8709, Adjusted R-squared: 0.8623
F-statistic: 101.2 on 1 and 15 DF, p-value: 4.632e-08
> anova(mod) # to get LSE of σ2
Analysis of Variance Table
Response:...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here