Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this CT assignment, we will use R software to analyze a dataset GoogleAmazonStock.xlsx (Links to an external site.) . It contains daily closing stock

In this CT assignment, we will use R software to analyze a dataset GoogleAmazonStock.xlsx(Links to an external site.).

It contains daily closing stock prices for Google and Amazon from 8/22/2017 to 8/22/2018. When we examine stock prices (or other financial assets) we often transform them into a (simple) return series. The return series are computed by the formula: (present price/past price) - 1. The dataset contains both stock prices and return series.

1. Using R, construct time series (line) plots for both stock prices and return series. R functions ts.plot or plot can create the plot. Describe the patterns and compare the plots. 2. Based on the return series, can we claim that the mean Amazon return series is higher than that of Google?

a. What would be an appropriate test of the claim above? Explain. b. Write the null and alternative hypotheses. c. Using R, perform the test. d. Write the decision in the problem context.

Take the screenshots of the R graphs and output as well as the code. Paste them into a Word document along with your answers to the questions above. Clearly label the questions and answers. Submit the Word file in Canvas.

Date

Google.Close

Amazon.Close

Google.Return

Amazon.Return

8/22/17

924.690002

966.900024

8/23/17

927

958

0.00249813234165367

-0.00920469932680444

8/24/17

921.280029

952.450012

-0.00617041100323625

-0.00579330688935282

8/25/17

915.890015

945.26001

-0.00585057076060855

-0.00754895470566701

8/28/17

913.809998

946.02002

-0.00227103360221696

0.000804022165287623

8/29/17

921.289978

954.059998

0.00818548715419067

0.00849873980468193

8/30/17

929.570007

967.590027

0.0089874297970492

0.0141815284451324

8/31/17

939.330017

980.599976

0.0104994889319832

0.0134457245702885

9/1/17

937.340027

978.25

-0.0021185206093547

-0.00239646752754968

9/5/17

928.450012

965.27002

-0.00948430104756425

-0.0132685714285714

9/6/17

927.809998

967.799988

-0.000689335981181505

0.00262099510766946

9/7/17

935.950012

979.469971

0.00877336309971516

0.0120582590873105

9/8/17

926.5

965.900024

-0.0100967058911689

-0.0138543777775501

9/11/17

929.080017

977.960022

0.00278469185105235

0.0124857621910567

9/12/17

932.070007

982.580017

0.00321822657391199

0.00472411437693718

9/13/17

935.090027

999.599976

0.00324012142577183

0.0173217027677452

9/14/17

925.109985

992.210022

-0.0106728140733341

-0.00739291134196666

9/15/17

920.289978

986.789978

-0.00521019887165092

-0.0054625975144605

9/18/17

915

974.190002

-0.00574816430305623

-0.0127686501493837

9/19/17

921.809998

969.859985

0.00744262076502732

-0.00444473561739551

9/20/17

931.580017

973.210022

0.0105987340354275

0.00345414498155628

9/21/17

932.450012

964.650024

0.000933891865565854

-0.00879563280946155

9/22/17

928.530029

955.099976

-0.00420396047997477

-0.00990001323008312

9/25/17

920.969971

939.789978

-0.00814196392564919

-0.0160297334150493

9/26/17

924.859985

938.599976

0.00422382284166787

-0.00126624248806365

9/27/17

944.48999

950.869995

0.0212248397793964

0.013072681987795

9/28/17

949.5

956.400024

0.00530446066453282

0.00581575717929768

9/29/17

959.109985

961.349976

0.0101211005792522

0.00517560840211773

10/2/17

953.27002

959.190002

-0.00608894192671761

-0.0022468133915052

10/3/17

957.789978

957.099976

0.00474152958256256

-0.00217894890026179

10/4/17

951.679993

965.450012

-0.00637925342751916

0.00872430906841857

10/5/17

969.960022

980.849976

0.0192081678026828

0.0159510733943623

10/6/17

978.890015

989.580017

0.00920655779357471

0.00890048551115018

10/9/17

977

990.98999

-0.0019307736017718

0.00142481959596805

10/10/17

972.599976

987.200012

-0.00450360696008188

-0.00382443620848279

10/11/17

989.25

995

0.0171190874057764

0.00790112227024568

10/12/17

987.830017

1000.929993

-0.00143541369724539

0.00595979195979899

10/13/17

989.679993

1002.940002

0.00187276754923717

0.00200814144251545

10/16/17

992

1006.340027

0.00234419915165447

0.00339005822204707

10/17/17

992.179993

1009.130005

0.000181444556451613

0.00277240090341751

10/18/17

992.809998

997

0.000634970473547938

-0.0120202599664054

10/19/17

984.450012

986.609985

-0.00842052962484369

-0.0104212788365095

10/20/17

988.200012

982.909973

0.00380923353577043

-0.00375022760386922

10/23/17

968.450012

966.299988

-0.0199858325846691

-0.0168987857039477

10/24/17

970.539978

975.900024

0.00215805253147129

0.00993484023514238

10/25/17

973.330017

972.909973

0.00287472856682262

-0.00306389069214738

10/26/17

972.559998

972.429993

-0.000791118106450014

-0.000493344721834813

10/27/17

1019.27002

1100.949951

0.0480279078885167

0.132163712478169

10/30/17

1017.109985

1110.849976

-0.00211919801192622

0.00899225708762487

10/31/17

1016.640015

1105.280029

-0.000462064090345156

-0.00501413072902654

11/1/17

1025.5

1103.680054

0.00871496780500028

-0.0014475743323143

11/2/17

1025.579956

1094.219971

0.0000779678205753291

-0.008571399805328

11/3/17

1032.47998

1111.599976

0.00672792400010595

0.0158834653548834

11/6/17

1025.900024

1120.660034

-0.00637296231157916

0.00815046617093486

11/7/17

1033.329956

1123.170044

0.00724235483593282

0.00223976043032512

11/8/17

1039.849976

1132.880005

0.00630971739679247

0.00864513886554474

11/9/17

1031.26001

1129.130005

-0.00826077434077856

-0.00331014757383771

11/10/17

1028.069946

1125.349976

-0.00309336536767289

-0.00334773585261336

11/13/17

1025.75

1129.170044

-0.00225660326812044

0.00339455998708796

11/14/17

1026

1136.839966

0.000243724104313917

0.00679253053227473

11/15/17

1020.909973

1126.689941

-0.00496103996101365

-0.00892827953235416

11/16/17

1032.5

1137.290039

0.0113526435303027

0.00940817665469865

11/17/17

1019.090027

1129.880005

-0.0129878673123487

-0.00651551824591335

11/20/17

1018.380005

1126.310059

-0.000696721566484332

-0.00315957976440162

11/21/17

1034.48999

1139.48999

0.0158192275191028

0.0117018674340011

11/22/17

1035.959961

1156.160034

0.0014209620336684

0.0146293904696785

11/24/17

1040.609985

1186

0.00448861362895858

0.0258095463625064

11/27/17

1054.209961

1195.829956

0.0130692345797547

0.00828832715008432

11/28/17

1047.410034

1193.599976

-0.00645025872602242

-0.00186479690428494

11/29/17

1021.659973

1161.27002

-0.0245845086108847

-0.0270860896867176

11/30/17

1021.409973

1176.75

-0.000244699808749383

0.0133302158269788

12/1/17

1010.169983

1162.349976

-0.0110043863846236

-0.0122371140854047

12/4/17

998.679993

1133.949951

-0.0113743134258227

-0.0244332822182637

12/5/17

1005.150024

1141.569946

0.00647858277461257

0.00671986889128584

12/6/17

1018.380005

1152.349976

0.0131621953779111

0.00944316205745662

12/7/17

1030.930054

1159.790039

0.0123235422321553

0.00645642656740941

12/8/17

1037.050049

1162

0.00593638237264931

0.00190548368729351

12/11/17

1041.099976

1168.920044

0.00390523775000564

0.00595528743545611

12/12/17

1040.47998

1165.079956

-0.000595520136675135

-0.00328515882648343

12/13/17

1040.609985

1164.130005

0.00012494714218336

-0.00081535262460562

12/14/17

1049.150024

1174.26001

0.00820676249805541

0.00870178155059237

12/15/17

1064.189941

1179.140015

0.0143353349434799

0.00415581298727869

12/18/17

1077.140015

1190.579956

0.012168949828478

0.00970193603344044

12/19/17

1070.680054

1187.380005

-0.00599732709772183

-0.00268772456975582

12/20/17

1064.949951

1177.619995

-0.00535183501232946

-0.00821978638590937

12/21/17

1063.630005

1174.76001

-0.00123944416238581

-0.00242861450395125

12/22/17

1060.119995

1168.359985

-0.00330002912996047

-0.00544794251210509

12/26/17

1056.73999

1176.76001

-0.00318832303507302

0.00718958634996388

12/27/17

1049.369995

1182.26001

-0.00697427472201558

0.00467385019312476

12/28/17

1048.140015

1186.099976

-0.00117211279706925

0.00324798772479837

12/29/17

1046.400024

1169.469971

-0.00166007496622481

-0.0140207447403236

1/2/18

1065

1189.01001

0.0177752060143301

0.0167084572366502

1/3/18

1082.47998

1204.199951

0.0164131267605634

0.0127752843729213

1/4/18

1086.400024

1209.589966

0.00362135473396931

0.00447601330287714

1/5/18

1102.22998

1229.140015

0.0145710195602868

0.0161625423073326

1/8/18

1106.939941

1246.869995

0.00427312002527821

0.0144247032751594

1/9/18

1106.26001

1252.699951

-0.000614243803856021

0.00467567270315138

1/10/18

1102.609985

1254.329956

-0.00329942777195752

0.00130119347310488

1/11/18

1105.52002

1276.680054

0.002639224240292

0.0178183562411867

1/12/18

1122.26001

1305.199951

0.0151421862084415

0.0223391106570856

1/16/18

1121.76001

1304.859985

-0.000445529552460842

-0.000260470435766972

1/17/18

1131.97998

1295

0.00911065638718927

-0.00755635479158325

1/18/18

1129.790039

1293.319946

-0.00193461106971167

-0.001297338996139

1/19/18

1137.51001

1294.579956

0.00683310237611327

0.000974244620518672

1/22/18

1155.810059

1327.310059

0.0160878135920756

0.0252824113708122

1/23/18

1169.969971

1362.540039

0.012251071782721

0.0265423890681145

1/24/18

1164.23999

1357.51001

-0.0048975453575979

-0.00369165591911094

1/25/18

1170.369995

1377.949951

0.00526524174796641

0.0150569357495935

1/26/18

1175.839966

1402.050049

0.00467371089772342

0.0174898210072943

1/29/18

1175.579956

1417.680054

-0.000221127030478908

0.0111479650895116

1/30/18

1163.689941

1437.819946

-0.0101141695546228

0.0142062321771228

1/31/18

1169.939941

1450.890015

0.00537084645986469

0.00909019869724356

2/1/18

1167.699951

1390

-0.00191461964969362

-0.0419673540864502

2/2/18

1111.900024

1429.949951

-0.0477861859566011

0.028740971942446

2/5/18

1055.800049

1390

-0.0504541539608781

-0.0279380064820185

2/6/18

1080.599976

1442.839966

0.0234892269833566

0.038014364028777

2/7/18

1048.579956

1416.780029

-0.0296317052666675

-0.0180615574936188

2/8/18

1001.52002

1350.5

-0.0448796829757444

-0.0467821592931276

2/9/18

1037.780029

1339.599976

0.0362049767112993

-0.0080711025546094

2/12/18

1051.939941

1386.22998

0.0136444252195183

0.0348089017881559

2/13/18

1052.099976

1414.51001

0.000152133210046067

0.0204006769497223

2/14/18

1069.699951

1451.050049

0.0167284244857734

0.0258322943928831

2/15/18

1089.52002

1461.76001

0.0185286247619918

0.00738083500798669

2/16/18

1094.800049

1448.689941

0.00484619731907267

-0.00894132341190535

2/20/18

1102.459961

1468.349976

0.006996631035043

0.0135709059914015

2/21/18

1111.339966

1482.920044

0.00805471882348025

0.0099227488256519

2/22/18

1106.630005

1485.339966

-0.00423809198273717

0.00163186276279101

2/23/18

1126.790039

1500

0.018217501702387

0.00986981723751719

2/26/18

1143.75

1521.949951

0.0150515716442183

0.0146333006666667

2/27/18

1118.290039

1511.97998

-0.0222600751912568

-0.00655078768749867

2/28/18

1104.72998

1512.449951

-0.0121257084719504

0.000310831496591641

3/1/18

1069.52002

1493.449951

-0.03187200550129

-0.0125623991639774

3/2/18

1078.920044

1500.25

0.00878901172883141

0.00455324866792272

3/5/18

1090.930054

1523.609985

0.0111315106868104

0.0155707282119647

3/6/18

1095.060059

1537.640015

0.00378576516877222

0.00920841300472312

3/7/18

1109.640015

1545

0.0133142980425332

0.00478654621901213

3/8/18

1126

1551.859985

0.0147435067038385

0.00444011974110032

3/9/18

1160.040039

1578.890015

0.0302309404973357

0.0174178278074487

3/12/18

1164.5

1598.390015

0.00384466126173081

0.0123504486156371

3/13/18

1138.170044

1588.180054

-0.0226105246887076

-0.00638765314108897

3/14/18

1149.48999

1591

0.00994574234287263

0.00177558331178991

3/15/18

1149.579956

1582.319946

0.000078266014304309

-0.00545572218730358

3/16/18

1135.72998

1571.680054

-0.0120478579395133

-0.00672423552954441

3/19/18

1099.819946

1544.930054

-0.0316184609302996

-0.0170200034873001

3/20/18

1097.709961

1586.51001

-0.00191848220945067

0.0269138113355648

3/21/18

1090.880005

1581.859985

-0.00622200421118343

-0.00293097740996919

3/22/18

1049.079956

1544.920044

-0.0383177332139294

-0.0233522191282941

3/23/18

1021.570007

1495.560059

-0.0262229288079163

-0.031949863807968

3/26/18

1053.209961

1555.859985

0.0309718901134497

0.0403192941915815

3/27/18

1005.099976

1497.050049

-0.0456793866194739

-0.0377989899907349

3/28/18

1004.559998

1431.420044

-0.000537238098590901

-0.0438395530221849

3/29/18

1031.790039

1447.339966

0.0271064357073872

0.0111217682515559

4/2/18

1006.469971

1371.98999

-0.024539942277927

-0.0520610069300056

4/3/18

1013.409973

1392.050049

0.00689538903292327

0.0146211409312104

4/4/18

1025.140015

1410.569946

0.0115748239237034

0.0133040453633862

4/5/18

1027.810059

1451.75

0.00260456519200453

0.0291939113808398

4/6/18

1007.039978

1405.22998

-0.0202080927483898

-0.0320440985018082

4/9/18

1015.450012

1406.079956

0.00835124144396182

0.000604866115936411

4/10/18

1031.640015

1436.219971

0.0159436730599005

0.0214354915390032

4/11/18

1019.969971

1427.050049

-0.0113121280973189

-0.00638476151645158

4/12/18

1032.51001

1448.5

0.0122945178353687

0.0150309731708646

4/13/18

1029.27002

1430.790039

-0.00313797442021894

-0.0122264142216086

4/16/18

1037.97998

1441.5

0.00846226921095011

0.00748534775059333

4/17/18

1074.160034

1503.829956

0.0348562156275885

0.043239650364204

4/18/18

1072.079956

1527.839966

-0.00193646936597904

0.0159659075178045

4/19/18

1087.699951

1556.910034

0.0145698041574056

0.019026906382157

4/20/18

1072.959961

1527.48999

-0.0135515221697385

-0.0188964316225866

4/23/18

1067.449951

1517.859985

-0.00513533607988938

-0.0063044635729495

4/24/18

1019.97998

1460.089966

-0.0444704418746093

-0.0380601765452035

4/25/18

1021.179993

1460.170044

0.00117650642515552

0.0000548445656532921

4/26/18

1040.040039

1517.959961

0.0184688753493822

0.0395775253967613

4/27/18

1030.050049

1572.619995

-0.00960538981711261

0.0360088773118832

4/30/18

1017.330017

1566.130005

-0.0123489455802162

-0.00412686473568588

5/1/18

1037.310059

1582.26001

0.0196396859093169

0.0102992758892963

5/2/18

1024.380005

1569.680054

-0.0124649846859337

-0.00795062500505211

5/3/18

1023.719971

1572.079956

-0.000644325344870432

0.00152891157270194

5/4/18

1048.209961

1580.949951

0.0239225478585491

0.00564220348090234

5/7/18

1054.790039

1600.140015

0.00627744273076985

0.012138312150781

5/8/18

1053.910034

1592.390015

-0.000834293999243958

-0.00484332616355451

5/9/18

1082.76001

1608

0.0273742303130971

0.00980286541171259

5/10/18

1097.569946

1609.079956

0.0136779488189631

0.000671614427860697

5/11/18

1098.26001

1602.910034

0.00062871983923656

-0.00383444090332078

5/14/18

1100.199951

1601.540039

0.00176637679815001

-0.000854692385062454

5/15/18

1079.22998

1576.119995

-0.0190601453680668

-0.0158722500724192

5/16/18

1081.77002

1587.280029

0.00235356693853149

0.00708070073053036

5/17/18

1078.589966

1581.76001

-0.0029396765867111

-0.00347765920262832

5/18/18

1066.359985

1574.369995

-0.01133886035057

-0.00467202037811033

5/21/18

1079.579956

1585.459961

0.0123972872069088

0.00704406590269144

5/22/18

1069.72998

1581.400024

-0.0091238967019132

-0.00256073133341019

5/23/18

1079.689941

1601.859985

0.00931072437551016

0.0129378782657714

5/24/18

1079.23999

1603.069946

-0.000416740939147084

0.000755347540565476

5/25/18

1075.660034

1610.150024

-0.00331710836623094

0.00441657459655226

5/29/18

1060.319946

1612.869995

-0.0142610932033569

0.00168926557119376

5/30/18

1067.800049

1624.890015

0.00705457162078134

0.00745256594596144

5/31/18

1084.98999

1629.619995

0.0160984643296266

0.00291095394539673

6/1/18

1119.5

1641.540039

0.0318067542724519

0.00731461569971716

6/4/18

1139.290039

1665.27002

0.0176775694506476

0.0144559257990782

6/5/18

1139.660034

1696.349976

0.000324759268785286

0.0186636134841363

6/6/18

1136.880005

1695.75

-0.00243934938232641

-0.000353686449428759

6/7/18

1123.859985

1689.300049

-0.0114524135728819

-0.0038035978180746

6/8/18

1120.869995

1683.98999

-0.00266046486208867

-0.00314334863314741

6/11/18

1129.98999

1689.119995

0.00813653237278423

0.00304633936689849

6/12/18

1139.319946

1698.75

0.00825667137104462

0.00570119649788409

6/13/18

1134.790039

1704.859985

-0.0039759744537993

0.00359675349521707

6/14/18

1152.119995

1723.859985

0.0152715087411866

0.011144610212668

6/15/18

1152.26001

1715.969971

0.000121528139957331

-0.00457694596350875

6/18/18

1173.459961

1723.790039

0.0183985826254614

0.00455722893299978

6/19/18

1168.060059

1734.780029

-0.00460169258386823

0.00637548062777731

6/20/18

1169.839966

1750.079956

0.00152381462433003

0.00881951990698182

6/21/18

1157.660034

1730.219971

-0.0104116224047692

-0.0113480443747223

6/22/18

1155.47998

1715.670044

-0.00188315562079774

-0.00840929317882668

6/25/18

1124.810059

1663.150024

-0.0265430137526052

-0.0306119583912255

6/26/18

1118.459961

1691.089966

-0.0056454847191227

0.0167994117168109

6/27/18

1103.97998

1660.51001

-0.0129463561548092

-0.018082985893608

6/28/18

1114.219971

1701.449951

0.00927552236952703

0.0246550401704594

6/29/18

1115.650024

1699.800049

0.00128345662187022

-0.000969703516127698

7/2/18

1127.459961

1713.780029

0.0105857004848682

0.00822448499647031

7/3/18

1102.890015

1693.959961

-0.0217923002589003

-0.0115651178474551

7/5/18

1124.27002

1699.72998

0.0193854370873056

0.00340623104019163

7/6/18

1140.170044

1710.630005

0.0141425313466955

0.00641279799041963

7/9/18

1154.050049

1739.02002

0.0121736271471451

0.0165962335028725

7/10/18

1152.839966

1743.069946

-0.00104855331105315

0.00232885530553007

7/11/18

1153.900024

1755

0.000919518780805349

0.00684427726344379

7/12/18

1183.47998

1796.619995

0.0256347650444281

0.0237150968660969

7/13/18

1188.819946

1813.030029

0.00451208815547518

0.00913383689687813

7/16/18

1183.859985

1822.48999

-0.0041721717545947

0.00521776299823217

7/17/18

1198.800049

1843.930054

0.0126197896620351

0.0117641600873758

7/18/18

1195.880005

1842.920044

-0.00243580570624418

-0.000547748542743802

7/19/18

1186.959961

1812.969971

-0.00745897913060266

-0.016251422896782

7/20/18

1184.910034

1813.699951

-0.00172703972109806

0.000402643183106534

7/23/18

1205.5

1802

0.0173768179939305

-0.00645087462981356

7/24/18

1248.079956

1829.23999

0.0353214068851099

0.0151165316315205

7/25/18

1263.699951

1863.609985

0.0125152198181765

0.0187892213093373

7/26/18

1268.329956

1808

0.00366384836553658

-0.0298399265123062

7/27/18

1238.5

1817.27002

-0.0235190818121779

0.00512722345132743

7/30/18

1219.73999

1779.219971

-0.0151473637464675

-0.0209380271402926

7/31/18

1217.26001

1777.439941

-0.00203320381419978

-0.00100045527198053

8/1/18

1220.01001

1797.170044

0.00225917222073204

0.0111002923614396

8/2/18

1226.150024

1834.329956

0.00503275706729652

0.0206769037376632

8/3/18

1223.709961

1823.290039

-0.00199001994229052

-0.00601850117744029

8/6/18

1224.77002

1847.75

0.000866266545001998

0.0134152880105764

8/7/18

1242.219971

1862.47998

0.0142475327735406

0.00797184684075227

8/8/18

1245.609985

1886.52002

0.00272899653776376

0.0129075427699362

8/9/18

1249.099976

1898.52002

0.00280183287066377

0.00636091844919833

8/10/18

1237.609985

1886.300049

-0.00919861598011911

-0.00643657737146222

8/13/18

1235.01001

1896.199951

-0.00210080318639317

0.00524831773462993

8/14/18

1242.099976

1919.650024

0.00574081662706523

0.0123668777586631

8/15/18

1214.380005

1882.619995

-0.0223170207999424

-0.0192899896007294

8/16/18

1206.48999

1886.52002

-0.00649715490004301

0.00207159437930011

8/17/18

1200.959961

1882.219971

-0.00458356807419513

-0.00227935508471307

8/20/18

1207.77002

1876.709961

0.00567051294060585

-0.00292739960519737

8/21/18

1201.619995

1883.420044

-0.00509204972648684

0.00357545019712292

8/22/18

1207.329956

1904.900024

0.00475188580729301

0.0114047740271368

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

Sampling

Authors: Steven K Thompson

3rd Edition

111816296X, 9781118162965

More Books

Students also viewed these Mathematics questions