0% found this document useful (0 votes)
99 views7 pages

Correlation PDF

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 7

Correlation

WhentwosetsofdataarestronglylinkedtogetherwesaytheyhaveaHigh
Correlation.

ThewordCorrelationismadeofCo(meaning"together"),and
Relation

CorrelationisPositivewhenthevaluesincreasetogether,and
CorrelationisNegativewhenonevaluedecreasesastheotherincreases
Herewelookatlinearcorrelations(correlationsthatfollowaline).

Correlationcanhaveavalue:

1isaperfectpositivecorrelation
0isnocorrelation(thevaluesdon'tseemlinkedatall)
1isaperfectnegativecorrelation
Thevalueshowshowgoodthecorrelationis(nothowsteepthelineis),andifitis
positiveornegative.

Example: Ice Cream Sales


https://www.mathsisfun.com/data/correlation.html

1/7

Thelocalicecreamshopkeepstrackofhowmuchicecreamtheysellversusthe
temperatureonthatday,herearetheirfiguresforthelast12days:

IceCreamSalesvsTemperature
TemperatureC IceCreamSales
14.2

$215

16.4

$325

11.9

$185

15.2

$332

18.5

$406

22.1

$522

19.4

$412

25.1

$614

23.4

$544

18.1

$421

22.6

$445

17.2

$408

Andhereisthesamedataasa ScatterPlot :

Wecaneasilyseethatwarmerweatherleadstomoresales,therelationshipisgoodbut
notperfect.

https://www.mathsisfun.com/data/correlation.html

2/7

Infactthecorrelationis0.9575...seeattheendhowIcalculatedit.

Correlation Is Not Good at Curves


Thecorrelationcalculationonlyworkswellforrelationshipsthatfollowastraightline.

OurIceCreamExample:therehasbeenaheatwave!
Itgetssohotthatpeoplearen'tgoingneartheshop,andsalesstart
dropping.
Hereisthelatestgraph:

Thecorrelationvalueisnow0:"NoCorrelation"...!
Thecalculatedcorrelationvalueis0(Iworkeditout),whichmeans"no
correlation".
Butwecanseethedatadoeshaveacorrelation:itfollowsanicecurve
thatreachesapeakaround25C.
Butthelinearcorrelationcalculationisnot"smart"enoughtoseethis.

Moralofthestory:makea ScatterPlot ,andlookatit!


Youmayseeacorrelationthatthecalculationdoesnot.

Correlation Is Not Causation

https://www.mathsisfun.com/data/correlation.html

3/7

Correlation Is Not Causation


"CorrelationIsNotCausation"...whichsaysthatacorrelationdoesnotmeanthatone
thingcausestheother(therecouldbeotherreasonsthedatahasagoodcorrelation).

Example:SunglassesvsIceCream
OurIceCreamshopfindshowmanysunglassesweresoldbyabigstorefor
eachdayandcomparesthemtotheiricecreamsales:

ThecorrelationbetweenSunglassesandIceCreamsalesishigh
Doesthismeanthatsunglassesmakepeoplewanticecream?

Example:ARealCase!
Afewyearsagoasurveyofemployeesfounda
strongpositivecorrelationbetween"Studying
anexternalcourse"andSickDays.
Doesthismean:
Studyingmakesthemsick?
Sickpeoplestudyalot?
Ordidtheylieaboutbeingsicktostudy
more?
Withoutfurtherresearchwecan'tbesurewhy.
https://www.mathsisfun.com/data/correlation.html

4/7

How To Calculate
HowdidIcalculatethevalue0.9575atthetop?
Iused"Pearson'sCorrelation".Thereissoftwarethatcancalculateit,suchasthe
CORREL()functioninExcelorLibreOfficeCalc...

...buthereishowtocalculateityourself:
Letuscallthetwosetsofdata"x"and"y"(inourcaseTemperatureisxandIceCream
Salesisy):
Step1:Findthemeanofx,andthemeanofy
Step2:Subtractthemeanofxfromeveryxvalue(callthem"a"),dothesame
fory(callthem"b")
Step3:Calculate:ab,a2andb2foreveryvalue
Step4:Sumupab,sumupa2andsumupb2
Step5:Dividethesumofabbythesquarerootof[(sumofa2)(sumof
b2)]
HereishowIcalculatedthefirstIceCreamexample(valuesroundedto1or0decimal
places):

https://www.mathsisfun.com/data/correlation.html

5/7

Asaformulaitis:

Where:

isSigma,thesymbolfor"sumup"
iseachxvalueminusthemeanofx(called"a"above)
iseachyvalueminusthemeanofy(called"b"above)
Youprobablywon'thavetocalculateitlikethat,butatleastyouknowitisnot"magic",
butsimplyaroutinesetofcalculations.

NoteforProgrammers
https://www.mathsisfun.com/data/correlation.html

6/7

Youcancalculateitinonepassthroughthedata.Justsumupx,y,x2,y2
andxy(noneedforaorbcalculationsabove)thenusetheformula:

OtherMethods
Thereareotherwaystocalculateacorrelationcoefficient,suchas"Spearman'srank
correlationcoefficient",butIpreferusingaspreadsheetlikeabove.

Question1Question2Question3Question4
Question5Question6Question7Question8
Question9Question10

Search::Index::About::Contact::Contribute::CiteThisPage::Privacy

Copyright2016MathsIsFun.com

https://www.mathsisfun.com/data/correlation.html

7/7

You might also like