Está en la página 1de 11

TAREA 04: REGRESIÓN MÚLTIPLE Y PRUEBAS T Y F

Desarrollo de taller

Variable Obs Mean Std. Dev. Min Max

mpg 26 20.92308 4.757504 14 35


weight1 26 3.099231 .6950794 2.02 4.33
price 26 6651.731 3371.12 3299 15906
foreign 26 .2692308 .4523443 0 1

En la tabla de estadísticas descriptivas se tiene una muestra de 26 observaciones, media de 20


galos por milla, precio de 6,651.73 dólares y un valor de 0.26 tendencia de que adquirir el
vehículo a nivel nacional.

mpg weight1 price foreign

mpg 1.0000

weight1 -0.8082* 1.0000


0.0000

price -0.4385* 0.5561* 1.0000


0.0251 0.0032

foreign 0.4003* -0.6011* 0.0835 1.0000


0.0427 0.0012 0.6850

En cuanto a la correlación, las tres variables son significativas al 5%,


35
30
miles per gallon

25
20
15

2 2.5 3 3.5 4 4.5


car weight in 1,000 pounds
1. ¿EXISTE RELACIÓN ENTRE MILLAS DE COMBUSTIBLE POR GALÓN Y
PESO DEL CARRO EN 1,000 LIBRAS?

𝐻𝑜 : 𝑟 = 0
𝐻𝑎 : 𝑟(𝑚𝑝𝑔, 𝑤𝑒𝑖𝑔ℎ𝑡1 < 0.…1
1. Planteamiento de
𝐻𝑎 : 𝑟(𝑚𝑝𝑔, 𝑝𝑟𝑖𝑐𝑒 < 0 ….2
hipótesis
𝐻𝑎 : 𝑟(𝑚𝑝𝑔, 𝑓𝑜𝑟𝑒𝑖𝑛𝑔 > 0….3

2. Nivel de significancia 𝛼 = 5%
Valor Critico para una Normal Estandar
Prueba de una cola y α=.05

.4
.3
Density

.2
.1
0

0 1.7108821 6.97
3. Región de rechazo Valor Critico para una xNormal Estandar
Prueba de una cola y α=.05
.4
.3
Density

.2
.1
0

-3.89 -1.7108821 0
x

𝑟√𝑛−2)
4. Estadístico de prueba 𝑡𝑐 = ~𝑡(𝛼,𝑔𝑙)
√1−𝑟 2
Si |𝑡𝑐 | > |𝑡𝑡 | 𝑒𝑛𝑡𝑜𝑛𝑐𝑒𝑠 𝑅𝐻0

5. Decisión Para los casos 3 el t-tablas en valor absoluto


(1.7108821) mientras que el t-calculado son
estadísticamente al 5% de nivel de significancia
Entonces existe suficiente evidencia estadística
6. Conclusión
significativa para rechazar la hipótesis nula.
2. PRUEBAS INDIVIDUALES REGRESIÓN SIMPLE

Regresionando

𝑚𝑝𝑔 = 𝛽1 + 𝛽2 ∗ 𝑤𝑒𝑖𝑔ℎ𝑡1 + 𝜀𝑡
Source SS df MS Number of obs = 26
F(1, 24) = 45.19
Model 369.567767 1 369.567767 Prob > F = 0.0000
Residual 196.278387 24 8.17826611 R-squared = 0.6531
Adj R-squared = 0.6387
Total 565.846154 25 22.6338462 Root MSE = 2.8598

mpg Coef. Std. Err. t P>|t| [95% Conf. Interval]

weight1 -5.531496 .8228604 -6.72 0.000 -7.229797 -3.833196


_cons 38.06646 2.611177 14.58 0.000 32.67726 43.45566

𝑚𝑝𝑔 = 38.066 − 5.531 ∗ 𝑤𝑒𝑖𝑔ℎ𝑡1


35
30
25
20
15

2 2.5 3 3.5 4 4.5


car weight in 1,000 pounds

miles per gallon Fitted values

1. Planteamiento de 𝐻𝑜 : 𝐻0 = 0
hipótesis
𝐻𝑎 : 𝐻𝑎 < 0
2. Nivel de significancia 𝛼 = 5%
Valor Critico para una Normal Estandar
Prueba de una cola y α=.05

.4
.3
Density

.2
3. Región de rechazo

.1
0
-3.89 -1.7108821 0
x

1𝛽
4. Estadístico de prueba 𝑡𝑐 = 𝑠.𝑒.(𝛽 )
~𝑡(𝛼,𝑔𝑙)
1

5. Decisión Si |𝑡𝑐 | > |𝑡𝑡 | 𝑒𝑛𝑡𝑜𝑛𝑐𝑒𝑠 𝑅𝐻0


Entonces existe suficiente evidencia estadística
6. Conclusión
significativa para rechazar la hipótesis nula.

−5.531
𝑡𝑐 = = −6.72
0.822

5% 2.5% 1%
𝑡𝑡 = 𝑡(𝛼,𝑛−2)
1.711 2.064 2.492

Para el cálculo de la zona de rechazo de la hipótesis nula, el t de tablas a 1%, 2,5% y 5%


y el t calculado en valor absoluto 6.72, entonces al ser mayor el t calculado al de tablas
rechazamos la hipótesis nula, por lo que el efecto entre el uso de combustible y el peso
del vehículo es significativamente estadística al 1%, 2.5% y 5% de nivel de significancia.
35
30
25
20
15

2 2.5 3 3.5 4 4.5


car weight in 1,000 pounds

miles per gallon Linear prediction


10
5
Residuals

0
-5

2 2.5 3 3.5 4 4.5


car weight in 1,000 pounds

En cuanto a los errores se observa que no presentan una tendencia positiva o negativa

( 1) weight1 = 0

F( 1, 24) = 45.19
Prob > F = 0.0000

En la prueba grupal de mpg y weight1 es alta en el estadístico F


3. PRUEBAS INDIVIDUALES REGRESIÓN MÚLTIPLE
Source SS df MS Number of obs = 26
F(3, 22) = 15.25
Model 382.079636 3 127.359879 Prob > F = 0.0000
Residual 183.766518 22 8.35302354 R-squared = 0.6752
Adj R-squared = 0.6309
Total 565.846154 25 22.6338462 Root MSE = 2.8902

mpg Coef. Std. Err. t P>|t| [95% Conf. Interval]

weight1 -7.121111 1.604674 -4.44 0.000 -10.449 -3.793222


price .0002258 .0002654 0.85 0.404 -.0003245 .0007761
foreign -2.507127 2.056569 -1.22 0.236 -6.772189 1.757935
_cons 42.1662 4.264753 9.89 0.000 33.32164 51.01075

𝑚𝑝𝑔 = 𝛽1 + 𝛽2 ∗ 𝑤𝑒𝑖𝑔ℎ𝑡1 + 𝛽3 ∗ 𝑝𝑟𝑖𝑐𝑒 + 𝛽4 ∗ 𝑓𝑜𝑟𝑒𝑖𝑛𝑔 + 𝜀𝑡

𝑚𝑝𝑔 = 42.166 − 7.121 ∗ 𝑤𝑒𝑖𝑔ℎ𝑡1 + 0.0002 ∗ 𝑝𝑟𝑖𝑐𝑒 − 2.5071 ∗ 𝑓𝑜𝑟𝑒𝑖𝑛𝑔

𝐻𝑜 : 𝛽𝑖 = 0
1. Planteamiento de 𝐻𝑎 : 𝛽2 < 0 .…1
hipótesis 𝐻𝑎 : 𝛽3 < 0 ….2
𝐻𝑎 : 𝛽4 > 0 ….3

2. Nivel de significancia Valor Critico𝛼para


= 5%una Normal Estandar
Prueba de una cola y α=.05
.4
.3
Density

.2

3. Región de rechazo
.1
0

-3.89 -1.7108821 0
x
Valor Critico para una Normal Estandar
Prueba de una cola y α=.05

.4
.3
Density

.2
.1
0
0 1.7108821 6.97
x

𝛽 1
4. Estadístico de prueba 𝑡𝑐 = 𝑠.𝑒.(𝛽 ~𝑡(𝛼,𝑔𝑙) gl=n-k=26-4=22
)
1

5. Decisión Si |𝑡𝑐 | > |𝑡𝑡 | 𝑒𝑛𝑡𝑜𝑛𝑐𝑒𝑠 𝑅𝐻0


Entonces existe suficiente evidencia estadística
6. Conclusión
significativa para rechazar la hipótesis nula.

−7.121111
𝑤𝑒𝑖𝑔ℎ𝑡1 𝑡𝑐 = = −4.44
1.604674
0 .0002258
𝑝𝑟𝑖𝑐𝑒 𝑡𝑐 = = 0.85
0.0002654

−2.507127
𝑓𝑜𝑟𝑒𝑖𝑛𝑔 𝑡𝑐 = = −1.22
2.056569

5% 2.5% 1%
𝑡𝑡 = 𝑡(𝛼,𝑛−𝑘)
1.711 2.064 2.492

De acuerdo a los t calculados, para weight1, se rechaza la hipótesis nula a un de 1,2.5 y


5% nivel de significancia, mientras que las variables Price y foreing no existe suficiente
evidencia estadística para rechazar la hipótesis nula puesto de que ocurra ello son de de
23% y 40% respectivamente
4. PRUEBAS GRUPAL REGRESIÓN MÚLTIPLE

1. Planteamiento de 𝐻𝑜 : 𝛽𝑖 = 0
hipótesis 𝐻𝑎 : 𝛽2 ≠ 0, 𝛽3 ≠ 0, 𝛽4 ≠ 0
2. Nivel de significancia 𝛼 = 5%

3. Región de rechazo

𝑆𝐶𝐸/𝑔𝑙𝑁
4. Estadístico de prueba 𝐹𝑐 = 𝑆𝐶𝑅/𝑔𝑙𝐷 ~𝐹(𝑔𝑙𝑁,𝑔𝑙𝐷,𝛼)

5. Decisión Si |𝐹𝑐 | > |𝐹𝑡 | 𝑒𝑛𝑡𝑜𝑛𝑐𝑒𝑠 𝑅𝐻0


Entonces existe suficiente evidencia estadística
6. Conclusión
significativa para rechazar la hipótesis nula.

382.079636/3
𝐹𝑐 = ~𝐹
183.766518/22 (𝑔𝑙𝑁,𝑔𝑙𝐷,𝛼)

382.079636
𝐹𝑐 = 3 = 15.247
183.766518
22

𝐹(𝑔𝑙𝑁,𝑔𝑙𝐷,𝛼) = 𝐹(3,33,0.025) 3.783

Puesto que el F calculado es mayor al F tablas (15.24 > 3.783) rechazamos la hipótesis nula a un
nivel de significancia de 1%, este modelo tiene un resultado estadísticamente válido.
. * Efectos marginales (en la media y efectos marginal promedio)
. margins, dydx(*) atmeans

Conditional marginal effects Number of obs = 26


Model VCE : OLS

Expression : Linear prediction, predict()


dy/dx w.r.t. : weight1 price foreign
at : weight1 = 3.099231 (mean)
price = 6651.731 (mean)
foreign = .2692308 (mean)

Delta-method
dy/dx Std. Err. t P>|t| [95% Conf. Interval]

weight1 -7.121111 1.604674 -4.44 0.000 -10.449 -3.793222


price .0002258 .0002654 0.85 0.404 -.0003245 .0007761
foreign -2.507127 2.056569 -1.22 0.236 -6.772189 1.757935

. margins, dydx(*)

Average marginal effects Number of obs = 26


Model VCE : OLS

Expression : Linear prediction, predict()


dy/dx w.r.t. : weight1 price foreign

Delta-method
dy/dx Std. Err. t P>|t| [95% Conf. Interval]

weight1 -7.121111 1.604674 -4.44 0.000 -10.449 -3.793222


price .0002258 .0002654 0.85 0.404 -.0003245 .0007761
foreign -2.507127 2.056569 -1.22 0.236 -6.772189 1.757935

. mfx

Marginal effects after regress


y = Fitted values (predict)
= 20.923077

variable dy/dx Std. Err. z P>|z| [ 95% C.I. ] X

weight1 -7.121111 1.60467 -4.44 0.000 -10.2662 -3.97601 3.09923


price .0002258 .00027 0.85 0.395 -.000294 .000746 6651.73
foreign* -2.507127 2.05657 -1.22 0.223 -6.53793 1.52367 .269231

(*) dy/dx is for discrete change of dummy variable from 0 to 1


. mfx, dydx

Marginal effects after regress


y = Fitted values (predict)
= 20.923077

variable dy/dx Std. Err. z P>|z| [ 95% C.I. ] X

weight1 -7.121111 1.60467 -4.44 0.000 -10.2662 -3.97601 3.09923


price .0002258 .00027 0.85 0.395 -.000294 .000746 6651.73
foreign* -2.507127 2.05657 -1.22 0.223 -6.53793 1.52367 .269231

(*) dy/dx is for discrete change of dummy variable from 0 to 1

. mfx, eydx

Elasticities after regress


y = Fitted values (predict)
= 20.923077

variable ey/dx Std. Err. z P>|z| [ 95% C.I. ] X

weight1 -.3403472 .07725 -4.41 0.000 -.491747 -.188948 3.09923


price .0000108 .00001 0.85 0.395 -.000014 .000036 6651.73
foreign -.1198259 .09835 -1.22 0.223 -.312579 .072928 .269231

. mfx, dyex

Elasticities after regress


y = Fitted values (predict)
= 20.923077

variable dy/ex Std. Err. z P>|z| [ 95% C.I. ] X

weight1 -22.06997 4.97325 -4.44 0.000 -31.8174 -12.3226 3.09923


price 1.501844 1.76505 0.85 0.395 -1.95758 4.96127 6651.73
foreign -.6749957 .55369 -1.22 0.223 -1.76021 .41022 .269231

. mfx, eyex

Elasticities after regress


y = Fitted values (predict)
= 20.923077

variable ey/ex Std. Err. z P>|z| [ 95% C.I. ] X

weight1 -1.054815 .2394 -4.41 0.000 -1.52404 -.585592 3.09923


price .0717793 .08438 0.85 0.395 -.093605 .237164 6651.73
foreign -.0322608 .02648 -1.22 0.223 -.084156 .019634 .269231

También podría gustarte