domingo, 17 de enero de 2016

Pearson Correlation

Pearson Correlation 


The correlation between the income per person and electricity consumption per person reveal the Pearson Correlation Coefficient r=0.65164, therefore it means that it has a positve relationship and like this value is not close to 1, that is no strong relationship and p-value<0.001 indicates that is enough significatly.
The r2=0.4246 means that we can predict 42.46% of the variability in the rate electricity per person.
The same way the correlation between the income per person and oil consumption per person reveal the Pearson Correlation Coefficient r=0.54189, therefore it means that it has a positve relationship

LIBNAME mydata "/courses/d1406ae5ba27fe300 " access=readonly;
DATA new; set mydata.gapminder;
IF incomeperperson eq . THEN incomegroup=.;
ELSE IF incomeperperson LE 744.239 THEN incomegroup=1;
ELSE IF incomeperperson LE 2553.496 THEN incomegroup=2;
ELSE IF incomeperperson LE 9425.236 THEN incomegroup=3;
ELSE IF incomeperperson GT 9425.236 THEN incomegroup=3;

PROC SORT; by COUNTRY;

PROC CORR; VAR incomeperperson relectricperperson oilperperson;

RUN;
Procedimiento CORR

3 Variables:incomeperperson relectricperperson oilperperson
Estadísticos simples
VariableNMediaDev stdSumaMínimoMáximoEtiqueta
incomeperperson1908741142631660784103.77586105147INCOMEPERPERSON
relectricperperson13611731681159552011155RELECTRICPERPERSON
oilperperson631.484091.8250993.497370.0322812.22864OILPERPERSON
Coeficientes de correlación Pearson
Prob > |r| suponiendo H0: Rho=0
Número de observaciones
incomeperpersonrelectricperpersonoilperperson
incomeperperson
INCOMEPERPERSON
1.00000
190
0.65164
<.0001
130
0.54189
<.0001
61
relectricperperson
RELECTRICPERPERSON
0.65164
<.0001
130
1.00000
136
0.52494
<.0001
63
oilperperson
OILPERPERSON
0.54189
<.0001
61
0.52494
<.0001
63
1.00000
63

No hay comentarios:

Publicar un comentario