Documente Academic
Documente Profesional
Documente Cultură
ANALISIS DE REGRESION
LINEAL Y MULTIPLE
Docente:
Mercedes Aida Osorio Maza
mosorio@uni.edu.pe
2018 - II
TEORIA
TEMAS A DESARROLLAR
Análisis de Regresión Lineal Simple;
Coeficiente de determinación, Coeficiente
de correlación.
Análisis de Regresión Polinomial de 1er y
2do grado.
Regresión Lineal Múltiple.
Regresión Lineal Múltiple con 2 variables
independientes.
ANÁLISIS DE REGRESIÓN
Consiste en emplear métodos estadísticos que determinen
matemáticamente un modelo de la curva que más se ajusta a
los datos.
Es decir: y= f (xi )
Donde:
y = variable dependiente
x = variable independiente
f = función
Para elegir la relación funcional que más se ajusta a los
datos lo 1ro que debemos hacer es el diagrama de
dispersión.
DIAGRAMA DE DISPERSIÓN
Es la gráfica de los valores (xi , yi) este diagrama permite
visualizar la tendencia que siguen los puntos ya sea lineal,
exponencial, etc.
Otros diagramas de dispersión:
yi A Bx i i
Donde:
y i Variable dependient e
x i Variable indenpendi ente
A, B Coeficient es
i Error
Si tenemos un diagrama de dispersión lineal y si asumimos
un modelo de estimación de la forma:
Tendremos:
ŷi a bx i
ŷi a bx i (Modelo Muestral)
i
yi A Bx i (Modelo Poblaciona l)
Es decir:
n
y1 ŷ1 y 2 ŷ 2 ..................y i ŷ i y i ŷ i
2 2 2 2 2
i
i 1
i2 i2
0 0 Ecuaciones Normales
a b
Obtenemos las Ecuaciones Normales:
n n
y
i 1
i na b x i
i 1
2 da Ecuación Normal
n n n
x y
i 1
i i a x i b x 0
i 1 i 1
2
i
2.- ANÁLISIS DE REGRESIÓN EXPONENCIAL
y ab x
y* a * b * x
La estimación de a* y b* se halla igual que la regresión
lineal simple de las ecuaciones:
y* na * b * x i
2
Ecuaciones normales
xy* a * x b * x
i i
i
y *
na * b * i
x *
i i
x * *
y a * i i
x b x *2
COEFICIENTE DE DETERMINACIÓN (r2)
ŷ - y
2
r 2
i
y i - y
2
y i Valor observado
ŷ i Valor estimado en base al modelo ŷ i a bx i
Gráficamente:
Se sabe:
yi Valor Observado
ŷi Valor Estimado
y i - y Desviación y i con respecto al promedio y.
ŷ i - y desviación de y i con respecto al promedio y.
i y i ŷ i
Luego:
iy - y 2
iŷ - y 2
i
2
.
y i Bo B1x B2 x 2 B3 x 3 .................. i
i min
2
i 1
Luego:
i2
0
Bo
B̂0 x 2 B̂1 x 3 B̂2 x 4 ........ yx 2
Matricialmente será:
y i xB̂ i
y i ŷ i i
Luego:
Ejemplo (n = 4)
y1 1 x1 x12 i
y 2
B̂0
2 1 x2 x 2 i
2
B̂1
y 3 1 x3 x3 i
2
B̂2
y 4 1 x4 x 4 i
Para poder hallar los parámetros, aplicamos el método de los
mínimos cuadrados.
12 y xB̂ y xB̂
0 0
Bi Bi
n xi i
x 2
xx x i i
x 2
i
x 3
x i2 i
x 3
i
x 4
yi
x y xi yi
xi2 yi
Bˆ 0
B̂ x x x y B1
1
ˆ
Bˆ 2
y i B0 B1x1 B2 x 2 B3 X 3 .................Bp x p i
i min.
2
Si:
i 1 i 1 i 1
Luego:
Q
0.
B k
Nos dará estimadores mínimos cuadrados
Q Q
0, 0,..................
B1 B2
5.1) REGRESIÓN LINEAL MULTIPLE
(2 Variables Independientes)
Si:
i 1 i 1 i 1
yi xB i i
Ejemplo (n = 4)
y1 1 x11 x 21 1
y 1 B̂0
2 x12 x 22 2
B̂1
y3 1 x13 x 23 3
B̂2
y 4 1 x14 x 24 4
Luego:
y1 B̂0 B̂1x11 B̂ 2 x 21 1
y 2 B̂0 B̂1x12 B̂ 2 x 22 2
y 3 B̂0 B̂1x13 B̂ 2 x 23 3
y 4 B̂0 B̂1x14 B̂ 2 x 24 4
Los valores de B̂ i se hallan de:
i2
Bi
i2 y xB y xB
0
Bi Bi
Luego:
xx B̂ xy
B̂ xx xy
1
Hallamos(x’x)
1 x11 x 221
1 1 1 1
x 222
x x11 x14 1 x12
x12 x13 x
1 x13 x 223
x 221 x 222 x 223 x 224 2
1 x14 x 24
Luego: n n
n x 1i x 2i
n i 1
n n
i 1
xx x1i 1i
x 2
x x
1i 2i
i 1 i 1 i 1
n n n
x 2i x x 2i x 2i
i 1
1i
i 1 i 1
y1
1 1 1 1 y
x x11 x12 x13 x14 y 2
y3
x 221 x 222 x 223 x 224
y4
Luego:
yi
xy x1i y i
x 22i y i
Entonces:
B̂i
x x x y
1
Matriz Inversa.
(Metodo Gauss - Jordan y / o cofactores )
ŷ i y 2
2
ry.12 i 1
n
y
i 1
i y 2
4.5
3.5
3 Series1
y = 191.2e-1386x
LN(P)
Lineal (Series1)
R² = 0.879
Polinómica (Series1)
2.5 Exponencial (Series1)
y = -3631.x + 14.04
R² = 0.940
2
1.5
y = -5E+12x 4 + 5E+10x 3 - 2E+08x 2 + 45703x - 321.3
R² = 0.941
1
0.0026 0.0027 0.0028 0.0029 0.003 0.0031 0.0032 0.0033 0.0034 0.0035 0.0036
1/T
DIAGRAMA DE DISPERSIÓN CUADRATICA
8
7 7
5 5
4
Presión(P)
3 3
y = 0.000x3 - 0.114x2 + 39.08x - 4444.
R² = 0.998
2
y = 0.004x2 - 3.196x + 546.3 1.8
R² = 0.975
1 1.1
Series1
0.7
0.4
Polinómica (Series1)
0.15 0.17 0.2
0 0 Polinómica (Series1)
325 335 345 355 365 375 385
-1
Temperatura(T)
VIDEO INTRODUCTORIO DE ANÁLISIS DE
REGRESIÓN LINEAL Y MÚLTIPLE
VIDEO DE RESOLUCIÓN DE EJERCICIOS DE
ANÁLISIS DE REGRESIÓN LINEAL Y
MÚLTIPLE