Академический Документы
Профессиональный Документы
Культура Документы
ANALISIS DE REGRESION
LINEAL Y MULTIPLE
Docente:
2015-II
TEORIA
TEMAS A DESARROLLAR
Anlisis de Regresin Lineal Simple;
Coeficiente de determinacin, Coeficiente
de correlacin.
Anlisis de Regresin Polinomial de 1er y
2do grado.
Regresin Lineal Mltiple.
Regresin Lineal Mltiple con 2 variables
independientes.
ANLISIS DE REGRESIN
Consiste en emplear mtodos estadsticos que determinen
matemticamente un modelo de la curva que ms se ajusta a
los datos.
Es decir: y = f (xi )
Donde:
y = variable dependiente
x = variable independiente
f = funcin
Para elegir la relacin funcional que ms se ajusta a los
datos lo 1ro que debemos hacer es el diagrama de
dispersin.
DIAGRAMA DE DISPERSIN
Es la grfica de los valores (xi , yi) este diagrama permite
visualizar la tendencia que siguen los puntos ya sea lineal,
exponencial, etc.
TIPOS DE
REGRESIN
2.-
3.-
1.-
y i A Bx i i
Donde:
y i Variable dependient e
x i Variable indenpendi ente
A, B Coeficient es
i Error
y i a bx i
y i a bx i
(Modelo Muestral)
i
y i A Bx i
(Modelo Poblaciona l)
Es decir:
n
y1 y1 y 2 y 2 .................. y i y i y i y i
2
i
i 1
i2
0
b
Ecuaciones
Normales
y
i 1
na b x i
i 1
2 da Ecuacin Normal
n
i 1
i 1
i 1
2
x
y
a
x
b
x
i i i i 0
y ab
lny lna xlnb
x
y* a * b * x
y* na * b * x
xy* a * x b * x
2
i
Ecuaciones normales
la manera de linealizarlo es
lny ln(ax b )
lny lna blnx
na
*
b
*
x
i
i
* *
*2
x
y
a
*
x
b
x
i i
i i
- y
i - y
2
2
y i Valor observado
y i Valor estimado en base al modelo y i a bx i
Grficamente:
Se sabe:
y i Valor Observado
y
i Valor Estimado
y i - y Desviacin y i con respecto al promedio y.
Luego:
2
2
y
y
y
y
i
i i2
2Variables Independientes
o, B
1, B
2 ,..............., etc.
B
Aplicaremos el criterio de los mnimos cuadrticos:
n
i min
i 1
Luego:
i2
0
Bo
Nos genera estimadores que minimicen la suma cuadrado
del error.
Luego obtendremos:
0n B
1 x B
2 x 2 ................ y
B
2
3
Los estimadore s
0, B
1, B
2 se hallan
B
B0 x B1 x 2 B2 x 3 yx
B0 x 2 B1 x 3 B2 x 4 yx 2
Del modelo:
o B
1x i B
2 x i2 i
yi B
Matricialmente ser:
i
y i xB
y i y i i
Luego:
Ejemplo (n = 4)
1
y1
y
2 1
1
y3
1
y4
x1
x2
x3
x4
x12
2
x2
x 32
2
x 4
0
B
B1
2
B
i
i
12
y xB
0
0
Bi
Bi
xx B xy
x x 1 x y
B
NOTA : Si
y i xB i i y i xB
xi
xx x i x
2
x
i
2
i
3
i
2
x
i
x
x
3
i
4
i
xy x y
x y
i i
2
i i
B 0
B x x 1 x y B1
B 2
El modelo matricial ser:
y/o
y i xB
o B
1x i B
2 x i2
y i B
5.-
ANLISIS DE REGRESIN
LINEAL MULTIPLE
y i B0 B1x1 B 2 x 2 B3 X 3 .................B p x p i
El problema al igual que en la regresin lineal es estimar los
parmetros:
0,B
1, B
2 ,.............B
P
B
Esto se halla minimizando la suma cuadrado del error
2
i
min.
Si:
n
Q i
i 1
yi yi
i 1
0 B
1x1 B
2 x 2 ........B
pxp 2
yi B
n
i 1
Luego:
Q
0.
Bk
Nos dar estimadores mnimos cuadrados
0,
0,..................
B 2
B1
5.1)
Si:
n
0 B
1x1 B
2x 2 2
Q y i y i y i B
i 1
2
I
i 1
i 1
0 B
1 x1 B
2 x 2 yi
nB
0 x1 B
1 x12 B
2 x1x 2 x1 y i
B
0 x2 B
1 x1x 2 B
2 x 22 x 2 y i
B
Expresando matricialmente :
y i xB i i
Ejemplo (n = 4)
y1 1 x11
y 1 x
12
2
y 3 1 x13
y 4 1 x14
Luego:
x 21
x 22
x 23
x 24
0
B
B1
2
B
2
3
4
0 B
1x 11 B
2 x 21 1
y1 B
0 B
1 x 12 B
2 x 22 2
y2 B
0 B
1x 13 B
2 x 23 3
y3 B
0 B
1x14 B
2 x 24 4
y4 B
i se hallan de:
Los valores de B
i2
Bi
i2 y xB y xB
0
Bi
Bi
Luego:
x x B x y
x x 1 x y
B
Hallamos(xx)
1
x x11
x 221
1
x12
1
x13
x 222
x 223
1
x14
x 224
1 x11
x 221
1 x12
x
1 x13
1 x14
x 222
x 223
x 224
Luego:
i 1
n
i 1
n
xx x1i
x x
i 1
1
x x11
x 221
1
x12
x 222
2i
i 1
1i
1i
2
x
1i
i 1
n
i 1
Luego:
i 1
n
x 2i
i 1
2i
y1
y
y 2
y3
y4
y
x y
x y
x y
2i
x
x
1i 2i
1
x14
x 224
1
x13
x 223
1i
2
2i
Entonces:
xx xy
1
i
B
Matriz Inversa.
(Metodo Gauss - Jordan y / o cofactores )
2
ry.12
y
i 1
n
y
i 1
y 2
y 2
0 B
1x1 B
2 x 2 (Modelo Estimado)
y i B
y i Valor Observado
N
I