In: Math
"iq" "score"
x y
121.892046820712 71.4732161842994
75.3231199290853 12.9190592344864
80.7353976125424 84.9141085286923
91.9095844175845 -42.3921089304488
94.1810816902236 -2.68232999485699
74.5190342941783 -24.2780813181847
118.594093570274 -40.0049484447782
99.1881956204263 0.206020513001461
100.484172827288 -44.9265093418123
96.0242413527543 0.229195593669459
106.144043224744 -2.95492230511574
117.158103938701 -19.2870839962481
79.1373549726252 35.3110928438802
96.541524668086 -23.5780147739683
105.470758811032 49.1522774615725
99.5985999128748 46.5726851253841
104.657509123173 9.48271798764803
86.3158158693298 -25.4269048543043
99.438874992039 -51.9384680082999
100.622681970059 53.3745843562983
79.8678676984686 -25.4750123685849
95.3453801287767 71.6439973612334
141.213862915063 -101.574982678670
100.907577664697 -28.9536302196737
96.2850048629342 0.572812512692053
110.555125562625 -30.6826774054011
126.702100022565 -25.9491611074600
78.116682253087 35.0448127083859
125.763278192055 -75.4365676357808
110.189826539736 -50.4789618210432
120.031830825433 95.441082294667
116.329317367990 -106.118507300053
91.3995403545871 61.7697071542223
67.1717671017129 20.6464837044241
103.956885240671 32.2183861568908
86.8529900060136 -6.62538665297089
112.153597353581 -62.0198332837319
101.544038145957 30.5162192174453
93.6985690141871 35.6366257606887
87.1598523722415 21.8402446324802
103.462616811554 36.4885895758884
93.4347667994378 26.4040057054676
89.2652497474767 63.2711353718747
66.5978405012603 21.6577425446238
118.838468944248 -20.3441512849331
96.1288413662582 44.7060632457826
94.744795827725 30.7193736235243
113.682504871639 -42.5678535029876
105.513774174699 -83.3036944245307
71.8444310751677 -53.5048364428
100.58890486895 56.4962194732963
108.876211777875 103.445235880838
78.9430480237388 7.80940347320373
96.8297678060834 50.0130610322806
113.425045275841 17.7306044850652
86.1697147334069 17.8974687420377
116.037159955396 -42.8320987618029
119.580138905962 110.832617948753
103.338174318402 71.397769967437
87.4542064166235 26.6370103997221
107.931423538019 -62.4291410620053
93.3234404950854 34.1717868832087
109.935414030069 10.5531221389836
96.124422271583 -35.7486297469003
101.206463349905 -21.3592158893932
113.978895298155 -37.6762974283941
92.7129726656618 -1.62518154445572
73.8047499498416 -33.2577669802005
87.6233580483771 -58.7759846722668
102.043095811625 -76.041032261331
84.7637782121371 10.1170348523167
117.250471516515 -98.5203030147308
71.7903904694932 9.04534184739605
76.5910613013864 -33.0924340502142
85.9166485344142 30.3567794392743
73.0204726847607 90.5781558308057
100.757484102641 -35.0482995457613
88.9039906345846 21.8742995725425
115.831258476986 30.1076108060902
125.448279734077 8.19581879558203
83.3852255018193 18.5481168448278
112.092740665462 24.7132055187742
82.700890098919 -1.78898752445938
101.514155078929 57.3348558073038
100.594015128124 -44.1400342860949
103.464058992714 -43.6962212540387
80.4428672192393 -13.4302787051414
104.410590346905 99.2937613397461
115.931753255852 -41.9197152986158
92.289345654039 80.3955269941439
104.806332006923 -32.9543620657468
106.401550000696 -67.8922194894664
89.72709627167 -22.3866457703968
87.080465367208 31.9668321534374
94.7673933618738 21.3618384056050
110.446778275340 84.2311350392016
114.920059002627 43.8621189529085
92.6209783939604 25.4701688798426
112.900465998094 65.3601047313239
78.9561017673847 17.6248371204608
1.2 Conduct a linear regression of "iq" and score.
1.3 Do you reject or fail to reject the null hypothesis about the slope? Why (write a full explanation as discussed in class?
1.4 What is the interpretation of the coefficient for the slope in 1.3?
solve using R.
Solution: 1.2 Conduct a linear regression of "iq" and score.
Answer: We can use R to find the linear regression of iq and score. Considering iq as independent variable and score as dependent variable.
Please note I have saved the given data in csv format at below referred location on my system.
The R script for running regression is given below:
data <- read.csv("C:/Users/hp/Desktop/data.csv",
header=T)
relation<-lm(data$Y~data$X)
print(summary(relation))
The R output is given below:
Therefore, the equation of linear regression line is:
1.3 Do you reject or fail to reject the null hypothesis about the slope? Why
Answer: To find the answer to this question, we need to know the significance level. But it is not given here. So I will assume it to be 0.05.
Since the p-value (Pr(>|t|)=0.0791) is greater than the
significance level 0.05, we therefore fail to reject the null
hypothesis which is
and conclude that the slope of the given regression equation is
insignificant.
1.4 What is the interpretation of the coefficient for the slope in 1.3?
Answer: Since the slope of the above regression
equation is
, therefore it means on average, the score decreases by 0.5764
units for every one unit increase in iq.