Relación entre variables cuantitativas
Relación entre variables cuantitativas
Relación entre variables cuantitativas
- No tags were found...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
HOSPITAL NACIONAL DOCENTE MADRE NIÑO<br />
“SAN BARTOLOME”<br />
OFICINA DE APOYO A LA DOCENCIA E INVESTIGACION<br />
LIC. RONALD TORRES MARTINEZ
RELACION ENTRE VARIABLES CUANTITATIVAS<br />
DETERMINACION DE LA ECUACION DE<br />
REGRESION SIMPLE<br />
Ecuación de regresión:<br />
ˆ<br />
0<br />
b = -<br />
ˆ b<br />
1<br />
n<br />
Y<br />
1 X<br />
x<br />
y<br />
b<br />
-<br />
x<br />
Yˆ<br />
i i i<br />
=<br />
2<br />
2<br />
n yi<br />
- ( xi<br />
)<br />
= ˆ b + ˆ b X<br />
y<br />
i<br />
Para un análisis general se considera una variable aleatoria u i ,<br />
tal como:<br />
u i representa todas las <strong>variables</strong> intervinientes en el análisis de<br />
regresión.<br />
0<br />
Y<br />
1<br />
=<br />
1<br />
n<br />
Y ˆ bˆ<br />
+ bˆ<br />
X +<br />
= 0 1 1<br />
y<br />
i<br />
u i<br />
X<br />
=<br />
x<br />
n<br />
i
RELACION ENTRE VARIABLES CUANTITATIVAS<br />
DETERMINACION DE LA ECUACION DE<br />
REGRESION SIMPLE<br />
Aplicación:<br />
Se realiza un estudio de fotoperiodo X (horas de Y (tiempo de<br />
En aves acuáticas.<br />
Luz por día) reproducción)<br />
12,8<br />
Se pretende establecer una ecuación<br />
110<br />
13,9<br />
mediante la cual pueda predecirse el<br />
54<br />
14,1<br />
tiempo de reproducción (Y) en base<br />
98<br />
14,7<br />
al conocimiento del fotoperiodo (X)<br />
50<br />
15,0<br />
(numero total de horas de luz por día)<br />
67<br />
15,1<br />
bajo el que se inicio la reproducción.<br />
58<br />
16,0 52<br />
Se obtuvieron los siguientes datos 16,5 50<br />
Observando el comportamiento de 16,6 43<br />
11 Aythya (patos buceadores).<br />
17,2 15<br />
17,9 28
RELACION ENTRE VARIABLES CUANTITATIVAS<br />
DETERMINACION DE LA ECUACION DE<br />
REGRESION SIMPLE<br />
Aplicación:<br />
X<br />
12,8<br />
13,9<br />
14,1<br />
14,7<br />
15,0<br />
15,1<br />
16,0<br />
16,5<br />
16,6<br />
17,2<br />
17,9<br />
Y<br />
110<br />
54<br />
98<br />
50<br />
67<br />
58<br />
52<br />
50<br />
43<br />
15<br />
28<br />
X 2<br />
163,84<br />
193,21<br />
198,81<br />
216,09<br />
225,00<br />
228,01<br />
256,00<br />
272,25<br />
275,56<br />
295,84<br />
320,41<br />
Y 2<br />
12100<br />
2916<br />
9604<br />
2500<br />
4489<br />
3364<br />
2704<br />
2500<br />
1849<br />
225<br />
784<br />
XY<br />
1408,00<br />
750,60<br />
1381,80<br />
735,00<br />
1005,00<br />
875,80<br />
832,00<br />
825,00<br />
713,80<br />
258,00<br />
501,20<br />
∑ 169,8 625,00 2645,02 43035 9286,20<br />
ˆb 1<br />
ˆb 0<br />
ˆ b<br />
1<br />
=<br />
ˆ<br />
0<br />
n<br />
x<br />
y<br />
-<br />
-<br />
x<br />
i i i<br />
=<br />
2<br />
2<br />
n yi<br />
( xi<br />
)<br />
y<br />
(11)(9286,20)- (169,8) (625)<br />
ˆ1<br />
b = -15,11<br />
b = -<br />
=<br />
(11)(2645,02) (169,8) 2<br />
Y b1X<br />
(625)<br />
(11) -<br />
(-15,11)(169,8)<br />
(11)<br />
ˆ0<br />
b = 290,06<br />
-<br />
i
RELACION ENTRE VARIABLES CUANTITATIVAS<br />
DETERMINACION DE LA MEDIDA O FUERZA DE CORRELACION<br />
Coeficiente de correlación R de PEARSON:<br />
R<br />
=<br />
n<br />
XY<br />
-<br />
( n x<br />
2<br />
- ( x)<br />
2<br />
)( n y<br />
2<br />
- ( y)<br />
2<br />
)<br />
X<br />
Y<br />
R =<br />
11(9286,2) - (169,8)(625)<br />
(11(2645,02) - (169,8)<br />
R = -0,85271275<br />
2<br />
)(11(43035)<br />
- (625)<br />
2<br />
120<br />
100<br />
80<br />
60<br />
40<br />
20<br />
0<br />
0 5 10 15 20
RELACION ENTRE VARIABLES CUANTITATIVAS<br />
Regresión Lineal<br />
El coeficiente de determinación R 2 , mide el mejor ajuste Lineal.<br />
R 2 = 0.0559 R 2 = 0.6328 R 2 = 0.9189<br />
R 2 fi 1.00<br />
Mayor Ajuste Lineal<br />
R 2 = 0.9998 R 2 = 1.00<br />
R 2 fi 0.00<br />
Menor Ajuste Lineal
RELACION ENTRE VARIABLES CUANTITATIVAS<br />
CORRELACION<br />
La correlación se refiere a la medición de la intensidad de la relación<br />
<strong>entre</strong> las <strong>variables</strong> o grado de correlación lineal. Se mide mediante el<br />
coeficiente de correlación de Pearson. R 2<br />
Sabemos que: 0 £ R 2 £ 1 -1 £ R £ +1<br />
Si R>0 Correlación directa positiva<br />
Si R
RELACION ENTRE VARIABLES CUANTITATIVAS<br />
DIAGRAMAS DE DISPERSION Y CORRELACION<br />
El coeficiente de Correlación se ve afectado por los casos extremos<br />
que pueden haber.<br />
R 2 = 0.6911 R 2 = 0.9747<br />
POSIBLES ANOMALIAS DE LA RELACION CON GRUPOS<br />
B<br />
C<br />
B<br />
R = 0.9556 A<br />
R = 0.5422<br />
A<br />
R A fi 0.0<br />
R A fi 1.0<br />
R B fi 0.0<br />
C R B fi 1.0<br />
R C fi 0.0<br />
R C fi 1.0
RELACION ENTRE VARIABLES CUANTITATIVAS<br />
CORRELACION PARCIAL<br />
Sean las <strong>variables</strong> Y, X 1 , y X 2 , si tratamos de eliminar de Y y de X 1<br />
toda influencia lineal de X 2 . Tendremos como resultado el<br />
Coeficiente de correlación parcial<br />
También, se dice que es el coeficiente de correlación parcial <strong>entre</strong><br />
Y y X1, manteniendo constante X 2 .<br />
AJUSTE DE UNA RELACION BIVARIADA<br />
Se emplea cuando se quiere estudiar el tipo de relación que hay <strong>entre</strong> dos<br />
<strong>variables</strong>. El tipo puede ser lineal, cuadrático, cúbico, exponencial y otros.<br />
Se elige, el modelo que presente mayor R 2 .<br />
REGRESION MULTIPLE LINEAL<br />
Es una técnica estadística que estudia la relación lineal <strong>entre</strong> una variable<br />
(criterio) y una o mas <strong>variables</strong> (predictoras).<br />
Nivel de medida: Intervalo o razón<br />
También Ordinal y Dicotómicas.
RELACION ENTRE VARIABLES CUANTITATIVAS<br />
FUERZA GLOBAL DE LA ASOCIACION<br />
Es la asociación lineal <strong>entre</strong> las <strong>variables</strong> predictoras (más de una)<br />
y la criterio (R 2 ).<br />
Ejm:<br />
Si R2=0,943, indica que el 94,3% de la varianza de la variable criterio,<br />
está predicha por las <strong>variables</strong> predictoras.<br />
R2=1, indica que el 100% de la variabilidad de la variable criterio es<br />
explicada por las <strong>variables</strong> predictoras (Relación Lineal Perfecta).<br />
COEFICIENTES DE REGRESION LINEAL<br />
ˆ 0 1 1 2 2<br />
Y<br />
= b + b X + b X + ... +<br />
b<br />
n X n<br />
β i son los parámetros a estimar<br />
El Coeficiente o parámetro se interpreta como:<br />
Por cada unidad que aumenta la variable Predictora (ind.), la variable,<br />
la variable criterio (dep.) en β i unidades
RELACION ENTRE VARIABLES CUANTITATIVAS<br />
Hipótesis:<br />
H o : β i =0<br />
H 1 : β i „ 0<br />
COEFICIENTES DE REGRESION LINEAL<br />
Si a i =0, no hay relación lineal <strong>entre</strong> la variable X i e Y<br />
Si a i „0, hay relación lineal <strong>entre</strong> la variable X i e Y<br />
En general, las X i tienen distintas unidades por lo que se consideran las a i<br />
estandarizados pudiendose compara los ai como k veces a j .<br />
COEFICIENTES DE CORRELACION PARCIAL Y SEMIPARCIAL<br />
El coeficiente de correlación de Pearson indica el grado de ajuste<br />
correlacional lineal y es llamado también de orden cero.<br />
El Coeficiente de Correlación semiparcial al cuadrado se interpreta como<br />
el incremento absoluto de R 2 debido a esa variable predictora.<br />
Es decir, debido a la adición de esa variable en la ecuación de la regresión<br />
que contiene al resto de las <strong>variables</strong> predictoras.
RELACION ENTRE VARIABLES CUANTITATIVAS<br />
COEFICIENTES DE CORRELACION PARCIAL Y SEMIPARCIAL<br />
Si r sp =0,556, entonces r sp 2 =0,309, es decir es el incremento de R 2<br />
debido a la variable predictora.<br />
La Suma de todos los coeficientes semiparciales elevados al cuadrado<br />
se le llama varianza única y a la cantidad 1-R 2 , varianza compartida.<br />
El coeficiente de correlación parcial al cuadrado relativo de R 2 , debido<br />
a esa variable predictora. Es decir, el incremento proporcional de R 2<br />
debido a la adición de esa variable expresado como la proporción de<br />
la variación no explicada por el resto de las <strong>variables</strong><br />
Si r p =0,791, entonces r p 2 =0,6249 o 62,49% explica el 62,49% de lo<br />
que no explican (de la variación de la variable criterio) el resto de<br />
las <strong>variables</strong> predictoras.<br />
El coeficiente de correlación semiparcial nunca es mayor que el<br />
coeficiente de correlación parcial
RELACION ENTRE VARIABLES CUANTITATIVAS<br />
TOLERANCIA<br />
Es la proporción de varianza de cada variable predictora no explicada<br />
por el resto de las <strong>variables</strong> predictoras. Es una medida de la<br />
redundancia de una variable, cuanto menor es el valor mas redundante<br />
(superflua) es la variable.<br />
FIV (FACTORES DE LA INFLACIÓN DE LA VARIANZA)<br />
No conviene usar <strong>variables</strong> cuya tolerancia sea cercana a cero,<br />
alternativamente no conviene usar <strong>variables</strong> cuya FIV sea muy alta.<br />
ECUACION PARA PREDECIR<br />
La ecuación para predecir valores de la variable criterio Y, se puede<br />
hacer tanto en base a los coeficientes no típicos (b) como base a los<br />
coeficientes (b), en el primer caso se predicen puntuaciones directas<br />
y en el segundo se predicen puntuaciones típicas.<br />
Requisitos:<br />
-Normalidad de la distribución de los errores<br />
- La homocedasticidad (igualdad de la varianza a lo largo de la<br />
distribución).
Aplicación<br />
RELACION ENTRE VARIABLES CUANTITATIVAS<br />
ANALISIS DE REGRESION LINEAL<br />
Como parte de un estudio para investigar la relación que existe <strong>entre</strong><br />
el estrés y varias otras <strong>variables</strong>, se recopilaron los siguientes datos<br />
de una muestra aleatoria simple de quince trabajadores de un centro<br />
de salud.<br />
Variables:<br />
Medida del estrés<br />
Medida de la importancia del servicio<br />
Tiempo de permanencia laborando en el Servicio<br />
Salario x 100<br />
Edad
Medida del estres<br />
Medida de la Importancia<br />
del Servicio<br />
Tiempo de permanencia<br />
laborando en el Servicio<br />
Pearson Correlation<br />
Sig. (2-tailed)<br />
N<br />
Pearson Correlation<br />
Sig. (2-tailed)<br />
N<br />
Pearson Correlation<br />
Sig. (2-tailed)<br />
N<br />
Correla tions<br />
Tiempo de<br />
Medida de la permanencia<br />
Medida del Importancia laborando en<br />
es tres del Servicio el Servicio Salariox100 Edad<br />
1 .622* .355 .615* .479<br />
. .013 .194 .015 .071<br />
15 15 15 15 15<br />
.622* 1 .501 .088 -.092<br />
.013 . .057 .754 .745<br />
15 15 15 15 15<br />
.355 .501 1 .384 -.068<br />
.194 .057 . .157 .810<br />
15 15 15 15 15<br />
Salariox100<br />
Pearson Correlation .615* .088 .384 1 .288<br />
Sig. (2-tailed)<br />
.015 .754 .157 . .298<br />
N<br />
15 15 15 15 15<br />
Edad<br />
Pearson Correlation .479 -.092 -.068 .288 1<br />
Sig. (2-tailed)<br />
.071 .745 .810 .298 .<br />
N<br />
15 15 15 15 15<br />
*. Correlation is significant at the 0.05 level (2-tailed).
Model<br />
1<br />
a.<br />
Model Summary b<br />
Adjusted Std. Error of<br />
R R Square R Square the Estimate<br />
.932 a .869 .816 21.93380<br />
Predictors: (Constant), Edad, Tiempo de permanencia<br />
laborando en el Servicio, Salariox100, Medida de la<br />
Importancia del Servicio<br />
b. Dependent Variable: Medida del estres<br />
Model<br />
1<br />
a.<br />
Regression<br />
Residual<br />
Total<br />
ANOVA b<br />
Sum of<br />
Squares df Mean Square F Sig.<br />
31837.483 4 7959.371 16.544 .000 a<br />
4810.917 10 481.092<br />
36648.400 14<br />
Predictors: (Constant), Edad, Tiempo de permanencia laborando en el Servicio,<br />
Salariox100, Medida de la Importancia del Servicio<br />
b. Dependent Variable: Medida del estres
Model<br />
1<br />
(Constant)<br />
Medida de la<br />
Importancia<br />
del Servicio<br />
Tiempo de<br />
permanencia<br />
laborando en<br />
el Servicio<br />
Salariox100<br />
Edad<br />
Unstandardized<br />
Coefficients<br />
a. Dependent Variable: Medida del estres<br />
Coefficients a<br />
Standardized<br />
Coefficients<br />
95% Confidence<br />
Interval for B<br />
Std.<br />
Lower Upper<br />
B Error Beta t Sig. Bound Bound<br />
-141.4 31.281 -4.521 .001 -211.11 -71.710<br />
.189 .036 .692 5.181 .000 .108 .270<br />
-1.949 1.801 -.158 -1.083 .304 -5.962 2.063<br />
1.536 .406 .503 3.783 .004 .631 2.440<br />
1.982 .625 .388 3.173 .010 .590 3.374
Coefficients a<br />
Model<br />
1<br />
(Constant)<br />
Medida de la<br />
Importancia<br />
del Servicio<br />
Tiempo de<br />
permanencia<br />
laborando en<br />
el Servicio<br />
Salariox100<br />
Edad<br />
Unstandardized<br />
Coefficients<br />
a. Dependent Variable: Medida del estres<br />
Standardized<br />
Coefficients<br />
Std.<br />
B Error Beta t Sig.<br />
-141.410 31.281 -4.521 .001<br />
Correlations<br />
Zeroorder<br />
Partial Part<br />
.189 .036 .692 5.181 .000 .622 .854 .594<br />
-1.949 1.801 -.158 -1.083 .304 .355 -.324 -.124<br />
1.536 .406 .503 3.783 .004 .615 .767 .433<br />
1.982 .625 .388 3.173 .010 .479 .708 .363
Coefficient Correlations a<br />
Model<br />
1<br />
Correlations<br />
Covariances<br />
Edad<br />
Tiempo de permanencia<br />
laborando en el Servicio<br />
Salariox100<br />
Medida de la Importancia<br />
del Servicio<br />
Edad<br />
Tiempo de permanencia<br />
laborando en el Servicio<br />
Salariox100<br />
Medida de la Importancia<br />
del Servicio<br />
a. Dependent Variable: Medida del estres<br />
Tiempo de<br />
permanencia<br />
Medida de la<br />
laborando en<br />
Importancia<br />
Edad el Servicio Salariox100 del Servicio<br />
1.000 .163 -.336 .024<br />
.163 1.000 -.421 -.497<br />
-.336 -.421 1.000 .115<br />
.024 -.497 .115 1.000<br />
.390 .183 -.085 .001<br />
.183 3.243 -.308 -.033<br />
-.085 -.308 .165 .002<br />
.001 -.033 .002 .001
(Constant)<br />
Medida de la<br />
Importancia<br />
del Servicio<br />
Tiempo de<br />
permanenci<br />
a laborando<br />
en el<br />
Servicio<br />
Salariox100<br />
Edad<br />
Unstandardized<br />
Coefficients<br />
Coe fficie nts a<br />
Standardized<br />
Coefficients<br />
Std.<br />
B Error Beta Sig.<br />
-141.41 31.281 .001<br />
Correlations<br />
Zeroorder<br />
Partial Part<br />
Toler<br />
ance<br />
.189 .036 .692 .000 .622 .854 .594 .736 1.359<br />
-1.949 1.801 -.158 .304 .355 -.324 -.12 .616 1.624<br />
1.536 .406 .503 .004 .615 .767 .433 .744 1.345<br />
1.982 .625 .388 .010 .479 .708 .363 .879 1.137<br />
a. Dependent Variable: Medida del estres<br />
Collinearity<br />
Statistics<br />
Si tolerancia tiende a cero, la variable es mas redundante (superflua)<br />
Si la FIV es alta denota una variable redundante:<br />
Tiempo de permanencia Laborando en el servicio, aunque se debe<br />
considerar que la tolerancia es alta, ya que es superior a 0.50<br />
V IF
Quitamos variable tiempo de permanencia en el servicio<br />
Model Summary b<br />
Model<br />
1<br />
a.<br />
Adjusted Std. Error of<br />
R R Square R Square the Estimate<br />
.924 a .853 .813 22.10445<br />
Predictors: (Constant), Edad, Medida de la Importancia<br />
del Servicio, Salariox100<br />
b. Dependent Variable: Medida del estres<br />
Modelo 1 R 2 = 0,869<br />
Modelo 2 R 2 = 0,85.3<br />
No hubo mejoras, pero R2 bajo<br />
De 0,869 a 0,853
Quitamos variable tiempo de permanencia en el servicio<br />
Model<br />
1<br />
Regression<br />
Residual<br />
Total<br />
ANOVA b<br />
Sum of<br />
Squares df Mean Square F Sig.<br />
31273.725 3 10424.575 21.335 .000 a<br />
5374.675 11 488.607<br />
36648.400 14<br />
a. Predictors: (Constant), Edad, Medida de la Importancia del Servicio, Salariox100<br />
b. Dependent Variable: Medida del estres<br />
Aunque sigue siendo significativo
Quitamos variable edad y dejamos<br />
tiempo de permanencia en el servicio<br />
Model Summary b<br />
Model<br />
1<br />
a.<br />
Adjusted Std. Error of<br />
R R Square R Square the Estimate<br />
.858 a .737 .665 29.62360<br />
Predictors: (Constant), Tiempo de permanencia<br />
laborando en el Servicio, Salariox100, Medida de la<br />
Importancia del Servicio<br />
b. Dependent Variable: Medida del estres<br />
Modelo 1 R 2 = 0,869<br />
Modelo 2 R 2 = 0,853<br />
Modelo 3 R 2 = 0,737<br />
No hubo mejoras<br />
R 2 bajo mucho más<br />
Por tanto Edad contribuye mucho mas<br />
al modelo
Quitamos variable edad y tiempo de permanencia en el servicio<br />
Model Summary b<br />
Model<br />
1<br />
a.<br />
Adjusted Std. Error of<br />
R R Square R Square the Estimate<br />
.838 a .702 .652 30.16344<br />
Predictors: (Constant), Salariox100, Medida de la<br />
Importancia del Servicio<br />
b. Dependent Variable: Medida del estres<br />
Modelo 1 R 2 = 0,869<br />
Modelo 2 R 2 = 0,853<br />
Modelo 3 R 2 = 0,737<br />
Modelo 4 R 2 = 0,702<br />
Al quitar ambas <strong>variables</strong> R2 baja<br />
de 0,869 a 0,702.<br />
Por tanto ambas <strong>variables</strong><br />
Contribuyen al modelo
TEMA<br />
• INFERENCIA DE UNA<br />
MUESTRA<br />
¿