Está en la página 1de 19

Trabajo Prctico:

Regresin y
Correlacin
Docente: Roberto Villamayor
Alumnos: _Astier Grabriel
_Mazza Pablo
_Talijancic Ivn
Curso: 3ro - Ing. Electromecnica
Problema 8.1 :
Consigna:

Regresin y Correlacin.nb

In[1]:=

Solucin:

Regresin y Correlacin.nb

In[1]:=

88"Altitud", "Temperatura"<, 85740.9, 90.3<, 85740.9, 90.2<, 84934.3, 92.2<,


84793.1, 92.4<, 84538, 93<, 84430.1, 93.3<, 84134.2, 93.8<, 84078.6, 93.9<,
84061.9, 94.1<, 84067.5, 94.1<, 83423.2, 95.3<, 82565.5, 95.9<, 81339.2, 98.6<,
81815.5, 98.1<, 8972.1, 99.3<, 8398, 99.9<, 8182.5, 100<< MatrixForm

Out[1]//MatrixForm=

Altitud Temperatura
5740.9
90.3
5740.9
90.2
4934.3
92.2
4793.1
92.4
4538
93
4430.1
93.3
4134.2
93.8
4078.6
93.9
4061.9
94.1
4067.5
94.1
3423.2
95.3
2565.5
95.9
1339.2
98.6
1815.5
98.1
972.1
99.3
398
99.9
182.5
100
In[2]:=

datos = 885740.9, 90.3<, 85740.9, 90.2<, 84934.3, 92.2<,


84793.1, 92.4<, 84538, 93<, 84430.1, 93.3<, 84134.2, 93.8<, 84078.6, 93.9<,
84061.9, 94.1<, 84067.5, 94.1<, 83423.2, 95.3<, 82565.5, 95.9<,
81339.2, 98.6<, 81815.5, 98.1<, 8972.1, 99.3<, 8398, 99.9<, 8182.5, 100<<;

Regresin y Correlacin.nb

In[3]:=

ListPlot@datos, AxesLabel 8"Altitud", "Temperatura"<,


PlotLabel "Grfico de Dispercin", ImageSize 800, PlotStyle PointSize@0.01DD
Grfico de Dispercin
Temperatura
100

98

96
Out[3]=

94

92

1000

2000

3000

4000

A continuacin, valindonos del comando Fit, procedemos a hacer la ajustar los datos, anteriormente graficados a una recta:
In[4]:=
Out[4]=

r@x_D = Fit@datos, 81, x<, xD


100.855 - 0.00175025 x

Regresin y Correlacin.nb

In[5]:=

Show@8ListPlot@datos, AxesLabel 8"Altitud", "Temperatura"<,


PlotLabel "Regresin Lineal", ImageSize 800, PlotStyle PointSize@0.01DD,
Plot@r@xD, 8x, 0, 6000<, PlotStyle RGBColor@1, 0, 0DD<D
Regresin Lineal
Temperatura

100

98

Out[5]=

96

94

92

1000

2000

3000

Respuesta a):
In[6]:=

r@6962D

Out[6]=

88.6701

Por lo tanto, en la cima del Aconcgua (Medoza), el agua hace ebullicin a 88.6701 C
Respuesta b):
In[7]:=

r@2200D

Out[7]=

97.0048

4000

Regresin y Correlacin.nb

Por lo tanto, en Pampa de Achala (Cordoba), el agua hace ebullicin a 97.0048 C


Respuesta c):
In[8]:=
Out[8]=

r@0D
100.855

De acuerdo con el modelo estimado, a nivel del mar, el agua hace ebullicin a 100 C. Estamos de acuerdo con
esta prediccin.
Respuesta d):
Como podemos ver en el grfico, en funcin al modelo estimado, es ms que obvio que la temperatura de
ebullicin disminuye a medida que aumenta la altitud.
Respuesta e):
In[9]:=
Out[9]=

r@500D
99.9803

Cuando se haciendo a 500m, la temperatura de ebullici del agua es de 99.9803 C. Si es este cambio constante
e independiente de la altura a la que se parta.

Problema 8.2 :
Consigna:
In[11]:=

Regresin y Correlacin.nb

In[12]:=

Solucin:

Regresin y Correlacin.nb

In[10]:=

88"Ln@DosisD", "Mortandad ProdH1L", "Mortandad ProdH2L"<, 80.00, 5, 4<, 80.01, 7, 8<,


80.05, 10, 10<, 80.1, 16, 13<, 80.15, 17, 17<, 80.2, 25, 20<, 80.25, 26, 26<,
80.30, 30, 33<, 80.40, 35, 40<, 80.70, 72, 70<, 80.90, 85, 91<< MatrixForm

Out[10]//MatrixForm=

Ln@DosisD Mortandad ProdH1L Mortandad ProdH2L


0.
5
4
0.01
7
8
0.05
10
10
0.1
16
13
0.15
17
17
0.2
25
20
0.25
26
26
0.3
30
33
0.4
35
40
0.7
72
70
0.9
85
91
In[11]:=

In[12]:=

datosprd1 = 880.00, 5<, 80.01, 7<, 80.05, 10<, 80.1, 16<, 80.15, 17<,
80.2, 25<, 80.25, 26<, 80.30, 30<, 80.40, 35<, 80.70, 72<, 80.90, 85<<;
datosprd2 = 880.00, 4<, 80.01, 8<, 80.05, 10<, 80.1, 13<, 80.15, 17<,
80.2, 20<, 80.25, 26<, 80.30, 33<, 80.40, 40<, 80.70, 70<, 80.90, 91<<;

Regresin y Correlacin.nb

Respuesta a):
In[13]:=

ListPlot@datosprd1, PlotRange 880, 1<, 80, 95<<,


ImageSize 800, PlotLabel "Grfico de Dispercin Producto 1",
AxesLabel 8"Dosis", "Mortandad"<, PlotStyle PointSize@0.01DD
Grfico de Dispercin Producto 1
Mortandad

80

60

Out[13]=

40

20

0
0.0

0.2

0.4

0.6

10

Regresin y Correlacin.nb

In[14]:=

ListPlot@datosprd2, PlotRange 880, 1<, 80, 95<<,


ImageSize 800, PlotLabel "Grfico de Dispercin Producto 2",
AxesLabel 8"Dosis", "Mortandad"<,
PlotStyle Directive @ PointSize@0.01D, RGBColor@1, 0, 0DDD
Grfico de Dispercin Producto 2
Mortandad

80

60

Out[14]=

40

20

0
0.0

0.2

0.4

0.6

Regresin y Correlacin.nb

In[15]:=

Show@
8ListPlot@datosprd1, PlotRange 880, 1<, 80, 95<<, PlotStyle PointSize@0.01DD,
ListPlot@datosprd2, PlotRange 880, 1<, 80, 95<<,
PlotStyle Directive @ PointSize@0.01D, RGBColor@1, 0, 0DDD<,
PlotLabel "Grfico de Dispercin de los dos Productos Juntos",
ImageSize 800, AxesLabel 8"Dosis", "Mortandad"<D
Grfico de Dispercin de los dos Productos Juntos
Mortandad

80

60

Out[15]=

40

20

0
0.0

0.2

0.4

Respuesta b):
Como podemos ver en el grfico, resulta ms que rasonable proponer una un ajuste lineal.
Respuesta c):
Producto 1:
El modelo lineal, que se supone, relaciona la mortalidad con la dosis del producto 1 es:

0.6

11

12

Regresin y Correlacin.nb

In[16]:=
Out[16]=

In[17]:=

p1@x_D = Fit@datosprd1, 81, x<, xD


4.91365 + 89.5261 x
Show@8ListPlot@datosprd1, PlotRange 880, 1<, 80, 95<<,
ImageSize 800, PlotLabel "Grfico de Dispercin Producto 1",
AxesLabel 8"Dosis", "Mortandad"<, PlotStyle
Directive@8PointSize@0.01D, RGBColor@1, 0, 0D<DD, Plot@p1@xD, 8x, 0, 1<D<D
Grfico de Dispercin Producto 1
Mortandad

80

60

Out[17]=

40

20

0
0.0

0.2

0.4

Producto 2:
El modelo lineal, que se supone, relaciona la mortalidad con la dosis del producto 2 es:
In[18]:=
Out[18]=

p2@x_D = Fit@datosprd2, 81, x<, xD


3.78146 + 94.9033 x

0.6

Regresin y Correlacin.nb

In[19]:=

Show@8ListPlot@datosprd2, PlotRange 880, 1<, 80, 95<<,


ImageSize 800, PlotLabel "Grfico de Dispercin Producto 1",
AxesLabel 8"Dosis", "Mortandad"<, PlotStyle
Directive@8PointSize@0.01D, RGBColor@0, 1, 0D<DD, Plot@p2@xD, 8x, 0, 1<D<D
Grfico de Dispercin Producto 1
Mortandad

80

60

Out[19]=

40

20

0
0.0

0.2

0.4

Respuesta e):
Producto 1:
In[20]:=
Out[20]=

x1 = Solve@p1@xD 500, xD
88x 5.53008<<

Por lo tanto la docis necesaria, para matar el 50% de los insectos, ser:
In[21]:=
Out[21]=

Solve@Log@xD == x1@@1, 1, 2DD, xD


88x 252.164<<

0.6

13

14

Regresin y Correlacin.nb

Producto 2:
In[22]:=
Out[22]=

x2 = Solve@p2@xD 500, xD
88x 5.22868<<

Por lo tanto la docis necesaria, para matar el 50% de los insectos, ser :
In[23]:=
Out[23]=

Solve@Log@xD x2@@1, 1, 2DD, xD


88x 186.546<<

Problema 8.4:
Consigna:
In[27]:=

Solucin:
Sabemos que el rendimiento, en Kg/ha del ajo, depende linealmente del porcentaje de Materia Orgnica del
suelo (%MO). Mediante una constante de proporcionalidad igual a 4000. Tenemos entonces:
In[24]:=

b = 4000;

In[25]:=

rend@mo_D = b * mo

Out[25]=

In[26]:=
Out[26]=

4000 mo
dif = Simplify@rend@mo + 1.3D - rend@moDD
5200.

Regresin y Correlacin.nb

In[27]:=

15

Plot@8rend@moD, rend@mo + 1.3D<, 8mo, 0, 100<,


AxesLabel 8"%Materia Orgnica", "Rendimiento Kgha"<, ImageSize 800D
Rendimiento Kgha
400 000

300 000

Out[27]=

200 000

100 000

20

40

60

80

16

Regresin y Correlacin.nb

In[28]:=

ShowB:PlotB7500, :mo, 0.575`,

15
8

>,

PlotRange 880, 3<, 80, 14 000<<, PlotStyle RGBColor@0, 1, 0DF,


, y>, 8y, 7500, 12 700<, PlotStyle RGBColor@0, 0, 0DF,
8
Plot@8rend@moD, rend@mo + 1.3D<, 8mo, 0, 3<, PlotRange 880, 3<, 80, 14 000<<D,
GraphicsA9Black, TextA"Dif = 5200", 82.12, 10 500<E=E,
15

ParametricPlotB:

GraphicsA9Black, TextA"%mo

= 1.3", 81.1, 6800<E=E>,

AxesLabel 8"%Materia Orgnica", "Rendimiento Kgha"<,


PlotLabel "Detalle", ImageSize 800F
Detalle
Rendimiento Kgha
14 000

12 000

Dif = 5200
10 000

8000
Out[28]=

%mo = 1.3
6000

4000

2000

0
0.0

Problema 8.7 :
Consigna:

0.5

1.0

1.5

2.0

Regresin y Correlacin.nb

In[33]:=

Solucin:
In[29]:=

88"Dosis", "Dao"<, 8100, 50<, 8125, 48<, 8200, 39<, 8250, 35<, 8275, 30<,
8300, 25<, 8325, 20<, 8350, 12<, 8375, 10<, 8400, 5<< MatrixForm

Out[29]//MatrixForm=

Dosis Dao
100
50
125
48
200
39
250
35
275
30
300
25
325
20
350
12
375
10
400
5
In[30]:=

datos1 = 88100, 50<, 8125, 48<, 8200, 39<, 8250, 35<,


8275, 30<, 8300, 25<, 8325, 20<, 8350, 12<, 8375, 10<, 8400, 5<<;

17

18

Regresin y Correlacin.nb

In[31]:=

ListPlot@datos1, PlotRange 880, 410<, 80, 60<<,


ImageSize 800, PlotLabel "Grfico de Dispercin",
AxesLabel 8"Dosis", "Dao"<, PlotStyle PointSize@0.01DD
Grfico de Dispercin
Dao
60

50

40

Out[31]=

30

20

10

0
0

100

Respuesta a):
El ajuste en regresin lineal, pedido es:
In[32]:=
Out[32]=

y@x_D = Fit@datos1, 81, x<, xD


68.492 - 0.152193 x

200

300

Regresin y Correlacin.nb

In[33]:=

Show@8Plot@y@xD, 8x, 0, 410<, PlotStyle RGBColor@1, 0, 0DD,


ListPlot@datos1, PlotStyle PointSize@0.01DD<,
PlotRange 880, 410<, 80, 60<<, ImageSize 800,
PlotLabel "Grfico de Dispercin", AxesLabel 8"Dosis", "Dao"<D
Grfico de Dispercin
Dao
60

50

40

Out[33]=

30

20

10

100

Respuesta b):
El tamao promedio de las manchas, aplicando 260 gr.p.a/ha, ser:
In[34]:=
Out[34]=

y@260D
28.9219

200

300

19

También podría gustarte