You are on page 1of 5

Q.

3#
A. Plot the data (GDP on X axis and Consumption on Y axis) and check whether there is
positive correlation, negative correlation or no correlation (based on the graph)

Answer:

12000000000

10000000000

8000000000

6000000000

4000000000

2000000000

0
0 5000000000 10000000000 15000000000

X-Axis: Income (GDP)


Y-Axis: Consumption
As seen from the graph above, the ascending scatter dots show a positive correlation
between income (GDP) and consumption.

B. Calculate the correlation coefficient between income and consumption (by formula)

Answer:
Correlation Coefficient: ∑XiYi/√∑Xi2∑Yi2
Xi: X-mean
Yi: Y-mean

Xi Yi

-2.906E+09 -2580203675
-2.708E+09 -2427840284
-2.381E+09 -2340299911

-2.127E+09 -2005109323

-1.989E+09 -1836605265

-1.636E+09 -1611747546

-1.397E+09 -1270282677

-1.127E+09 -1035185314

-1.011E+09 -1131327336

-1.003E+09 -959298075.4

-1.083E+09 -945363716.8

-1.067E+09 -849686771.6

-1.293E+09 -1051022636

-1.517E+09 -1355024236

-1.527E+09 -1322878489

-1.616E+09 -1232939248

-1.75E+09 -1146985945

-1.625E+09 -1040827109

-1.474E+09 -975596862.8

-1.271E+09 -889669325.6
-1.014E+09 -736891204.4
-
708884172 -556829199.1
-
608340021 -356905013.2
-
343341351 -170347447.2

-41272105 6675473.342
275641395 218125646.4
584906810 420408199.9

951534559 758756863
134216235
9 1108383033
137698589
4 1313198700
158243600
4 1482899369
172383905
9 1595831844
193608801
8 1768854343
217337120
1 1936149779
254850011
7 2174133584
343156873
1 2939131704
389928074
7 3281785859
389928045
3 3160433357
455807371
1 3651057337
493988190
4 4013041521

Sum:
1.46555E+20

Numerator 1.46555E+20
Denominator: 1.47125E+20
Pearson correlation coefficient: 0.996122251
As the correlation coefficient is between 0.8-1, so there exixts a strong relation.

C. Calculate the correlation coefficient between income and consumption (by command)

Answer:
Correlation coefficient by formula: 0.996122251

D. Compare A and B. Is there any difference between A and B


Answer:
As seen from part C and D the values of correlation coefficient calculated by both
formula and command are the same that is: 0.996122251

E. Run regression on consumption and income data and identify intercept and slope
Answer:

SUMMARY OUTPUT

Regression Statistics
Multiple R 0.996122
R Square 0.99226
Adjusted R
Square 0.992056
Standard 1.59E+08
Error
Observation
s 40

ANOVA
Significan
  df SS MS F ce F
1.24E+2 4871.26
Regression 1 1.24E+20 0 9 9.94E-42
2.54E+1
Residual 38 9.66E+17 6
Total 39 1.25E+20      

Coefficien Standard Lower Upper Lower Upper


  ts Error t Stat P-value 95% 95% 95.0% 95.0%
8628846 4.53707 5.57E- 5.66E+0 2.17E+0 5.66E+0
Intercept 3.91E+08 5 1 05 2.17E+08 8 8 8
69.7944 9.94E- 0.86960 0.86960
Income 0.845092 0.012108 7 42 0.82058 4 0.82058 4

Intercept: 391E+08(391496853.9)
Slope: 0.845092

F. Interpret intercept and slope


Answer:
As Y=mX+c
So c=391496853.9
And m=0.845092
So Y= 0.845092X + 391496853.9
It means that if the value of X increases by 1 unit, the value of Y increases by 0.845092.

You might also like