Sunteți pe pagina 1din 9

REPÚBLICA BOLIVARIANA DE VENEZUELA

MINISTERIO DEL PODER POPULAR PARA LA DEFENSA


UNIVERSIDAD NACIONAL EXPERIMENTAL POLITÉCNICA DE LA FUERZA ARMADA
NACIONAL BOLIVARIANA
UNEFA

Modelos de Regresión

PROFESOR: BACHILLER:

Jesús Suniaga Luis Rodríguez C.I:27.525.233

Juan Griego, 12 de Julio de 2018.


Este trabajo se trata de Construir una gráfica de dispersión, dibujar la línea de
regresión que mejor se ajusta a un conjunto de datos aportados por el profesor. En
este caso la variable X representada a La Estatura y la variable Y representada al peso.

La estatura y peso de 10 jugadores de baloncesto de un equipo son:

Estatura(x) 186 189 190 192 193 193 198 201 203 205
Peso(y) 85 85 86 90 87 91 93 103 100 101
CALCULO DE LOS PARÁMETROS DE LOS MODELOS.

Modelo Lineal:

Estadísticos básicos de los Residuos:


Min 1Q Median 3Q Max
-3.0565 -1.2359 -0.6217 0.9598 4.7696

Coeficientes:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -107.139 24.578 -4.359 0.00242
I(x) 1.022 0.126 8.110 3.96e-05

Residual standard error: 2.417 on 8 degrees of freedom


Multiple R-squared: 0.8916
Adjusted R-squared: 0.878 = 87%
F-statistic: 65.77 on 1 and 8 DF
P-value: 3.957e-05

y= -107.139+1.022x
Modelo Cuadrático.

Estadísticos básicos de los Residuos:

Min 1Q Median 3Q Max


-2.7036 -1.5971 -0.6938 1.2815 4.9052

Coeficientes:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 354.33544 1006.40186 0.352 0.735
I(x) -3.69487 10.28363 -0.359 0.730
I(x^2) 0.01204 0.02625 0.459 0.660

Residual standard error: 2.546 on 7 degrees of freedom


Multiple
R-squared: 0.8947,
Adjusted R-squared: 0.8646 = 86%
F-statistic: 29.75 on 2 and 7 DF,
p-value: 0.0003786

y=354.33544-3.69487x+0.01204x^2
Modelo Cubico.
Estadísticos básicos de los Residuos:

Min 1Q Median 3Q Max


-3.0879 -0.8101 -0.1977 1.2943 3.4712

Coeficientes:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 4.570e+04 3.337e+04 1.370 0.220
I(x) -7.015e+02 5.133e+02 -1.366 0.221
I(x^2) 3.589e+00 2.631e+00 1.364 0.222
I(x^3) -6.109e-03 4.494e-03 -1.359 0.223

Residual standard error: 2.404 on 6 degrees of freedom


Multiple R-squared: 0.9195,
Adjusted R-squared: 0.8793= 87%
F-statistic: 22.85 on 3 and 6 DF,
p-value: 0.001105

Y=45698.64-701.4606x+3.589153x^2-0.006109265x^3
Modelo Exponencial.
Estadísticos básicos de los Residuos:

Min 1Q Median 3Q Max


-0.03255 -0.01416 -0.00707 0.01238 0.04857

Coeficientes:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.382660 0.256490 9.289 1.47e-05
I(x) 0.010963 0.001315 8.339 3.24e-05

Residual standard error: 0.02522 on 8 degrees of freedom


Multiple R-squared: 0.8968
Adjusted R-squared: 0.8839 = 88%
F-statistic: 69.53 on 1 and 8 DF
P-value: 3.236e-05

Y=10.83368exp (0.010963x)
Modelo Potencial.
Estadísticos básicos de los Residuos:

Min 1Q Median 3Q Max


-0.033401 -0.013092 -0.006917 0.011618 0.048324

Coeficientes:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -6.7861 1.3651 - 4.971 0.00109
I(log(x)) 2.1444 0.2589 8.283 3.4e-05

Residual standard error: 0.02537 on 8 degrees of freedom


Multiple R-squared: 0.8956
Adjusted R-squared: 0.8825 = 88%
F-statistic: 68.6 on 1 and 8 DF
p-value: 3.398e-05

Y=0.001129365x^ (2.1444)
COMPARACIÓN DE MODELOS.

MODELO FORMULA 𝑹𝟐
Lineal y= -107.139+1.022x 0.878
Cuadrático y=354.33544-3.69487x+0.01204x^2 0.864
Cubico Y=45698.64-701.4606x+3.589153x^2-0.006109265x^3 0.879
Exponencial Y=10.83368exp (0.010963x) 0.883
Potencial Y=0.001129365x^ (2.1444) 0.882

De los tres modelos resulta mejor para este problema es el exponencial ya que
se obtuvo un coeficiente de bondad de ajuste R^2 mayor en comparación con los otros
modelos, lo cual se puede observar en la gráfica conjunta
SCRIPTS QUE SE USARON PARA RESOLVER LA TAREA.

x=c(186,189,190,192,193,193,198,201,203,205)
y=c(85,85,86,90,87,91,93,103,100,101)
plot(x,y,pch=21,col="red",xlab="Estatura",ylab="Peso", main="Modelo de regresion
Lineal"

reg1=lm(y~I(x))
reg2=lm(y~I(x)+I(x^2))
reg3=lm(y~I(x)+I(x^2)+I(x^3))
reg4=lm(log(y)~I(x))
reg5=lm(log(y) ~ I(log(x)))
summary(reg1)
summary(reg2)
summary(reg3)
summary(reg4)
summary(reg5)

g1=function(x)-107.139+1.022x
g2=function(x) 354.33544-3.69487x+0.01204x^2
g3=function(x)Y=45698.64-701.4606x+3.589153x^2-0.006109265x^3
g4=function(x) 10.83368exp (0.010963x)
g5=function(x) 0.001129365x^ (2.1444)

curve(g1,from=0.00,to=2100.00,add=TRUE,col="red")
curve(g2,from=0.00,to=210.00,add=TRUE,col="blue")
curve(g3,from=0.00,to=210.00,add=TRUE,col="green")
curve(g4,from=0.00,to=210.00,add=TRUE,col="yellow")
curve(g5,from=50.00,to=210.00,add=TRUE,col="purple")

S-ar putea să vă placă și