In: Statistics and Probability
Financial analysts know that January credit card charges will generally be much lower than those of the month before. What about the difference between January and the next month? Does the trend continue? The accompanying data set contains the monthly credit card charges of a random sample of 99 cardholders
a) Build a regression model to predict February charges from January charges.
How would i do this step by step using technology so I can do other problems in the future? thanks
Info as follows,
January February
903.36 641.41
7216.64 4564.18
4241.95 2271.91
80.04 299.76
4042.11 1376.29
89.26 -120.71
3293.39 1930.22
2420.13 2609.21
83.82 144.89
6.42 393.12
0.00 40.47
564.65 295.65
2716.76 850.06
187.18 162.02
3263.89 2414.09
1523.94 956.75
1359.14 38.02
733.39 2654.35
75.02 64.98
70.25 -70.32
633.77 1861.04
1042.18 478.25
554.04 995.92
1017.77 773.81
1303.54 3370.06
249.41 5.53
48.76 96.94
872.94 890.87
485.12 485.35
617.15 1486.06
1573.16 889.96
422.68 391.44
770.12 323.41
56.56 0.00
1486.22 2252.37
495.91 390.17
1064.03 1065.35
509.78 131.28
5640.82 4944.13
5.49 5.51
872.15 591.89
1636.55 3359.75
92.21 85.94
669.76 1367.93
828.32 280.78
69.17 67.96
830.67 1057.14
2300.06 3316.72
270.19 14.12
210.68 160.51
1012.22 519.07
1045.35 2022.15
298.81 635.55
-30.01 0.00
1634.94 392.94
1734.14 1322.93
0.00 65.06
31.43 28.79
4.95 77.26
1087.29 891.96
26.87 29.03
120.13 32.23
2008.16 815.76
291.61 779.22
103.95 0.00
53.04 66.31
2839.62 1532.58
675.23 293.85
221.88 171.88
37.73 4.78
533.35 881.72
1932.82 1063.68
692.37 914.31
6803.27 5946.65
393.03 465.81
1306.92 302.99
796.34 497.76
0.00 266.36
1040.66 59.43
565.25 206.79
339.21 411.71
5280.13 5318.84
40.05 72.61
43.36 38.47
653.93 480.47
1070.37 416.33
2336.21 1789.52
91.43 175.14
1434.31 1108.34
720.74 307.54
28.61 24.17
980.14 1215.17
1578.04 1810.37
0.00 468.49
162.05 147.83
494.39 1993.96
533.52 935.44
462.27 114.63
1478.22 2092.13
I have run the Regression on R-studio and I am attaching the output below.
lm(Y~X) is the function to fit linear models in R where Y is the dependent Variable and X is the independent variable.
Thus, the fitted model is: February = 164.5208 + 0.7233*January