Está en la página 1de 5

Realizar un análisis de regresión simple completo, utilizando datos reales (indicar

la fuente).

APÉNDICE TEÓRICO
Aplicación del método de mínimos cuadrados para obtener estimadores de los pará
metros
caso: Regresión lineal simple
Inicialmente se conoce que el modelo estadístico de regresión es dado por

y = β o + β 1x + ε

Supongamos que ŷ = β̂ o + β̂ 1x es la línea recta ajustada a los datos , para


determinar la expresión de los estimadores de los parámetros β o y β 1, se aplica el m
étodo de mínimos cuadrados, que exige que β̂ o y β̂ 1 minimicen la suma de
cuadrados de los residuales con relación a la recta; es decir

SC error = ∑e
i=1
2
i

∑( y − ŷ ) 2
= i
i=1
n

= ∑( y − β̂
i=1
i o − β̂ 1x )
Se obtienen haciendo las dos derivadas parciales, ∂SC error / ∂β̂ o y ∂SC error / ∂β̂ 1,
iguales a 0 y resolviendo el sistema de ecuaciones simúltaneo como se presenta a
continuación

n
∂SC error
∂β̂ o
= ∑2
i=1
yi − ( β̂ o + β̂ 1x i ) ( −1)
n
∂SC error
∂β̂ 1
= ∑2
i=1
yi − ( β̂ o + β̂ 1x i ) ( −x ) i

Si igualamos a 0 estas derivadas parciales y simplificamos

Ecuación para β̂ o :
n

− ∑2 i=1
yi − ( β̂ o + β̂ 1x i ) = 0

n n n

∑ y − ∑β̂
i=1
i
i=1
o − β̂ 1 ∑x
i=1
i = 0

n n
como β̂ o es constante para ∑ β̂ o enonces ∑ β̂ o = nβ̂ o y así
i=1 i=1

n n

∑ y − nβ̂
i=1
i o − β̂ 1 ∑x i=1
i = 0

n n

∑y
i=1
i = nβ̂ o + β̂ 1 ∑x i=1
i

Ecuación para β̂1 :

∑2 i=1
yi − ( β̂ o + β̂ 1x i ) ( −x ) i = 0


i=1
( − x i ) y i − ( − x i )β̂ o + ( − x i )β̂ 1x i = 0

∑( − x y + x β̂
i=1
i i i o + β̂ 1x 2i ) = 0

n n n

− ∑x y − ∑x β̂ + ∑x β̂
i=1
i i
i=1
i o
i=1
2
i 1 = 0

multiplicando por − 1 se tiene

n n n

∑x y − β̂ ∑x − β̂ ∑x
i=1
i i o
i=1
i 1
i=1
2
i = 0

n n n

∑x y
i=1
i i = β̂ o ∑x + β̂ ∑x
i=1
i 1
i=1
2
i

En resúmen se tienen las siguientes ecuaciones

n n

∑y
i=1
i = nβ̂ o + β̂ 1 ∑x
i=1
i

n n n

∑x yi=1
i i = β̂ o ∑x + β̂ ∑x
i=1
i 1
i=1
2
i

Al resolver este par de ecuaciones lineales simultáneas


despejando β̂ o de la primera ecuación
n n

β̂ o = (1/n) ∑ y − β̂ ∑x
i=1
i 1
i=1
i

= y − β̂ 1x

Reemplazando en la segunda ecuación se tiene


procedimiento corto
n n n

∑x y
i=1
i i = ( y − β̂ x ) ∑x 1 ( ) i=1
i + β̂ 1 ∑x
i=1
2
i

n n n

= y ∑x − β̂ x∑x + β̂ ∑x
i=1
i 1
i=1
i 1
i=1
2
i

=
n n n

= y ∑x + β̂ x∑x + β̂ ∑x
i=1
i 1 ( i=1
i 1
i=1
2
i )
n n n

= (1/n) ( ∑ )( ∑ ) ∑
i=1
yi
i=1
xi −
i=1
x iy i

n n n

β̂ 1 =
(1/n) ( ∑ )( ∑ ) ∑
i=1
n
yi
i=1
n
xi −
i=1
n
x iy i

(1/n) ( ∑ )( ∑ ) ∑
i=1
xi
i=1
xi −
i=1
x 2i

n n n

β̂ 1 =
(1/n) ( ∑ ) ( )( ∑ ) ∑
i=1
n
yi n
n
i=1
n
xi −
i=1
n
x iy i

(1/n) ( ∑ ) ( )( ∑ ) ∑
i=1
xi n
n
i=1
xi −
i=1
x 2i

nx y − ∑x y i i
β̂ 1 = i=1
n

nx − ∑x i=1
2
i

β̂ 1 =

(∑ )i=1
n
x i y i − nxy


(∑ ) i=1
x 2i − nx

∑x y − nxyi i

β̂ 1 = i=1
n

∑xi=1
2
i − nx

Ahora obtengamos una forma simplicada del numerador y el denominador

Numerador:
n

∑x y − nxy
i=1
i i
5

Para lo cual se muestra que

n n

∑( x − x )( y − y )
i=1
i i = ∑( x y − x y − xy + x y )
i=1
i i i i

n n n n

= ∑x y − ∑x y − ∑xy + ∑x y
i=1
i i
i=1
i
i=1
i
i=1
n n n

= ∑x y − y∑x − x∑ y + nxy
i=1
i i
i=1
i
i=1
i

Multipilcando por ( n / n ) al segundo y tercer término del lado derecho de la ú


ltima expresión se tiene

n n n n

∑( x − x )( y − y )
i=1
i i = ∑
i=1
( )∑
x i y i − y nn
i=1
( )∑ y + nxy
x i − x nn
i=1
i

= ∑x y − nxy − nx y + nxy
i=1
i i

= ∑x y − nxy
i=1
i i

También podría gustarte