Sunteți pe pagina 1din 21

Correlation

Lecture 5 Lecture5
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
Correlation
Correlationexaminestherelationshipsbetweenpairsof
variables for example variables,forexample
betweenthepriceofdoughnutsandthedemandforthem
between economic growth and life expectancy betweeneconomicgrowthandlifeexpectancy
betweenhaircolour andhourlywage
between rankings betweenrankings
Suchanalysescanbeusefulforformulatingpolicies
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
PositiveCorrelation
income
E g income and food expenditure
expenditure
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
E.g. income and food expenditure
NegativeCorrelation
price
E g demand and price
quantity
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
E.g. demand and price
Zero(absenceof)Correlation
sales of
cameras
E.g. sales of cameras and the price of fish
Price of fish
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
TheCorrelationCoefficient,r
Measuresthestrengthofassociation betweentwovariables,X andY
1s r s +1
Positive correlation: r > 0 Positive correlation:r >0
Negative correlation:r <0
Zero correlation:r ~ 0
Thecloserristo+1(or1),thecloserthepointslietoastraightline
withpositive(negative)slope
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
PositiveCorrelation
r =0 8 r = 0.8
E.g. income and food expenditure
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
g p
NegativeCorrelation
r =-0 7 r 0.7
E.g. demand and price
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
Zero(absenceof)Correlation
r =0 r 0
E.g. sales of cameras and the price of fish
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
FormulafortheCorrelationCoefficient
Use either
( )( )

Y Y X X
r
( )( )
( ) ( )


=
2 2
Y Y X X
r
or, equivalently
) ) ( )( ) ( (
2 2 2 2
Y Y n X X n
Y X XY n
r


=
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
WhytheFormulaWorks
( )( ) 0 > Y Y X X ( )( ) 0 < Y Y X X ( )( ) 0 > Y Y X X ( )( ) 0 < Y Y X X
Y
( )( ) 0 > Y Y X X ( )( ) 0 < Y Y X X
X
More +ve than -ve points, hence r > 0
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
Calculationofr BetweenGrowth
andBirthRates
Country Birth rate GNP growth Cou t y t ate G g o t
Y X Y
2
X
2
XY
Brazil 30 5.1 900 26.01 153.0
Colombia 29 3.2 841 10.24 92.8
Costa Rica 30 3.0 900 9.00 90.0
India 35 1.4 1,225 1.96 49.0
Mexico 36 3.8 1,296 14.44 136.8
Peru 36 1.0 1,296 1.00 36.0
Philippines 34 2.8 1,156 7.84 95.2
Senegal 48 0.3 2,304 0.09 14.4
South Korea 24 6.9 576 47.61 165.6
Sri Lanka 27 2.5 729 6.25 67.5 Sri Lanka 27 2.5 729 6.25 67.5
Taiwan 21 6.2 441 38.44 130.2
Thailand 30 4.6 900 21.16 138.0
Total 380 40 2 12 564 184 04 1 139 7
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
Total 380 40.2 12,564 184.04 1,139.7
Calculationofr BetweenGrowth
andBirthRates(cont.) ( )
Usingthesecondformula,
) ) ( )( ) ( (
2 2 2 2
Y Y n X X n
Y X XY n
r


=
weobtain
) ) ( )( ) ( (
824 . 0
) 380 564 , 12 12 )( 2 . 40 04 . 184 12 (
380 2 . 40 7 . 139 , 1 12
2 2
=


= r
) 380 564 , 12 12 )( 2 . 40 04 . 184 12 (
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
ChartofBirthRateAgainstGrowthRate
45
50
35
40
r
a
t
e
20
25
30
B
i
r
t
h

15
20
-1 0 1 2 3 4 5 6 7 8
Growth rate
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
NotesAboutr
ThecorrelationbetweenY andX isthesameas betweenX and
YY
itdoesnotmatterwhichvariableislabelledXandwhichY
r isindependentofunitsofmeasurement
Ifthebirthrateweremeasuredasbirthsper100population
(3.0,2.9,...)r wouldstillbe0.824
Correlationdoesnotimplycausality p y y
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
IstheResultStatisticallySignificant?
Thecorrelationcoefficientr isjustlikeanyothersummary
statistic statistic
H
0
: =0versusH
1
: = 0 where isthepopulationcorrelation
coefficient coefficient
ThenullassertsnogenuineassociationbetweenXandY;
the sample correlation obser ed is j st d e to (bad) l ck thesamplecorrelationobservedisjustdueto(bad)luck
Theteststatisticis
2 n r
2
2
~
1
2

=
n
t
r
n r
t
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
HypothesisTesting
Chooseo =5%.Thisimpliest*
10
=2.228
C l l h i i Calculatetheteststatistic
2 12 824 0 2 n r
( )
59 . 4
824 . 0 1
2 12 824 . 0
1
2
2 2
=


=

=
r
n r
t
HencewerejectH
0
.Theredoesseemtobegenuine
association between growth and birth rates associationbetweengrowthandbirthrates
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
SpearmanRankCorrelationCoefficient,r
s
Used for examining relationships between ranks of variables Usedforexaminingrelationshipsbetweenranks ofvariables
e.g.rankingsofschoolperformanceandspendingper
pupil pupil
Canbeusefulifdatacontainsextremevaluesthatmay
distort the means and other summary statistics distortthemeansandothersummarystatistics
Basedonlookingatdifferencesinranksbyeachvariable
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
Country Birth rate GNP growth
Y X Rank Y Rank X d d
2
B il 30 5 1 7 3 4 16 Brazil 30 5.1 7 3 4 16
Colombia 29 3.2 9 6 3 9
Costa Rica 30 3.0 7 7 0 0
3 1 10 6 36 India 35 1.4 4 10 -6 36
Mexico 36 3.8 2.5 5 -2.5 6.25
Peru 36 1.0 2.5 11 -8.5 72.25
Philippines 34 2.8 5 8 -3 9
Senegal 48 0.3 1 12 11 121
South Korea 24 6.9 11 1 10 100
Sri Lanka 27 2.5 10 9 1 1
Taiwan 21 6.2 12 2 10 100
Thailand 30 4.6 7 4 3 9
Total 380 40.2 479.5
676 . 0
5 . 479 6
1
6
1
2
2
=

=

d
r
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
676 . 0
) 1 144 ( 12
1
) 1 (
1
2
n n
r
s
HypothesisTestingWithr
s
r does not follow a standard distribution so we have to use r
s
doesnotfollowastandarddistributionsowehavetouse
specialtables
H 0 H =0 H
0
:
s
=0vs H
1
:
s
=0
sowecanrejectthenull
n 10% 5% 2% 1%
5 0.9
6 0 829 0 896 0 943 6 0.829 0.896 0.943
..
11 0.523 0.623 0.763 0.794
12 0 497 0 591 0 703 0 78 12 0.497 0.591 0.703 0.78
See Table A6 in Barrow for full version
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006
Summary
Correlationmeasurestheassociationbetweentwo
variables variables
correlationcoefficient,r,ifwehavedatavalues
k l ff f h Spearmanrankcorrelationcoefficient,ifjusthave
ranks,orhaveextremevalues
Notethatassociationdoesnotinfercausation
Barrow, Statistics for Economics, Accounting and Business Studies, 4
th
edition Pearson Education Limited 2006

S-ar putea să vă placă și