Great Deal! Get Instant \$10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

# Writing Prompts

Use your bivariate data sets from WH08, and use the computations for the regression lines as in RL08.

For each data set, check the conditions required to perform Inference for linear regression.

Choose whichever one more convincingly satisfies these criteria for the following questions.

• Conduct a hypothesis test for slope of your data set. Explain and interpret each step of your test.

• Conduct a hypothesis test for correlation of your data set. Explain and interpret each step of your test.

• Choose a level of confidence and create a confidence interval for the slope of your regression line.

# Reflection

Answer the following two questions in 3-4 detailed sentences each.

1. After attempting this assignment, what ideas do you feel like you understand deeply?

2. After attempting this assignment, what ideas do you feel like you are still struggling to understand?

Answered Same Day Jun 13, 2021

## Solution

Biswajit answered on Jun 15 2021
Assignment Solution
Conditions for inference in linear regression
1. The relationship is linea
2. Data points are independent
3. Residuals & hence dependent variable is normally distributed
4. Zero mean value of e
or
5. No autoco
elation of residuals
6. E
ors are homoscedastic
7. No co
elation between e
or & independent variable
8. No multicollinearity
Dataset 1 (Income vs Hours per week)
For this dataset, assumption of linear relation, independence of datapoints are established, zero mean of residuals, homoscedastic e
ors etc. are established.
Find attached below the Excel outputs.
Observation
Predicted Yearly Income ('000's) (Y)
Residuals
Standard Residuals
1
49.20227453
-5.402274528
-0.875978531
2
45.78071353
-1.28071353
-0.207667632
3
49.20227453
-4.402274528
-0.713828584
4
54.33461603
-8.334616025
-1.351457551
5
44.75424523
-3.554245231
-0.576320678
6
49.20227453
-5.902274528
-0.957053505
7
47.83365013
-4.233650129
-0.686486146
8
55.36108432
-9.161084325
-1.485469343
9
55.70324042
-8.903240425
-1.443659968
10
57.75617702
-9.556177023
-1.549533603
11
53.65030383
-4.350303826
-0.705401537
12
59.12480142
-5.324801423
-0.863416271
13
53.99245993
-0.092459926
-0.014992372
14
52.96599163
1.234008374
0.200094393
15
57.75617702
-7.256177023
-1.176588724
16
55.70324042
-4.503240425
-0.730200199
17
56.04539652
-4.545396524
-0.737035808
18
54.67677213
-2.076772125
-0.336748491
19
54.33461603
-1.534616025
-0.248837908
20
55.01892823
-2.118928225
-0.343584101
21
59.46695752
-9.966957522
-1.61614164
22
47.14933793
2.650662071
0.429804716
23
55.70324042
-5.403240425
-0.876135151
24
61.51989412
-7.219894121
-1.170705453
25
55.36108432
-0.261084325
-0.04233481
26
60.49342582
-5.193425822
-0.842113725
27
63.57283072
-1.87283072
-0.303679403
28
62.20420632
0.095793679
0.01553294
29
58.44048922
4.959510777
0.804184412
30
62.20420632
1.495793679
0.242542867
31
53.65030383
1.849696174
0.299928138
32
56.04539652
-0.445396524
-0.072221023
33
49.88658673
5.813413272
0.942644657
34
63.23067462
-5.03067462
-0.815723626
35
62.54636242
-4.246362421
-0.688547444
36
49.54443063
8.855569372
1.435930109
37
58.78264532
0.417354677
0.067674039
38
60.83558192
-1.535581922
-0.248994528
39
61.51989412
-2.119894121
-0.343740721
40
63.57283072
-3.07283072
-0.49825934
41
53.65030383
3.049696174
0.494508075
42
54.67677213
3.123227875
0.506431236
43
62.88851852
0.911481479
0.147796674
44
67.33654782
-3.136547818
-0.508591064
45
60.49342582
-4.693425822
-0.761038751
46
60.49342582
-4.293425822
-0.696178772
47
64.25714292
0.04285708
0.006949273
48
65.28361122
-0.783611219
-0.127062518
49
60.49342582
4.206574178
0.682095782
50
65.83106098
0.268939021
0.043608448
51
60.49342582
11.80657418
1.914435384
52
56.04539652
17.15460348
2.781618054
53
62.88851852
11.31148148
1.834156129
54
58.44048922
10.05951078
1.631149145
55
61.51989412
8.180105879
1.326403739
56
62.54636242
8.653637579
1.40318688
57
51.93952333
14.36047667
2.328550539
58
59.80911362
6.690886378
1.084926875
59
62.20420632
4.495793679
0.728992709
60
66.65223562
8.147764382
1.321159567
61
50.57089893
11.42910107
1.85322814
62
60.83558192
-3.535581922
-0.573294423
63
53.30814773
1.991852274
0.322978742
64
50.57089893
5.529101072
0.896543449
65
64.94145512
-3.441455119
-0.558031767
Sum of residuals is zero as shown in table.
Regression Statistics
Â
Â
Â
Â
Â
Â
Â
Â
Multiple R
0.665956616
Â
Â
Â
Â
Â
Â
Â
R Square
0.443498215
Â
Â
Â
Â
Â
Â
Â
0.434664853
Â
Â
Â
Â
Â
Â
Â
Standard E
o
6.21588398
Â
Â
Â
Â
Â
Â
Â
Observations
65
Â
Â
Â
Â
Â
Â
Â
ANOVA
Â
Â
Â
Â
Â
Â
Â
Â
Â
df
SS
MS
F
Significance F
Â
Â
Â
Regression
1
1939.865694
1939.865694
50.20718
1.41668E-09
Â
Â
Â
Residual
63
2434.14446
38.63721365
Â
Â
Â
Â
Â
Total
64
4374.010154
Â
Â
Â
Â
Â
Â
Â
Coefficients
Standard E
o
t Stat
P-value
Lower 95%
Upper 95%
Lower 95.0%
Upper 95.0%
Intercept
36.88465494
2.986349408
12.35108485
1.76E-18
30.91691184
42.85239803
30.91691
42.8524
Hours Per Week (X)
0.6843122
0.096576475
7.085702786
1.42E-09
0.491319514
0.877304886
0.49132
0.877305
Hypothesis test for slope
1. Define the Hypothesis
H0 : Slope is equal to zero
Ha :Slope is not equal to zero or greater than zero
2. Assume level of significance (.05)
3. Decide test statistic (either t or p value)
4. Calculate the test statistic
T statistic =coefficient/standard e
or =0.68431/.09657 =7.085
P value =1.42E-09 (two sided in excel output) & for one sided, half of it.
5. Decision rule: If t statistic > t critical or p value is less than level of significance then reject null hypothesis
6. Conclusion: Here p value < .05, so we reject null hypothesis.
Also t critical is 1.95 at degree of freedom=63, t.inv(.975,63),so t calculated 7.085 > 1.95.Hence reject null hypothesis that slope is zero. In a way, slope is significant.
Hypothesis test for co
elation of dataset.
1. Define the Hypothesis
H0 : coefficient of co
elation is equal to zero
Ha :coefficient of co
elation is not equal to zero
2. Assume level of significance (.05)
3. Decide test statistic ( p value or t statistic)
4. Calculate the test statistic
T statistic =r *sqrt (n-2)/sqrt(1-r^2) = 0.6659 *sqrt (65-2)/sqrt(1-.6659^2) =7.0857
P value =1.416E-09
5. Decision rule :If p value is less than level of significance then reject null hypothesis
6. Conclusion :Here p value < .05,so we reject null hypothesis.
Also t critical is 1.998 at degree of freedom=63, t.inv(.975,63),so t calculated 7.085 > 1.95.Hence reject null hypothesis that slope is zero.In a way,slope is significant.
Co
elation coefficientÂ
Hours Per Week (X)
Yearly Income ('000's) (Y)
Hours Per Week (X)
1
Â
Yearly Income ('000's) (Y)
0.665956616
1
Confidence interval
1. Level of confidence is 95%
2. Slope coefficient of Hours per week is 0.6843,standard e
or is 0.0965
3. So confidence interval is (.6843+/- t.inv (.025,63=degree of freedom)*.0965 i.e (0.4913,0.8773)
Dataset 2 (Price vs quantity)
For this dataset,assumption of linear relationship in parameter but approximate linear relationship of variables ,independence of datapoints are established,zero mean of residuals,homoscedastic e
ors etc are established.
Find attached below the Excel outputs.
Regression Statistics
Â
Â
Â
Â
Â
Â
Â
Â
Multiple R
0.31349225
Â
Â
Â
Â
Â
Â
Â
R Square
0.09827739
Â
Â
Â
Â
Â
Â
Â
0.08273045
Â
Â
Â
Â
Â
Â
Â
Standard E
o
126.528626
Â
Â
Â
Â
Â
Â
Â
Observations
60
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
ANOVA
Â
Â
Â
Â
Â
Â
Â
Â
Â
df
SS
MS
F
Significance...
SOLUTION.PDF