Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Following exercise needs to be done in R The data sample contains 2 columns of variables: predictor df$x and response df$y. Calculate standard deviations

The Following exercise needs to be done in R

The data sample contains 2 columns of variables: predictor df$x and response df$y.

Calculate standard deviations of df$x and df$y and their correlation coefficient. Round all values to the second decimal and use them to calculate the slope aa without fitting linear model to the data.

Leave aa not rounded. Its value will be checked up to the 3 decimal places.

Create variables:

  • sdX - Standard deviation of df$x
  • sdY - Standard deviation of df$y
  • cXY - Correlation coefficient of df$x and df$y
  • a - slope of the model y~x

Create variable result as data.frame:

result <- data.frame(sdX=sdX, sdY=sdY, cXY=cXY, a=a) 
x "y"
-4.580105975 1.862009
1.169849306 0.301558
1.463822898 0.295791
1.894999461 -0.61629
2.732642132 -0.28708
-2.555976994 1.232498
-2.704495599 0.364069
-6.058329346 4.59499
-4.497799452 2.074263
-2.020835898 0.558425
-3.403759055 1.54979
-3.118743762 2.748683
-1.456847982 1.33325
-0.806095239 0.539533
0.161994946 -0.97108
3.109739266 -1.33671
-3.844280527 3.232972
-7.11052216 -3.90299
-0.553090038 -0.63543
0.188900926 0.281356
-2.257168926 2.446806
-1.68326105 0.803238
-2.691218793 0.665435
-0.008433014 0.011814
-0.705604374 -0.22441
3.24577258 -1.38982
0.27949668 -1.56695
1.328159882 -0.74496
5.799827468 -3.12493
-3.443393198 -2.23951
-6.039236459 3.9548
7.124116378 -4.64305
0.285803925 -0.15075
1.568966045 0.151737
0.348004994 -0.00679
6.367526157 -4.42834
-0.702090076 0.09491
-0.042713447 -1.37547
-3.213970883 1.102417
2.113767814 -2.29003
1.068643629 -1.35632
1.525509426 -2.19705
0.900789267 -0.42763
0.456083514 1.584151
-1.54844935 0.717014
-3.794743101 2.485933
0.39018939 0.133258
-0.867969431 -0.64891
2.141022867 -1.0246
-0.878789204 -0.04956
-5.569106763 2.850055
-1.489810364 0.029564
-0.669135453 -0.4799
-2.168573092 1.650914
-1.321723889 3.208077
1.595524113 -0.36623
0.88126988 -0.62528
0.94744536 -0.0229
0.506630875 -0.72948
-0.644177985 1.08061
4.682333786 -4.81078
1.977087994 -0.89115
-3.573395693 1.052129
-1.722667395 0.949867
1.309564916 -1.97297
-1.548645719 -0.05387
-5.503047887 3.644895
1.108402691 -1.20755
-2.73335436 1.859938
4.00111963 -2.70403
2.999257885 -0.64235
-3.399888504 1.785394
-0.677204377 -0.60151
-0.649658909 0.88513
-3.29078651 2.247073
0.326136106 -0.66621
3.632683929 -0.2745
3.316094155 -1.30789
-0.93641228 0.572423
2.219535622 -3.12962
-2.626584348 3.162738
-2.621841495 1.810285
4.856896468 -3.05679
2.35288131 0.822928
0.668437767 -0.69243
-0.324568191 1.839135
4.178883281 -3.93045
-3.446977562 1.671147
-1.3215445 -0.86271
0.969707133 0.028234
5.43326111 -3.62513
4.329930303 -2.91502
3.61873633 -0.15337
4.266315595 -2.02871
1.631926133 -1.96691
1.06287601 -1.97318
1.172295381 -1.9808
5.179054744 -3.01887
-1.144067088 0.511426
-5.065309181 2.533268
-1.026087757 0.671528
-0.992306877 -0.71021
3.909518139 -3.20679
-0.402090731 0.774027
4.106268141 -1.58847
3.474334076 -1.16034
2.797066883 -1.43612
3.191460491 -3.94888
0.373167012 -0.32765
1.102190704 -1.25481
1.004148639 0.173268
2.163279394 1.780105
1.937548083 -1.1923
-3.074563413 3.551033
3.862253853 -2.19233
-1.602889919 0.959459
-1.881828573 1.524636
2.411316722 -2.05854
3.232345281 -1.52512
4.171295082 -1.27829
-0.630209454 0.10796
-1.910727955 -0.3279
3.365995704 -1.02714
0.419977473 -1.21464
1.847943513 1.029426
2.202465679 -2.31961
-1.950064431 0.33519
-1.473983332 1.193414
-1.294810463 -0.56496
-1.01366972 -0.98484
0.411430731 -1.31129
-3.638041489 3.315197
-2.572745753 2.078727
1.355176388 0.782524
-0.511288466 -0.53233
-4.758535803 2.412722
2.555750817 -3.8919
1.980332762 -1.59787
0.030318204 1.350853
-0.823932873 -0.05368
1.549363409 -0.26091
0.510656985 -0.40595
-0.392448443 -0.53892
1.568126808 -0.63291
1.985980388 -0.93488
-0.980894113 0.23838
-2.102903932 0.609626
-0.948024788 2.067139
3.218471792 -1.1605
-1.088324629 -0.67021
2.30928361 -0.08711
-2.635104084 -0.64153
1.269368288 -1.72318
-0.208372997 0.381553
0.50858735 -1.01073
1.464870521 -0.48009
2.196477035 -3.09304
-0.479586988 2.34789
-0.18825806 -0.40191
0.446718675 0.228683
3.07142731 0.574517
-2.659242414 3.667996
4.120728734 -3.52969
1.384685079 -1.13121
0.441913635 -3.10573
7.004153125 -4.64344
-2.864238187 2.511601
-0.222487814 0.258696
-0.561633186 0.290168
1.170481655 -1.80248
-2.082359772 -0.85877
1.333854267 -1.23509
1.375967866 -1.77707
-2.469044032 1.25952
-0.910702034 1.259832
-0.176958822 1.394713
2.97173692 -5.81417
0.404382368 -0.3977
0.884237672 -0.68301
-4.122827382 1.859583
-0.859293337 1.766374
4.45431779 -1.56829
0.56239562 0.056032
2.255643616 -2.60215
-1.689957893 1.165172
-1.051195711 1.963693
1.066402581 -1.41007
1.468277602 -1.27132
0.344138447 -0.5425
0.89226707 2.319104
-2.998364005 2.28633
4.06242912 -1.74775
2.947689288 -1.30127
-0.42680517 0.601261
2.678487119 -2.43361
4.041136005 -2.11148
-3.254580388 2.164417
-1.167593066 0.884416
4.724021063 -3.06889
-0.528680649 -2.1482
-0.36146749 1.757813
-0.945241485 0.69006
-3.291614354 3.381159
-1.869228621 1.594385
-4.276481683 5.432707
5.686073005 -2.65815
3.802259974 0.577733
1.201581464 0.426032
0.126783737 -3.0744
-1.97614466 0.407178
-1.124270865 0.39295
1.543154284 -1.2115
3.343810005 -1.60209
1.430512113 -1.28981
-1.705612036 0.10894
6.957187281 -5.49697
-2.679801187 1.38928
-0.287258272 -0.00091
-0.304295071 -1.18215
0.280488314 -1.0116
1.378729898 -1.44938
0.321116057 0.387599
-1.876598316 0.418775
-2.164412141 1.69134
1.776391527 -2.37599
-5.802221949 2.033517
1.993994249 -1.62122
-2.037249402 0.292294
-0.530896989 -0.31157
5.091408375 -3.53078
-3.944443317 1.543686
0.349430726 0.498146
1.892410313 -1.29753
2.866119505 -1.3178
0.900935249 0.285156
2.566842826 -2.40366
1.756563483 -0.27888
-2.03803986 2.417447
5.476880175 -2.98388
-1.771058787 1.410303
-0.97415218 -0.55598
2.113949741 -0.60238
2.068682408 -1.28783
4.370580009 -5.84892
3.006323997 -2.17107
-1.547264562 3.141742
1.77803716 -2.01406
-2.410524791 3.304291
-1.633211121 0.052036
-3.386704702 3.254
3.967474133 -1.33553
3.198599347 -3.73902
0.219379316 0.956403
-4.23008596 2.313185
-1.999995863 0.299082
0.615915049 -0.33332
1.793558163 0.017228
-0.825479035 0.320747
-2.55143953 3.69962
-2.238167069 1.158382
-0.696867414 0.3128
-3.506033947 -0.50866
2.043723115 -2.12054
-3.970164851 3.089383
-2.062978893 -0.1198
1.166573944 0.123098
2.274764733 -2.39957
0.665176111 -1.16958
1.734722396 -1.45905
2.759572307 0.093557
3.247481975 -2.38468
3.70542641 -1.04753
-2.96040153 3.235644
-0.52786216 0.556726
0.376916697 1.125126
-4.475266871 4.490599
4.600122627 -2.82242
0.473176822 -1.67658
-0.384133053 0.02376
-0.580060653 1.018842
6.790215543 -2.12121
5.561520955 -3.10761
-3.172074208 0.555942
4.565016188 -4.08466
0.349981652 -0.70895
3.318035601 -0.78259
-0.404357162 -1.44273
1.010356244 -1.24503
-0.713723437 -0.6399
-3.324862005 1.657036
4.274918957 -3.51861
0.28574326 -0.14683
0.190089879 -0.26328
5.251398772 -4.0827
-4.446914336 1.455894
-1.380247465 1.19387
2.159719016 -3.17767
0.87906695 -2.13519
-3.823197949 2.154785
3.069767037 -1.70674
1.737265957 -0.61801
6.013614699 -5.65298
1.967464223 -0.33645
5.923366016 -1.48444
-2.600470916 1.278436
0.798389049 0.527364
-3.186848273 3.030621
3.134061147 -4.37992
1.790867715 -2.53495
1.549959187 -2.84711
-1.096203055 -0.06619
0.199923278 1.06199
2.237942098 -1.14608
-4.049634437 3.740396
-1.652165653 3.741061
3.882922289 -3.26626
4.042794387 -3.00049
-0.138977659 1.280222
-6.15599327 2.212196
-1.447222248 0.608647
0.071076873 0.111889
-1.363301204 2.348288
-2.520075581 1.946729
-1.364323643 0.62501
2.542911416 1.259979
2.411184629 0.25786
-2.375632002 1.530576
-3.642801456 2.376525
1.533991082 -0.55648
-2.474028794 3.228145
2.886106594 -2.01599
3.345332805 -0.21457
3.211023574 -1.75225
-1.532230679 1.084874
-3.122872905 1.8416
-1.640161001 -0.7042
-1.027875933 1.220276
-8.000074277 5.452023
1.493942402 0.568018
4.797656761 -2.5809
0.343558521 -1.92781
-1.41492916 1.094269
-2.24683653 -0.15647
-0.848655165 0.538572
0.465810083 0.656507
0.849031805 2.140456
2.41039113 -1.51498
0.961191027 0.52683
-3.209368176 2.044804
-1.51932461 0.238524
1.759156673 0.372608
2.143026106 -1.88107
0.607376452 -0.23495
-5.886440605 4.018081
-0.498806402 -0.05169
0.106790735 -0.7661
2.569795885 -2.17378
-1.044272375 -0.82622
-3.643583125 1.339149
4.656902013 -2.17328
-0.609504163 -0.90043
-1.641263434 0.411405
-3.476972376 0.174728
-2.086749793 0.676121
-3.282588963 0.84837
-5.035063798 2.290203
3.518787987 -1.24638
0.087333695 -0.39296
-0.785243332 0.305509
-1.456991211 -1.52985
0.288403152 -0.05315
-6.531205577 5.232002
-4.773431565 2.813706
1.711982365 1.117655
7.201168753 -3.48876
-5.452277862 1.022405
-1.127655095 0.290962
-1.835884315 1.962068
0.542949342 -0.43881
0.766281595 0.68782
-1.107879746 0.885335
-3.058530595 1.358796
4.629532062 -2.70222
0.279342741 -1.15944
-0.488544126 1.680554
2.082660293 -2.51474
-6.969218013 5.292884
0.183541431 -0.42105
-2.73648128 1.846357
-0.485746619 -0.50748
1.686652184 0.434833
3.618765705 -0.98821
-4.349133424 1.533809
-1.814202726 0.356284
5.428868424 -4.63031
-0.753160831 2.493575
-1.344555218 2.290731
0.324828578 0.096182
-1.806894729 0.115043
-0.707580595 3.16881
-5.404602279 4.459422
-4.229387412 2.243822
-0.378958737 1.587403
-2.389689319 3.565667
-4.29625357 2.344088
-0.985138715 -1.54144
-2.570097643 2.470235
2.853815256 -1.9205
1.958701409 -1.82103
-6.284804671 5.437104
-2.914274988 3.209931
4.941366255 -3.30754
1.642413654 -0.57851
0.307493877 -0.20637
0.961247695 0.913926
2.801483328 -2.05794
-3.830431715 3.073604
-4.395307928 2.507597
2.154515314 -2.14937
-2.735117324 0.418605
4.554143071 -2.59261
-0.538659352 -1.89489
-1.916951828 2.640481
0.825185956 -0.35621
-2.688820808 2.63167
-1.878868347 2.267747
1.071258082 0.722526
-4.336971201 3.240094
-1.956077641 -0.62154
-0.661335656 -0.99824
-1.52399692 -0.07658
2.228517368 -2.53201
-1.953104727 0.431233
-2.003904146 3.106306
4.351592935 -0.91521
0.697043365 0.554333
-8.24598762 5.586733
2.319498406 -1.29883
0.330511589 1.205867
0.060642937 -0.77152
1.524502671 -2.81212
-0.869045407 0.137672
1.024455642 -0.12118
3.288476213 -1.51169
4.043196848 -0.06893
1.390386819 -2.09517
4.649714961 -3.99543
0.492390022 2.332886
1.684536313 -1.32255
-3.533643626 2.64154
-1.201191451 1.860143
-1.66656322 3.364802
-1.926220382 0.453466
0.420475636 -2.88607
0.885562293 -1.33813
2.182951675 -1.66865
4.506192918 -2.9591
-2.384689753 -0.56408
0.807207664 -1.72312
0.484843278 -1.75512
2.242903764 -0.5323
1.912484563 -1.34327
2.261695936 -0.58143
-0.006995365 0.299156
0.243327919 0.58081
-5.308051786 4.015131
3.584932366 -5.77553
-1.662062199 0.44093
1.370715192 -1.1428
-0.469930708 -1.38863
-3.112317281 1.718145
-1.592051532 0.86515
2.497265257 -0.24466
-5.443515858 4.257841
-7.309363307 4.233518
0.573766004 1.108954
-0.318705663 -0.90363
1.084568225 2.28752
-0.511083569 1.949324
-0.349670343 1.500669
3.829552408 -1.91728
2.344750251 -2.23184
0.067676547 1.339973
8.938814844 -4.44489
1.979299757 -1.26981
0.772702369 0.275107
3.151926398 -3.30603
4.594678005 -4.18925
3.796542485 -0.46951
0.848763687 0.010474
3.626508871 -3.22852
0.253083403 0.032191
-0.354677079 0.095137
3.909413978 -3.20518
0.020228353 2.345598
6.358094386 -3.11691
0.306919369 -0.41468
-1.454689363 1.180947
8.123955828 -4.33132
-1.370345032 0.410238

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Quantitative Chemical Analysis

Authors: Daniel C. Harris

8th edition

1429218150, 978-1429218153

Students also viewed these Mathematics questions

Question

L A -r- P[N]

Answered: 1 week ago