0% encontró este documento útil (0 votos)
21 vistas2 páginas

Salida Repaso Int 3

El documento presenta resultados de pruebas estadísticas sobre el rendimiento de vehículos en función de diferentes variables como Drat, Peso y Transmisión. Se realizaron pruebas de proporciones y t-tests, mostrando diferencias significativas en los rendimientos según el tipo de transmisión y el tamaño del vehículo. Además, se incluyen análisis de varianza y regresiones lineales que indican relaciones entre las variables estudiadas.

Cargado por

Raul Salgado
Derechos de autor
© © All Rights Reserved
Nos tomamos en serio los derechos de los contenidos. Si sospechas que se trata de tu contenido, reclámalo aquí.
Formatos disponibles
Descarga como PDF, TXT o lee en línea desde Scribd
0% encontró este documento útil (0 votos)
21 vistas2 páginas

Salida Repaso Int 3

El documento presenta resultados de pruebas estadísticas sobre el rendimiento de vehículos en función de diferentes variables como Drat, Peso y Transmisión. Se realizaron pruebas de proporciones y t-tests, mostrando diferencias significativas en los rendimientos según el tipo de transmisión y el tamaño del vehículo. Además, se incluyen análisis de varianza y regresiones lineales que indican relaciones entre las variables estudiadas.

Cargado por

Raul Salgado
Derechos de autor
© © All Rights Reserved
Nos tomamos en serio los derechos de los contenidos. Si sospechas que se trata de tu contenido, reclámalo aquí.
Formatos disponibles
Descarga como PDF, TXT o lee en línea desde Scribd

> head(base) > prop.

test(x=7,n=14,p=1/3,alter="less",correct=F)
Rendimiento Drat Peso Tamaño Cilindro Transm Engran
<dbl> <dbl> <dbl> <chr> <chr> <chr> <dbl> 1-sample proportions test without continuity
1 6.6 2.76 1760 Grande 8cil autom 3 correction
2 4.7 2.76 1730 Grande 6cil autom 3 data: 7 out of 14, null probability 1/3
3 4.4 2.93 2625 Grande 8cil autom 3 X-squared = 1.75, df = 1, p-value = 0.9071
4 4.4 3.00 2712 Grande 8cil mecan 3 alternative hypothesis: true p is less than 0.3333333
95 percent confidence interval:
0.0000000 0.7012181
> attach(base) sample estimates:
p
> t.test(Rendimiento,mu=8,alter="grea") 0.5

One Sample t-test > t.test(Rendimiento~Transm,alter="less",var.equal=F)


data: Rendimiento
t = 0.91408, df = 31, p-value = 0.1839 Welch Two Sample t-test
alternative hypothesis: true mean is greater than 8 data: Rendimiento by Transm
95 percent confidence interval: t = -4.7166, df = 23.554, p-value = 4.46e-05
7.668727 Inf alternative hypothesis: true difference in means between
sample estimates: group autom and group manual is less than 0
mean of x 95 percent confidence interval:
8.3875 -Inf -2.027005
sample estimates:
> t.test(Rendimiento,mu=9,alter="less") mean in group autom mean in group manual
7.094737 10.276923
One Sample t-test
data: Rendimiento > t.test (Rendimiento~Transm)
t = -1.4448, df = 31, p-value = 0.07927
alternative hypothesis: true mean is less than 9 Welch Two Sample t-test
95 percent confidence interval: data: Rendimiento by Transm
-Inf 9.106273 t = -4.7166, df = 23.554, p-value = 8.92e-05
sample estimates: alternative hypothesis: true difference in means between
mean of x group autom and group manual is not equal to 0
8.3875 95 percent confidence interval:
-4.576061 -1.788311
> table(Tamaño) sample estimates:
Tamaño mean in group autom mean in group manual
Grande Mediano Pequeño 7.094737 10.276923
14 11 7
> an1<-aov (Rendimiento~Tamaño)
> prop.test(x=7,n=32,p=1/3,alter="less",correct=F) > summary(an1)
Df Sum Sq Mean Sq F value Pr(>F)
1-sample proportions test without continuity Tamaño 2 141.96 70.98 56.69 9.55e-11 ***
correction Residuals 29 36.31 1.25
data: 7 out of 32, null probability 1/3 ---
X-squared = 1.8906, df = 1, p-value = 0.08457 > TukeyHSD(an1)
alternative hypothesis: true p is less than 0.3333333 Tukey multiple comparisons of means
95 percent confidence interval: 95% family-wise confidence level
0.0000000 0.3581636
sample estimates: Fit: aov(formula = Rendimiento ~ Tamaño)
p $Tamaño
0.21875 diff lwr upr p adj
Mediano-Grande 2.383 1.269 3.496 3.34e-05
Pequeño-Grande 5.471 4.192 6.750 0.00e+00
Pequeño-Mediano 3.082 1.752 4.424 1.04e-05
> shapiro.test (an1$residual) Estimate Std. Error t value Pr(>|t|)
(Intercept) 7.6617710 2.8316655 2.706 0.0115 *
Shapiro-Wilk normality test Drat 1.4239965 0.6409634 2.222 0.0346 *
data: an1$residual Peso -0.0030488 0.0006241 -4.885 3.8e-05 ***
W = 0.93284, p-value = 0.04701 Engran 0.1448449 0.3880609 0.373 0.7118
---
> lmtest::bptest(an1)
Residual standard error: 1.131 on 28 degrees of freedom
studentized Breusch-Pagan test Multiple R-squared: 0.7992, Adjusted R-squared: 0.777
data: an1 F-statistic: 37.15 on 3 and 28 DF, p-value: 6.758e-10
BP = 2.5414, df = 2, p-value = 0.2806
> summary(lm(Rendimiento~Drat+Peso))
> cor(base[c(1,2,3,7)])
lm(formula = Rendimiento ~ Drat + Peso)
Rendimiento Drat Peso Engran
Rendimiento 1.0000 0.7882 -0.8614 0.6103 Coefficients:
Drat 0.7882 1.0000 -0.7257 0.6996 Estimate Std. Error t value Pr(>|t|)
Peso -0.8614 -0.7257 1.0000 -0.5673 (Intercept) 7.804316 2.76384 2.824 0.00849 **
Engran 0.6103 0.6996 -0.5673 1.0000 Drat 1.545566 0.54378 2.842 0.00812 **
> Peso -0.003077 0.00061 -5.042 2.26e-05 ***
> summary(lm(Rendimiento~Drat)) ---

lm(formula = Rendimiento ~ Drat) Residual standard error: 1.114 on 29 degrees of freedom


Multiple R-squared: 0.7982, Adjusted R-squared: 0.784
Coefficients: F-statistic: 57.36 on 2 and 29 DF, p-value: 8.33e-11
Estimate Std. Error t value Pr(>|t|)
(Intercept) -4.3277 1.8316 -2.363 0.0248 * > summary(lm(Rendimiento~Peso+Engran))
Drat 3.5354 0.5039 7.016 8.49e-08 ***
--- lm(formula = Rendimiento ~ Peso + Engran)

Coefficients:
Residual standard error: 1.5 on 30 degrees of freedom Estimate Std. Error t value Pr(>|t|)
Multiple R-squared: 0.6213, Adjusted R-squared: 0.608 (Intercept) 12.4207904 1.9736143 6.293 7.14e-07 ***
F-statistic: 49.23 on 1 and 30 DF, p-value: 8.491e-08 Peso -0.0038237 0.0005516 -6.932 1.28e-07 ***
Engran 0.5829378 0.3561833 1.637 0.113
> summary(lm(Rendimiento~Peso)) ---

lm(formula = Rendimiento ~ Peso) Residual standard error: 1.205 on 29 degrees of freedom


Multiple R-squared: 0.7638, Adjusted R-squared: 0.747
Coefficients: F-statistic: 46.9 on 2 and 29 DF, p-value: 8.162e-10
Estimate Std. Error t value Pr(>|t|)
(Intercept) 15.3985019 0.7858574 19.595 < 2e-16 *** >
Peso -0.0043358 0.0004668 -9.289 2.48e-10 ***
---

Residual standard error: 1.238 on 30 degrees of freedom


Multiple R-squared: 0.742, Adjusted R-squared: 0.733
F-statistic: 86.29 on 1 and 30 DF, p-value: 2.477e-10

>

> summary(lm(Rendimiento~Drat+Peso+Engran))

lm(formula = Rendimiento ~ Drat + Peso + Engran)

Coefficients:

También podría gustarte